Changeset 2412 for WAeUP_SRP/base


Ignore:
Timestamp:
22 Oct 2007, 05:53:42 (17 years ago)
Author:
Henrik Bettermann
Message:

more comments

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/cps_custom/logged_in.py

    r2407 r2412  
    4545        student_app = getattr(student,'application',None)
    4646        student_per = getattr(student,'personal',None)
    47        
    48         #########################################################
    49        
     47
     48        #########################################################
     49
    5050        # perform makeStudentData for returning students who login for the first time
    5151        # the returning key comes from set_access_data
    52              
     52
    5353        if request.has_key('returning') and  student_app is None:
    5454            email=request.get("email")
     
    6565        elif student_app is None:
    6666            context.waeup_tool.makeStudentData(str(member))
     67           
     68        #########################################################
     69
    6770        student_app = getattr(student,'application',None)
    68        
    69         #########################################################
    70        
    71         # add missing payments folders
    72        
     71
     72        #########################################################
     73
     74        # add missing payments folder
     75
    7376        if 'payments' not in student.objectIds():
    7477            student.invokeFactory('PaymentsFolder','payments')
     
    7881            d['Title'] = 'Online Payments'
    7982            payments.getContent().edit(mapping=d)
    80            
    81         #########################################################           
    82            
     83
     84        #########################################################
     85
    8386        #student_pume = getattr(student,'pume',None)
    8487        s_review_state = context.getStudentReviewState(student.id)
     
    9093
    9194        #########################################################
    92        
     95
    9396        # save email and phone of returning students after all objects have been created
    9497
     
    106109            per_doc.edit(mapping = {'email' : email, 'phone' : phone})
    107110            wftool.doActionFor(student_app,'close')
    108            
    109         #########################################################     
    110        
     111
     112        #########################################################
     113
    111114        # look for passport pictures of returning students
    112115
     
    120123
    121124        #########################################################
    122        
     125
    123126        # look for passport pictures of new students
    124127
     
    131134
    132135        #########################################################
    133        
     136
    134137        # perform necessary updates for new students
    135138
    136139        # 1. add pin and application date to app_doc
    137        
     140
    138141        if s_review_state in ("student_created","admitted") and\
    139142                             a_review_state == 'created' :
     
    143146            da = {}
    144147            pin = request.get('pin')
    145            
    146             # if the student comes directly, add missing pin (fix)
     148
     149            # if the student comes directly, add missing pin or pin with wrong syntax (fix)
    147150            if not pin:
    148151                jamb_reg_no = app_doc.jamb_reg_no
     
    160163            da['app_ac_date'] = current
    161164            app_doc.edit(mapping = da)
    162            
    163         # 2. same as 1 but without opening app_doc   
    164            
     165
     166        # 2. same as 1 but without opening app_doc, assuming that the student already logged in
     167        #    but the pin is missing in app_doc (fix)
     168
    165169        elif s_review_state in ("admitted") and a_review_state == 'opened' and\
    166170                                            not app_doc.app_ac_pin:
     
    179183                da['app_ac_pin'] = pin
    180184                app_doc.edit(mapping = da)
    181                
    182         # 2. open personal object. This should be done in clearance_edit.       
    183                
     185
     186        # 3. open personal object (fix). This should be done in clearance_edit.
     187
    184188        elif s_review_state in ("cleared_and_validated",) and\
    185189                             p_review_state == 'created' :
    186190            wftool.doActionFor(student_per,'open')
    187            
    188         #########################################################
    189            
     191
     192        #########################################################
     193
    190194        res = context.students_catalog(id = str(member))
    191195        matric_no = res[0].matric_no
     
    193197
    194198        #########################################################
    195        
     199
    196200        # fetch current verdict via getVerdict
    197201
     
    208212                study_course_doc.edit(mapping = dsc)
    209213                wftool.doActionFor(study_course,'close_for_edit')
    210                
    211         #########################################################
    212                
     214
     215        #########################################################
     216
    213217        has_results = context.results_import(matric_no = matric_no)
    214218
    215219        #########################################################
    216        
     220
    217221        # determine appropriate redirect url
    218222
Note: See TracChangeset for help on using the changeset viewer.