Added getTakeProjectSurveyRedirect.
This redirect is used when taking a ProjectSurvey.
--- a/app/soc/views/helper/redirects.py Thu Jul 02 16:51:31 2009 +0200
+++ b/app/soc/views/helper/redirects.py Thu Jul 02 16:53:13 2009 +0200
@@ -368,6 +368,22 @@
return '/survey/list_results/%s/%s' % (prefix, entity.key().id_or_name())
+def getTakeProjectSurveyRedirect(entity, info):
+ """Returns the redirect for taking a Survey for the given Student Project.
+
+ Args:
+ entity: a StudentProject entity
+ info: a dictionary contain a survey and params entry
+ """
+
+ survey_entity = info['survey']
+ params = info['params']
+
+ return '/%s/take/%s?project=%s' %(params['url_name'],
+ survey_entity.key().id_or_name(),
+ entity.key().id_or_name())
+
+
def getToSRedirect(presence):
"""Returns link to 'show' the ToS Document if it exists, None otherwise.