Changeset 1471 for WAeUP_SRP/trunk


Ignore:
Timestamp:
22 Feb 2007, 20:42:19 (18 years ago)
Author:
Henrik Bettermann
Message:

rebuilt PatchCPSUserFolderUserFolder

Location:
WAeUP_SRP/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/PatchCPSUserFolderUserFolder.py

    r1076 r1471  
    7979        if sc is None:
    8080            break
     81        sc_obj = sc.getContent()
     82        res_sc = self.portal_catalog(portal_type="Certificate",
     83                                     id = sc_obj.study_course)
     84        if len(res_sc) != 1:
     85            break
     86        cert_path = res_sc[0].getPath().split('/')
     87        fac_id = cert_path[-4]
     88        dep_id = cert_path[-3]
     89
     90
     91        # temporary sel-healing function
     92        # deprecated after reindexing the students_catalog
    8193        student_id = self.getStudentId()
    8294        res = self.students_catalog(id=student_id)
    8395        if len(res) != 1:
    8496            break
    85         dep_id = res[0].department
     97        self.students_catalog.modifyRecord(id = student_id,
     98                                                faculty = fac_id,
     99                                                department = dep_id,
     100                                                ) 
     101                                                         
     102           
    86103        res = self.portal_catalog(portal_type="Department",id=dep_id)
    87104        if len(res) != 1:
    88             #import pdb; pdb.set_trace()
    89             res_sc = self.portal_catalog(portal_type="Certificate",
    90                                          id = sc.getContent().study_course)
    91             if len(res_sc) != 1:
    92                 break
    93             cert_path = res_sc[0].getPath().split('/')
    94             fac_id = cert_path[-4]
    95             dep_id = cert_path[-3]
    96             res = self.portal_catalog(portal_type="Department",id=dep_id)
    97             if len(res) != 1:
    98                 break
    99             self.students_catalog.modifyRecord(id = student_id,
    100                                                   faculty = fac_id,
    101                                                   department = dep_id,
    102                                                   )
     105            break       
    103106        dynamic_roles = self.getRolesInContext(res[0].getObject())
    104107        for dr in ('ClearanceOfficer','CourseAdviser', 'SectionManager'):
  • WAeUP_SRP/trunk/skins/waeup_student/getStudyCourseInfo.py

    r1435 r1471  
    4545current_level = sbrain.level
    4646levels = context.objectIds()
    47 context.portal_workflow.doActionFor(context,'close_for_edit')
     47#context.portal_workflow.doActionFor(context,'close_for_edit')
    4848
    4949#levels.sort()
    5050#if int(current_level) > int(levels[-1]):
    5151#if not levels:
    52 #    context.invokeFactory('StudentStudyLevel',"%s" % current_level)   
     52#    context.invokeFactory('StudentStudyLevel',"%s" % current_level)
    5353#    level = getattr(context,"%s" % current_level)
    5454#    level.getContent().edit(mapping={'session': "2006/2007"})
  • WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt

    r1423 r1471  
    2525            
    2626        <a href="add_student"><strong>Add Student Record</strong></a>       
    27      
     27        &nbsp;&nbsp;&nbsp;&nbsp;
     28        <a href="paid_transfer_list"><strong>Export Transfer Students</strong></a>   
     29             
    2830        <h3> Search Student Section</h3><br />
    2931          You are logged in as member <span tal:replace="info/member|nothing" />
Note: See TracChangeset for help on using the changeset viewer.