Add listing of ineligible Student Proposals to "View all Students Proposals" view. Now mentors and org admin can see what application has been marked as ineligible or withdrawn by student.
authorPawel Solyga <Pawel.Solyga@gmail.com>
Mon, 30 Mar 2009 22:16:55 +0000
changeset 2035 5b663ac5bb14
parent 2034 59de158c936d
child 2036 d23379c80b48
Add listing of ineligible Student Proposals to "View all Students Proposals" view. Now mentors and org admin can see what application has been marked as ineligible or withdrawn by student. Patch by: Pawel Solyga Reviewed by: to-be-reviewed
app/soc/views/models/organization.py
--- a/app/soc/views/models/organization.py	Mon Mar 30 21:16:18 2009 +0000
+++ b/app/soc/views/models/organization.py	Mon Mar 30 22:16:55 2009 +0000
@@ -285,10 +285,26 @@
     new_list = lists.getListContent(
         request, new_params, filter, idx=1, need_content=True)
 
+    ineligible_params = list_params.copy() # new proposals
+    ineligible_params['list_description'] = 'List of ineligible %s sent to %s ' % (
+    ineligible_params['name_plural'], org_entity.name)
+    ineligible_params['list_action'] = (redirects.getReviewRedirect, ineligible_params)
+
+    filter = {'org': org_entity,
+              'status': 'invalid'}
+
+    contents = []
+    ineligible_list = lists.getListContent(
+        request, ineligible_params, filter, idx=1, need_content=False)
+
     # fill contents with all the needed lists
     if new_list != None:
       contents.append(new_list)
+    
     contents.append(prop_list)
+    
+    if ineligible_list != None:
+      contents.append(ineligible_list)
 
     # call the _list method from base to display the list
     return self._list(request, list_params, contents, page_name, context)