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 |