Another batch of style fixes for Surveys.
authorLennard de Rijk <ljvderijk@gmail.com>
Wed, 15 Jul 2009 15:28:02 +0200
changeset 2660 e2654d53a643
parent 2659 8df08a3b17db
child 2661 03fcd4812eaa
Another batch of style fixes for Surveys.
app/soc/logic/models/grading_record.py
app/soc/templates/soc/survey/list/results_heading.html
app/soc/templates/soc/survey/public.html
app/soc/views/helper/access.py
app/soc/views/helper/redirects.py
app/soc/views/models/grading_project_survey.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
--- 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 @@
     <th>{{ property }}</th>
   {% endfor %}
   <th>Taken By</th>
-
   <th>Created On</th>
-
   <th>Last Modified</th>
-
   <th>Answer</th>
-
   {% if grades %}
     <th>Grade</th>
   {% endif %}
--- 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 %}
-      <div=survey_description>
+      <div id="survey_description">
         {{ entity.content|safe }}
       </div>
     {% endif %}
--- 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
--- 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):
--- 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'))