app/soc/views/models/organization.py
changeset 2202 f6a1c141f51e
parent 2201 8e8b1f0ad87f
child 2207 f283f7b99427
equal deleted inserted replaced
2201:8e8b1f0ad87f 2202:f6a1c141f51e
   207 
   207 
   208     For params see base.View.public().
   208     For params see base.View.public().
   209     """
   209     """
   210 
   210 
   211     from soc.logic.models.ranker_root import logic as ranker_root_logic
   211     from soc.logic.models.ranker_root import logic as ranker_root_logic
       
   212     from soc.logic.models import student_proposal as sp_logic
   212     from soc.models import student_proposal
   213     from soc.models import student_proposal
   213     from soc.views.helper import list_info as list_info_helper
   214     from soc.views.helper import list_info as list_info_helper
   214     from soc.views.models import student_proposal as student_proposal_view
   215     from soc.views.models import student_proposal as student_proposal_view
   215 
   216 
   216     try:
   217     try:
   270     assigned_proposals = []
   271     assigned_proposals = []
   271 
   272 
   272     # only when the program allows allocations 
   273     # only when the program allows allocations 
   273     # to be seen we should color the list
   274     # to be seen we should color the list
   274     if org_entity.scope.allocations_visible:
   275     if org_entity.scope.allocations_visible:
   275       assigned_proposals = getProposalsToBeAcceptedForOrg(org_entity)
   276       assigned_proposals = sp_logic.getProposalsToBeAcceptedForOrg(org_entity)
   276 
   277 
   277       # show the amount of slots assigned on the webpage
   278       # show the amount of slots assigned on the webpage
   278       context['slots_visible'] = True
   279       context['slots_visible'] = True
   279 
   280 
       
   281     ranking_keys = dict([(k.key(),v) for k,v in ranking.iteritems()])
       
   282     proposal_keys = [i.key() for i in assigned_proposals]
       
   283 
   280     # update the prop_list with the ranking and coloring information
   284     # update the prop_list with the ranking and coloring information
   281     prop_list['info'] = (list_info_helper.getStudentProposalInfo(ranking,
   285     prop_list['info'] = (list_info_helper.getStudentProposalInfo(ranking_keys,
   282         assigned_proposals), None)
   286         proposal_keys), None)
   283 
   287 
   284     # check if the current user is a mentor
   288     # check if the current user is a mentor
   285     user_entity = user_logic.logic.getForCurrentAccount()
   289     user_entity = user_logic.logic.getForCurrentAccount()
   286 
   290 
   287     fields = {'user': user_entity,
   291     fields = {'user': user_entity,