app/soc/tasks/surveys.py
changeset 2615 08788ae10436
parent 2614 dbc8a50dbce0
child 2867 e8d86272e6ea
equal deleted inserted replaced
2614:dbc8a50dbce0 2615:08788ae10436
    51     program_key: Specifies the program key name for which to loop over all the
    51     program_key: Specifies the program key name for which to loop over all the
    52                  StudentProjects for
    52                  StudentProjects for
    53     survey_key: specifies the key name for the ProjectSurvey to send reminders
    53     survey_key: specifies the key name for the ProjectSurvey to send reminders
    54                 for
    54                 for
    55     survey_type: either project or grading depending on the type of Survey
    55     survey_type: either project or grading depending on the type of Survey
    56     project_key: optional to specifiy which project was the last for which a
    56     project_key: optional to specify which project was the last for which a
    57                  task was spawn
    57                  task was spawn
    58 
    58 
    59   Args:
    59   Args:
    60     request: Django Request object
    60     request: Django Request object
    61   """
    61   """
    92   if 'project_key' in post_dict:
    92   if 'project_key' in post_dict:
    93     project_start_key = post_dict['project_key']
    93     project_start_key = post_dict['project_key']
    94   else:
    94   else:
    95     project_start_key = None
    95     project_start_key = None
    96 
    96 
    97   # get all valid surveys from starting key
    97   # get all valid StudentProjects from starting key
    98   fields = {'program': program_entity,
    98   fields = {'program': program_entity,
    99             'status': 'accepted'}
    99             'status': 'accepted'}
   100 
   100 
   101   if project_start_key:
   101   if project_start_key:
   102     # retrieve the last project that was done
   102     # retrieve the last project that was done