Changeset 2407 for WAeUP_SRP/base/skins


Ignore:
Timestamp:
21 Oct 2007, 06:21:25 (17 years ago)
Author:
Henrik Bettermann
Message:

put comments into logged_in.py

remove pume-object-relevant code

(but ensure that existing pume objects are not displayed)

Location:
WAeUP_SRP/base/skins
Files:
4 deleted
5 edited

Legend:

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

    r2217 r2407  
    4545        student_app = getattr(student,'application',None)
    4646        student_per = getattr(student,'personal',None)
     47       
     48        #########################################################
     49       
     50        # perform makeStudentData for returning students who login for the first time
     51        # the returning key comes from set_access_data
     52             
    4753        if request.has_key('returning') and  student_app is None:
    4854            email=request.get("email")
     
    6066            context.waeup_tool.makeStudentData(str(member))
    6167        student_app = getattr(student,'application',None)
     68       
     69        #########################################################
     70       
     71        # add missing payments folders
     72       
    6273        if 'payments' not in student.objectIds():
    6374            student.invokeFactory('PaymentsFolder','payments')
     
    6778            d['Title'] = 'Online Payments'
    6879            payments.getContent().edit(mapping=d)
    69         student_pume = getattr(student,'pume',None)
     80           
     81        #########################################################           
     82           
     83        #student_pume = getattr(student,'pume',None)
    7084        s_review_state = context.getStudentReviewState(student.id)
    7185        a_review_state = wftool.getInfoFor(student_app,'review_state',None)
     
    7488        logger.info('%s logged in, review_state %s' % (member,s_review_state))
    7589        app_doc = student_app.getContent()
     90
     91        #########################################################
     92       
     93        # save email and phone of returning students after all objects have been created
    7694
    7795        if request.has_key('returning'):
     
    88106            per_doc.edit(mapping = {'email' : email, 'phone' : phone})
    89107            wftool.doActionFor(student_app,'close')
    90 
    91         #from Products.zdb import set_trace;set_trace()
     108           
     109        #########################################################     
     110       
     111        # look for passport pictures of returning students
     112
    92113        if s_review_state == 'returning' and 'passport' not in app_doc.objectIds():
    93114            folder = 'pictures_returning'
     
    96117            msg = context.waeup_tool.loadStudentFoto(student,filename,folder)
    97118            logger.info('%s (%s), %s' % (member,s_review_state,msg))
     119
     120
     121        #########################################################
     122       
     123        # look for passport pictures of new students
     124
    98125        if s_review_state in ('admitted', 'clearance_pin_entered', 'clearance_requested')  and 'passport' not in app_doc.objectIds():
    99126            folder = 'pictures_admitted_latest'
     
    101128            msg = context.waeup_tool.loadStudentFoto(student,filename,folder)
    102129            logger.info('%s (%s), %s' % (member,s_review_state,msg))
     130
     131
     132        #########################################################
     133       
     134        # perform necessary updates for new students
     135
     136        # 1. add pin and application date to app_doc
     137       
    103138        if s_review_state in ("student_created","admitted") and\
    104139                             a_review_state == 'created' :
    105140            wftool.doActionFor(student_app,'open')
    106             if student_pume is not None:
    107               wftool.doActionFor(student_pume,'close')
     141            #if student_pume is not None:
     142            #  wftool.doActionFor(student_pume,'close')
    108143            da = {}
    109144            pin = request.get('pin')
     145           
     146            # if the student comes directly, add missing pin (fix)
    110147            if not pin:
    111148                jamb_reg_no = app_doc.jamb_reg_no
     
    123160            da['app_ac_date'] = current
    124161            app_doc.edit(mapping = da)
     162           
     163        # 2. same as 1 but without opening app_doc   
     164           
    125165        elif s_review_state in ("admitted") and a_review_state == 'opened' and\
    126166                                            not app_doc.app_ac_pin:
     
    139179                da['app_ac_pin'] = pin
    140180                app_doc.edit(mapping = da)
     181               
     182        # 2. open personal object. This should be done in clearance_edit.       
     183               
    141184        elif s_review_state in ("cleared_and_validated",) and\
    142185                             p_review_state == 'created' :
    143186            wftool.doActionFor(student_per,'open')
     187           
     188        #########################################################
     189           
    144190        res = context.students_catalog(id = str(member))
    145191        matric_no = res[0].matric_no
    146192        verdict = res[0].verdict
     193
     194        #########################################################
     195       
     196        # fetch current verdict via getVerdict
     197
    147198        if s_review_state in ('returning','school_fee_paid') and not verdict:
    148199            results = context.results_import(matric_no = matric_no)
     
    157208                study_course_doc.edit(mapping = dsc)
    158209                wftool.doActionFor(study_course,'close_for_edit')
     210               
     211        #########################################################
     212               
    159213        has_results = context.results_import(matric_no = matric_no)
     214
     215        #########################################################
     216       
     217        # determine appropriate redirect url
     218
    160219        if s_review_state == "application_pin_entered":
    161220            redirect_url = "%s/application_edit_form" % student.absolute_url()
     
    172231        else:
    173232            redirect_url = "%s/student_index" % student.absolute_url()
     233
     234
    174235    else:
    175236        logger.info('%s logged in' % (member))
  • WAeUP_SRP/base/skins/waeup_layout/portlet_student_workflow_display.pt

    r2243 r2407  
    1111
    1212<table class="registration" tal:condition="not:info/cr">
    13   <span tal:condition="python:path('info/review_state')=='application_pin_entered'">
    14   <tr><td class="active">
    15     <a href="" tal:attributes="href string:${info/url}/application_edit_form">
    16     Admission started
    17     </a>
    18   </td></tr>
    19   </span>
    20   <span tal:condition="python:path('info/review_state')!='application_pin_entered'">
    21   <tr><td>
    22     Admission started
    23   </td></tr>
    24   </span>
    25   <span tal:condition="python:path('info/review_state')=='admission_applied'">
    26   <tr><td class="active">
    27     <a href="" tal:attributes="href string:${info/url}/application_view">
    28     Admission requested
    29     </a>
    30   </td></tr>
    31   </span>
    32   <span tal:condition="python:path('info/review_state')!='admission_applied'">
    33   <tr><td>
    34     Admission requested
    35   </td></tr>
    36   </span>
    37   <span tal:condition="python:path('info/review_state')=='pume_passed'">
    38   <tr><td class="active">PUME passed</td></tr>
    39   </span>
    40   <span tal:condition="python:path('info/review_state')=='pume_failed'">
    41   <tr><td class="stopped">PUME failed</td></tr>
    42   </span>
    43   <span tal:condition="python:not path('info/review_state') in ('pume_passed', 'pume_failed',)">
    44   <tr><td>PUME passed</td></tr>
    45   </span> 
    4613  <span tal:condition="python:path('info/review_state')=='admitted'">
    4714  <tr>
  • WAeUP_SRP/base/skins/waeup_student/check_admission.py

    r2002 r2407  
    6969    student = getattr(context.campus.students, s_id)
    7070    review_state = wf.getInfoFor(student,'review_state',None)
    71     if review_state == "admission_rejected":
    72         url = "%s/campus/students/%s/pume/admission_rejected_view" % (context.portal_url(),s_id)
    73         return redirect(url)
     71    #if review_state == "admission_rejected":
     72    #    url = "%s/campus/students/%s/pume/admission_rejected_view" % (context.portal_url(),s_id)
     73    #    return redirect(url)
    7474    pw = str(ds.get('app_ac_pin_n'))
    7575    args = {}
  • WAeUP_SRP/base/skins/waeup_student/getStudentFolderInfo.py

    r1871 r2407  
    8080              'StudentStudyCourse': 'study_course_view',
    8181              'PaymentsFolder': 'payments_view',
    82               'StudentPume': 'pume_view',
    8382              }
    8483sos = context.portal_catalog(container_path=student_path_root)
  • WAeUP_SRP/base/skins/waeup_student/getStudentInfo.py

    r2043 r2407  
    5757if student is None or student.portal_type != "Student":
    5858    return None
    59 ##res = context.portal_catalog(id = student_id,portal_type='Student')
    60 ##if not res:# or len(res) > 1:
    61 ##    return None
    62 ##brain = res[-1]
    63 ##student = brain.getObject()
    6459
    6560info['review_state'] = context.getStudentReviewState()
     
    7065info['app'] = student.application
    7166info['app_doc'] = student.application.getContent()
    72 #info['per'] = getattr(student,'personal',None)
    73 #info['sex'] = 'male'
    74 #if info['per'] is not None:
    75 #    info['per_doc'] = student.personal.getContent()
    76 #    if info['per_doc'].sex:
    77 #        info['sex'] = 'female'
    78 #else:
    79 #    if info['app_doc'].jamb_sex == "F":
    80 #        info['sex'] = 'female'
     67
    8168course = getattr(student,'study_course',None)
    8269if course:
     
    9582    else:
    9683        info['course'] = None
    97 #
    98 
    99 #clear = getattr(student,'clearance',None)
    100 #info['clear'] = clear
    101 #if clear is not None:
    102 #    info['clear_doc'] = clear.getContent()
    103 #    info['clear_review_state'] = wf.getInfoFor(clear,'review_state',None)
    104 #
    105 #pume = getattr(student,'pume',None)
    106 #info['pume'] = pume
    107 #if pume is not None:
    108 #    info['pume_doc'] = pume.getContent()
    109 #    info['pume_review_state'] = wf.getInfoFor(pume,'review_state',None)
    110 #else:
    111 #    info['pume'] = None
    11284
    11385if not with_items:
Note: See TracChangeset for help on using the changeset viewer.