Added redirect for editing a GradingRecord.
authorLennard de Rijk <ljvderijk@gmail.com>
Mon, 13 Jul 2009 11:02:57 +0200
changeset 2627 06d26fded0db
parent 2626 17dd9ada27cb
child 2628 0440ac4e5f34
Added redirect for editing a GradingRecord. The view for this will be added in a later commit.
app/soc/views/helper/redirects.py
--- a/app/soc/views/helper/redirects.py	Mon Jul 13 10:18:14 2009 +0200
+++ b/app/soc/views/helper/redirects.py	Mon Jul 13 11:02:57 2009 +0200
@@ -392,6 +392,16 @@
                                      entity.key().id_or_name())
 
 
+def getEditGradingRecordRedirect(entity, params):
+  """Returns the redirect for editing a given GradingRecord.
+  """
+
+  return '/%s/edit_record/%s?id=%s' % (
+      params['url_name'],
+      entity.grading_survey_group.key().id_or_name(),
+      entity.key().id_or_name())
+
+
 def getToSRedirect(presence):
   """Returns link to 'show' the ToS Document if it exists, None otherwise.