equal
deleted
inserted
replaced
366 """ |
366 """ |
367 |
367 |
368 return '/survey/list_results/%s/%s' % (prefix, entity.key().id_or_name()) |
368 return '/survey/list_results/%s/%s' % (prefix, entity.key().id_or_name()) |
369 |
369 |
370 |
370 |
|
371 def getTakeProjectSurveyRedirect(entity, info): |
|
372 """Returns the redirect for taking a Survey for the given Student Project. |
|
373 |
|
374 Args: |
|
375 entity: a StudentProject entity |
|
376 info: a dictionary contain a survey and params entry |
|
377 """ |
|
378 |
|
379 survey_entity = info['survey'] |
|
380 params = info['params'] |
|
381 |
|
382 return '/%s/take/%s?project=%s' %(params['url_name'], |
|
383 survey_entity.key().id_or_name(), |
|
384 entity.key().id_or_name()) |
|
385 |
|
386 |
371 def getToSRedirect(presence): |
387 def getToSRedirect(presence): |
372 """Returns link to 'show' the ToS Document if it exists, None otherwise. |
388 """Returns link to 'show' the ToS Document if it exists, None otherwise. |
373 |
389 |
374 Args: |
390 Args: |
375 presence: Presence entity that may or may not have a tos property |
391 presence: Presence entity that may or may not have a tos property |