equal
deleted
inserted
replaced
20 __authors__ = [ |
20 __authors__ = [ |
21 '"Lennard de Rijk" <ljvderijk@gmail.com>', |
21 '"Lennard de Rijk" <ljvderijk@gmail.com>', |
22 ] |
22 ] |
23 |
23 |
24 |
24 |
|
25 from django.utils.translation import ugettext |
|
26 |
25 from soc.views.helper import redirects |
27 from soc.views.helper import redirects |
|
28 |
|
29 |
|
30 DEF_NO_RECORD_AVAILABLE_MESSAGE = ugettext('No Record Available') |
26 |
31 |
27 |
32 |
28 def getStudentProposalInfo(ranking, proposals_keys): |
33 def getStudentProposalInfo(ranking, proposals_keys): |
29 """Returns a function that returns information about the rank and assignment. |
34 """Returns a function that returns information about the rank and assignment. |
30 |
35 |
144 if record_entity: |
149 if record_entity: |
145 # SurveyRecord has been found store the import data in info |
150 # SurveyRecord has been found store the import data in info |
146 info['taken_by'] = record_entity.user.name |
151 info['taken_by'] = record_entity.user.name |
147 info['taken_on'] = record_entity.modified |
152 info['taken_on'] = record_entity.modified |
148 else: |
153 else: |
149 info['taken_by'] = 'No Record Available' |
154 info['taken_by'] = DEF_NO_RECORD_AVAILABLE_MESSAGE |
150 info['taken_on'] = 'No Record Available' |
155 info['taken_on'] = DEF_NO_RECORD_AVAILABLE_MESSAGE |
151 |
156 |
152 take_redirect_info = {'survey': survey_entity, |
157 take_redirect_info = {'survey': survey_entity, |
153 'params': survey_params} |
158 'params': survey_params} |
154 info['take_url'] = redirects.getTakeProjectSurveyRedirect( |
159 info['take_url'] = redirects.getTakeProjectSurveyRedirect( |
155 project_entity, take_redirect_info) |
160 project_entity, take_redirect_info) |