# HG changeset patch # User Lennard de Rijk # Date 1247664482 -7200 # Node ID e2654d53a64314bb60f76ba54ea72bedcc65c742 # Parent 8df08a3b17dbc5d4376bd3a6cf1bba982fb8fb8b Another batch of style fixes for Surveys. diff -r 8df08a3b17db -r e2654d53a643 app/soc/logic/models/grading_record.py --- a/app/soc/logic/models/grading_record.py Wed Jul 15 15:18:58 2009 +0200 +++ b/app/soc/logic/models/grading_record.py Wed Jul 15 15:28:02 2009 +0200 @@ -90,7 +90,7 @@ Args: project: Project entity survey_group: a GradingSurveyGroup entity - record_entity an optional GradingRecord entity + record_entity: an optional GradingRecord entity Returns: Dict containing the fields that should be set on a GradingRecord for this diff -r 8df08a3b17db -r e2654d53a643 app/soc/templates/soc/survey/list/results_heading.html --- a/app/soc/templates/soc/survey/list/results_heading.html Wed Jul 15 15:18:58 2009 +0200 +++ b/app/soc/templates/soc/survey/list/results_heading.html Wed Jul 15 15:28:02 2009 +0200 @@ -3,13 +3,9 @@ {{ property }} {% endfor %} Taken By - Created On - Last Modified - Answer - {% if grades %} Grade {% endif %} diff -r 8df08a3b17db -r e2654d53a643 app/soc/templates/soc/survey/public.html --- a/app/soc/templates/soc/survey/public.html Wed Jul 15 15:18:58 2009 +0200 +++ b/app/soc/templates/soc/survey/public.html Wed Jul 15 15:28:02 2009 +0200 @@ -38,7 +38,7 @@ This page gives a preview of how users will see the Survey. {% if entity.content %} - +
{{ entity.content|safe }}
{% endif %} diff -r 8df08a3b17db -r e2654d53a643 app/soc/views/helper/access.py --- a/app/soc/views/helper/access.py Wed Jul 15 15:18:58 2009 +0200 +++ b/app/soc/views/helper/access.py Wed Jul 15 15:28:02 2009 +0200 @@ -1628,7 +1628,8 @@ # check if the current user is a mentor for the program in survey.scope django_args['program'] = survey_scope # program is the 'program' attribute for mentors and org_admins - return self._checkHasActiveRoleFor(django_args, org_admin_logic, 'program') + return self._checkHasActiveRoleFor(django_args, org_admin_logic, + 'program') if role == 'student': # check if the current user is a student for the program in survey.scope diff -r 8df08a3b17db -r e2654d53a643 app/soc/views/helper/redirects.py --- a/app/soc/views/helper/redirects.py Wed Jul 15 15:18:58 2009 +0200 +++ b/app/soc/views/helper/redirects.py Wed Jul 15 15:28:02 2009 +0200 @@ -362,7 +362,7 @@ def getTakeSurveyRedirect(entity, info): - """Returns the redirect for taking a Survey . + """Returns the redirect for taking a Survey. Args: entity: a Survey entity @@ -373,7 +373,7 @@ params = info return '/%s/take/%s' % (params['url_name'], - survey_entity.key().id_or_name()) + survey_entity.key().id_or_name()) def getTakeProjectSurveyRedirect(entity, info): diff -r 8df08a3b17db -r e2654d53a643 app/soc/views/models/grading_project_survey.py --- a/app/soc/views/models/grading_project_survey.py Wed Jul 15 15:18:58 2009 +0200 +++ b/app/soc/views/models/grading_project_survey.py Wed Jul 15 15:28:02 2009 +0200 @@ -76,13 +76,10 @@ def _getSurveyTakeForm(self, survey, record, params, post_dict=None): """Returns the specific SurveyTakeForm needed for the take view. - Args: - survey: a Survey entity - record: a SurveyRecord instance if any exist - params: the params dict for the requesting View + For args see survey.View._getSurveyTakeForm(). Returns: - An instance of GradseSurveyTakeForm. + An instance of GradeSurveyTakeForm. """ grade_choices = (('pass', 'Pass'), ('fail', 'Fail'))