345 """ |
345 """ |
346 |
346 |
347 return '/document/list/%s/%s' % (prefix, entity.key().id_or_name()) |
347 return '/document/list/%s/%s' % (prefix, entity.key().id_or_name()) |
348 |
348 |
349 |
349 |
350 def getCreateSurveyRedirect(entity, prefix): |
350 def getCreateSurveyRedirect(entity, prefix, url_name): |
351 """Returns the redirect for new documents. |
351 """Returns the redirect for new surveys. |
352 """ |
352 """ |
353 |
353 |
354 return '/survey/create/%s/%s' % (prefix, entity.key().id_or_name()) |
354 return '/%s/create/%s/%s' % (url_name, prefix, entity.key().id_or_name()) |
355 |
355 |
356 |
356 |
357 def getListSurveysRedirect(entity, prefix): |
357 def getListSurveysRedirect(entity, prefix, url_name): |
358 """Returns the redirect for listing documents. |
358 """Returns the redirect for listing surveys. |
359 """ |
359 """ |
360 |
360 |
361 return '/survey/list/%s/%s' % (prefix, entity.key().id_or_name()) |
361 return '/%s/list/%s/%s' % (url_name, prefix, entity.key().id_or_name()) |
362 |
|
363 |
|
364 def getListSurveyResultsRedirect(entity, prefix): |
|
365 """Returns the redirect for listing documents. |
|
366 """ |
|
367 |
|
368 return '/survey/list_results/%s/%s' % (prefix, entity.key().id_or_name()) |
|
369 |
362 |
370 |
363 |
371 def getTakeProjectSurveyRedirect(entity, info): |
364 def getTakeProjectSurveyRedirect(entity, info): |
372 """Returns the redirect for taking a Survey for the given Student Project. |
365 """Returns the redirect for taking a Survey for the given Student Project. |
373 |
366 |