app/soc/views/models/survey.py
changeset 2766 93e4745ebdbd
parent 2752 fb3bed3eecd8
child 2798 ec1857f0d0c7
equal deleted inserted replaced
2765:b1c591bb2e87 2766:93e4745ebdbd
   499     context['page_name'] = "%s titled '%s'" % (page_name, entity.title)
   499     context['page_name'] = "%s titled '%s'" % (page_name, entity.title)
   500     context['entity'] = entity
   500     context['entity'] = entity
   501 
   501 
   502     # try to get an existing SurveyRecord for the current user
   502     # try to get an existing SurveyRecord for the current user
   503     survey_record = self._getSurveyRecordFor(entity, request, params)
   503     survey_record = self._getSurveyRecordFor(entity, request, params)
       
   504     post_dict = request.POST
   504 
   505 
   505     # get an instance of SurveyTakeForm to use
   506     # get an instance of SurveyTakeForm to use
   506     survey_form = params['survey_take_form'](
   507     survey_form = params['survey_take_form'](
   507         survey_content=survey.survey_content,
   508         survey_content=entity.survey_content,
   508         survey_record=record,
   509         survey_record=survey_record,
   509         survey_logic=params['logic'],
   510         survey_logic=params['logic'],
   510         data=post_dict)
   511         data=post_dict)
   511 
   512 
   512     # fill context with the survey_form and additional information
   513     # fill context with the survey_form and additional information
   513     context['survey_form'] = survey_form
   514     context['survey_form'] = survey_form