Changeset 4006


Ignore:
Timestamp:
8 Mar 2009, 08:25:54 (16 years ago)
Author:
Henrik Bettermann
Message:

resolve ticket aaue #16

Enable assigment of clearance officer role on certificate level. Do not show local roles on search student page.

Location:
WAeUP_SRP/trunk
Files:
7 added
6 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/CHANGES.txt

    r3858 r4006  
    138138-----------------
    139139- implement password notification module
     140
     1411.28 (2009-03-08)
     142-----------------
     143
     144- Enable assigment of  clearance officer role on certificate level. Do not show local roles on search student page.
  • WAeUP_SRP/trunk/patches/PatchCPSUserFolderUserFolder.py

    r3903 r4006  
    126126            allowed = set(('CourseAdviser', 'SectionManager'))
    127127        else:
    128             res = self.portal_catalog(portal_type="Department",id=st_entry.department)
    129128            allowed = set(('ClearanceOfficer', 'SectionManager'))
    130             if len(res) != 1:
    131                 break
    132             context_obj = res[0].getObject()
     129            context_obj = getCertificateObject(self,st_entry)
     130            if context_obj is None:
     131                break   
     132            #res = self.portal_catalog(portal_type="Department",id=st_entry.department)
     133            #if len(res) != 1:
     134            #    break
     135            #context_obj = res[0].getObject()
    133136        dynamic_roles = set(self.getRolesInContext(context_obj))
    134137        intersect = dynamic_roles & allowed
  • WAeUP_SRP/trunk/profiles/default/types/Certificate.xml

    r3689 r4006  
    5252 <action title="Delegate" action_id="localroles" category="object"
    5353    condition_expr="" url_expr="string:${object_url}/folder_localrole_form"
    54     visible="False">
     54    visible="True">
    5555  <permission value="Modify portal content"/>
    5656 </action>
     
    6060    visible="True">
    6161  <permission value="Modify portal content"/>
    62  </action>
     62 </action> 
    6363</object>
  • WAeUP_SRP/trunk/skins/waeup_directory/search_members.py

    r1962 r4006  
    8585    user_id = item[0]
    8686    data = item[1]
    87     query = In('portal_type',('Faculty','Department','StudyLevel')) &\
     87    query = In('portal_type',('Faculty','Department','StudyLevel','Certificate')) &\
    8888            In('localUsersWithRoles',('user:%s' % user_id,)) &\
    8989            ~ Eq('Creator',user_id)
  • WAeUP_SRP/trunk/skins/waeup_student/search_students.py

    r3904 r4006  
    5656user_info['departments'] = []
    5757user_info['faculties'] = []
     58user_info['certificates'] = []
    5859co_view = False
    5960ca_view = False
     
    6162faculties =  session_data.get('faculties',None)
    6263departments = session_data.get('departments',None)
     64certificates = session_data.get('certificates',None)
    6365certificate_levels = session_data.get('certificate_levels',None)
    6466# determine local roles
     
    6668    default_state = "clearance_requested"
    6769    co_view = True
    68     if faculties is None or departments is None:
     70    if faculties is None or departments is None or certificates is None:
    6971        logger.info('ClearanceOfficer %s initiated student_search' % member)
    70         query = In('portal_type',('Faculty','Department')) &\
     72        query = In('portal_type',('Faculty','Department','Certificate')) &\
    7173                 In('localUsersWithRoles', ("user:%s" % member,))
    7274        res = aq_portal(query)
    7375        faculties = [f.getId for f in res if f.portal_type == 'Faculty']
    7476        departments = [f.getId for f in res if f.portal_type == 'Department']
     77        certificates = [f.getId for f in res if f.portal_type == 'Certificate']
    7578    user_info['faculties'] = session_data['faculties'] = faculties
    7679    user_info['departments'] = session_data['departments'] =  departments
     80    user_info['certificates'] = session_data['certificates'] =  certificates
    7781if "CourseAdvisers" in member.getGroups():
    7882    default_state = "courses_registered"
     
    196200if co_view and state.startswith('clear'):
    197201    if query is not None:
    198         query = query & In('faculty',faculties) | In('department',departments)
     202        query = query & (In('faculty',faculties) | In('department',departments) | In('course',certificates))
    199203    else:
    200         query = In('faculty',faculties) | In('department',departments)
     204        query = In('faculty',faculties) | In('department',departments) | In('course',certificates)
    201205elif ca_view and state.startswith('courses'):
    202206    courses = [cl.split('/')[0] for cl in certificate_levels]
     
    206210
    207211# search students_catalog
     212
     213#return query
    208214
    209215student_records = aq_students(query,('matric_no','jamb_reg_no'))
  • WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt

    r3709 r4006  
    55              students options/students;
    66              info options/info|nothing;
    7               is_so context/isSectionOfficer;
    87              allowed options/allowed|nothing;"
    98              >
     
    1211    </span>
    1312    <span tal:condition="allowed" tal:omit-tag="">
    14       <strong>
    15         <nobr><a href="statistics_new_view">New Student Statistics</a>
    16         &nbsp;&nbsp;&nbsp;&nbsp;</nobr>
    17         <nobr><a href="statistics_ret_view">Returning Student Statistics</a>
    18         &nbsp;&nbsp;&nbsp;&nbsp;</nobr>
    19         <nobr><a href="statistics_simple_view">Basic Student Statistics</a>
    20         &nbsp;&nbsp;&nbsp;&nbsp;</nobr>     
    21         <span tal:condition="is_so">
    22           <nobr><a href="apply_admission_manage">Application Process</a>
    23           &nbsp;&nbsp;&nbsp;&nbsp;</nobr>     
    24           <nobr><a href="view_logs">View Log Files</a>
    25           &nbsp;&nbsp;&nbsp;&nbsp;</nobr>
    26           <nobr><a href="add_student">Add Student Record</a>       
    27           &nbsp;&nbsp;&nbsp;&nbsp;</nobr>
    28           <nobr><a href="deactivate_students">Deactivate Student Record(s)</a></nobr>
    29         </span>
    30       </strong>
     13      <metal:block use-macro="here/students_actions/macros/students_actions" />
    3114      <h3> Search Student Section</h3><br />
    32       You are logged in as member <span tal:replace="info/member|nothing" />
    33       <span tal:condition="info/faculties|nothing" tal:omit-tag="">
    34         who is ClearanceOfficer for Faculty
    35         <span tal:repeat="faculty info/faculties" tal:content="faculty" />
    36       </span>
    37       <span tal:condition="info/departments|nothing" tal:omit-tag="">
    38         and <span tal:repeat="department info/departments|nothing" tal:content="department"/></span>.
    39       <br /><br />
    4015      <span tal:replace="structure rendered" />
    4116      <metal:block use-macro="here/generic_lib_portal_message/macros/portal_message" />
Note: See TracChangeset for help on using the changeset viewer.