Changeset 1286


Ignore:
Timestamp:
12 Jan 2007, 22:27:43 (18 years ago)
Author:
Henrik Bettermann
Message:

new student statistics
sc payment beautified
student workflow state and transition renamed

Location:
WAeUP_SRP/trunk
Files:
4 added
1 deleted
12 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/WAeUPTool.py

    r1285 r1286  
    9090        clear_doc = clear.getContent()
    9191        matric_no = clear_doc.matric_no.upper()
    92         picture ="%s/import/pictures_returning/%s.jpg" % (i_home,matric_no)
     92        picture1 ="%s/import/pictures_returning/%s.jpg" % (i_home,matric_no)
     93        picture2 ="%s/import/pictures_returning/%s.JPG" % (i_home,matric_no)
    9394        #import pdb;pdb.set_trace()
    94         if not os.path.exists(picture):
    95             return "Passport foto not found %s" % picture
    96         file = open(picture)
     95        if os.path.exists(picture1):
     96            file = open(picture1)
     97        elif os.path.exists(picture2):
     98            file = open(picture2)       
     99        else:
     100            return "passport picture not found %s" % picture
     101
    97102        outfile = file.read()
    98103        app_doc.manage_addFile('passport',
    99104                               file=outfile,
    100105                               title="%s.jpg" % matric_no)
    101         return "successfully loaded passport"
     106        return "successfully loaded passport picture"
    102107    ###)
    103108
  • WAeUP_SRP/trunk/profiles/default/layouts/student_schoolfee.xml

    r1283 r1286  
    77 <property name="flexible_widgets"/>
    88 <property name="validate_values_expr"></property>
    9  <property name="label"></property>
    10  <property name="label_edit"></property>
    11  <property name="is_i18n">False</property>
    129 <widget name="pin" meta_type="Scratchcard Pin Widget">
    13   <property name="title">Schoolfee Scratchcard</property>
     10  <property name="title">Schoolfee Scratch Card</property>
    1411  <property name="fields">
    1512   <element value="payment_id"/>
    1613  </property>
    17   <property name="label">Scratchcard</property>
    18   <property name="label_edit">Scratchcard</property>
     14  <property name="label">Access Code</property>
     15  <property name="label_edit">Access Code</property>
    1916  <property name="readonly_layout_modes"/>
    2017  <property name="hidden_layout_modes"/>
  • WAeUP_SRP/trunk/profiles/default/students_catalog.xml

    r1272 r1286  
    1 <?xml version="1.0"?>
     1z<?xml version="1.0"?>
    22<object name="portal_catalog" meta_type="WAeUP Table">
    33 <column value="id"/>
  • WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_wf/definition.xml

    r1259 r1286  
    9494  <exit-transition transition_id="create_content"/>
    9595  <exit-transition transition_id="defer"/>
     96  <exit-transition transition_id="pay_school_fee"/>
    9697  <exit-transition transition_id="reject_clearance"/>
    9798  <permission-map name="Delete objects" acquired="False">
     
    188189 <state state_id="returning" title="">
    189190  <exit-transition transition_id="create_content"/>
    190   <exit-transition transition_id="enter_school_fee_pin"/>
    191   <permission-map name="View" acquired="True">
    192    <permission-role>Owner</permission-role>
    193    <permission-role>SectionOfficer</permission-role>
    194   </permission-map>
    195  </state>
    196  <state state_id="school_fee_pin_entered" title="">
     191  <exit-transition transition_id="pay_school_fee"/>
     192  <permission-map name="View" acquired="True">
     193   <permission-role>Owner</permission-role>
     194   <permission-role>SectionOfficer</permission-role>
     195  </permission-map>
     196 </state>
     197 <state state_id="school_fee_paid" title="">
    197198  <exit-transition transition_id="create_content"/>
    198199  <exit-transition transition_id="register_courses"/>
     
    224225             new_state="admitted" trigger="USER"
    225226             before_script="" after_script="">
    226 
     227 
    227228  <guard>
    228229   <guard-role>SectionOfficer</guard-role>
     
    235236             new_state="admission_applied" trigger="USER"
    236237             before_script="" after_script="">
    237 
     238 
    238239  <guard>
    239240   <guard-role>SectionOfficer</guard-role>
     
    246247             new_state="cleared_and_validated"
    247248             trigger="USER" before_script="" after_script="">
    248 
     249 
    249250  <guard>
    250251   <guard-role>SectionOfficer</guard-role>
     
    257258             new_state="student_created" trigger="USER"
    258259             before_script="" after_script="">
    259 
     260 
    260261  <guard>
    261262   <guard-role>Manager</guard-role>
     
    268269             new_state="" trigger="USER" before_script=""
    269270             after_script="">
    270 
     271 
    271272  <guard>
    272273   <guard-role>Manager</guard-role>
     
    280281             new_state="deferred" trigger="USER"
    281282             before_script="" after_script="">
    282 
     283 
    283284  <guard>
    284285   <guard-role>SectionOfficer</guard-role>
     
    291292             new_state="application_pin_entered"
    292293             trigger="USER" before_script="" after_script="">
    293 
     294 
    294295  <guard>
    295296   <guard-role>SectionOfficer</guard-role>
     
    302303             new_state="clearance_pin_entered"
    303304             trigger="USER" before_script="" after_script="">
    304 
    305   <guard>
    306    <guard-role>SectionOfficer</guard-role>
    307    <guard-role>Owner</guard-role>
    308    <guard-role>Manager</guard-role>
    309    <guard-role>SectionManager</guard-role>
    310   </guard>
    311  </transition>
    312  <transition transition_id="enter_school_fee_pin" title=""
    313              new_state="school_fee_pin_entered"
    314              trigger="USER" before_script="" after_script="">
    315 
    316   <guard>
    317    <guard-role>Manager</guard-role>
    318    <guard-role>SectionManager</guard-role>
    319    <guard-role>Owner</guard-role>
     305 
     306  <guard>
     307   <guard-role>SectionOfficer</guard-role>
     308   <guard-role>Owner</guard-role>
     309   <guard-role>Manager</guard-role>
     310   <guard-role>SectionManager</guard-role>
    320311  </guard>
    321312 </transition>
     
    323314             new_state="finally_rejected" trigger="USER"
    324315             before_script="" after_script="">
    325 
     316 
    326317  <guard>
    327318   <guard-role>SectionOfficer</guard-role>
     
    332323 </transition>
    333324 <transition transition_id="notify_change_courses" title=""
    334              new_state="school_fee_pin_entered"
    335              trigger="USER" before_script="" after_script="">
    336 
     325             new_state="school_fee_paid" trigger="USER"
     326             before_script="" after_script="">
     327 
    337328  <guard>
    338329   <guard-role>CourseAdviser</guard-role>
    339330   <guard-role>Manager</guard-role>
    340331   <guard-role>SectionManager</guard-role>
     332  </guard>
     333 </transition>
     334 <transition transition_id="pay_school_fee" title=""
     335             new_state="school_fee_paid" trigger="USER"
     336             before_script="" after_script="">
     337 
     338  <guard>
     339   <guard-role>Manager</guard-role>
     340   <guard-role>SectionManager</guard-role>
     341   <guard-role>Owner</guard-role>
    341342  </guard>
    342343 </transition>
     
    344345             new_state="pume_failed" trigger="USER"
    345346             before_script="" after_script="">
    346 
     347 
    347348  <guard>
    348349   <guard-role>SectionOfficer</guard-role>
     
    355356             new_state="pume_passed" trigger="USER"
    356357             before_script="" after_script="">
    357 
     358 
    358359  <guard>
    359360   <guard-role>SectionOfficer</guard-role>
     
    366367             new_state="objection_raised" trigger="USER"
    367368             before_script="" after_script="">
    368 
     369 
    369370  <guard>
    370371   <guard-role>SectionOfficer</guard-role>
     
    378379             new_state="courses_registered" trigger="USER"
    379380             before_script="" after_script="">
    380 
     381 
    381382  <guard>
    382383   <guard-role>Manager</guard-role>
     
    388389             new_state="admission_rejected" trigger="USER"
    389390             before_script="" after_script="">
    390 
     391 
    391392  <guard>
    392393   <guard-role>SectionOfficer</guard-role>
     
    399400             new_state="clearance_pin_entered"
    400401             trigger="USER" before_script="" after_script="">
    401 
     402 
    402403  <guard>
    403404   <guard-role>SectionOfficer</guard-role>
     
    410411             new_state="clearance_requested" trigger="USER"
    411412             before_script="" after_script="">
    412 
     413 
    413414  <guard>
    414415   <guard-role>SectionOfficer</guard-role>
     
    421422             new_state="returning" trigger="USER"
    422423             before_script="" after_script="">
    423 
     424 
    424425  <guard>
    425426   <guard-role>SectionOfficer</guard-role>
     
    431432             new_state="courses_validated" trigger="USER"
    432433             before_script="" after_script="">
    433 
     434 
    434435  <guard>
    435436   <guard-role>CourseAdviser</guard-role>
     
    443444  <description>Time of the last transition</description>
    444445  <default>
    445 
     446   
    446447   <expression>state_change/getDateTime</expression>
    447448  </default>
  • WAeUP_SRP/trunk/skins/waeup_epayment/pay_by_sc.py

    r1283 r1286  
    3232    logger.info('"%s","certificate not found", "%s"' % (student_id,course))
    3333    prefix = ""
    34 else:   
     34else:
    3535    prefix = res[0].getObject().getContent().school_fee_code
    3636    if not prefix or prefix == 'none':
     
    7777now = DateTime.DateTime()
    7878info['date'] = now
    79 info['amount'] = "n/a" 
     79info['amount'] = "n/a"
    8080pin = info['order_id'] = ds.get('pin')
    81 info['type_code'] = "schoolfee_%s" % pin
    82 info['type_description'] = 'Schoolfee SC %s' % pin
     81info['type_code'] = "%s" % pin
     82info['type_description'] = 'School Fee SC %s' % pin
    8383payments.invokeFactory('Payment', p_id)
    8484payment = getattr(payments,p_id)
     
    8787payment.getContent().edit(mapping=info)
    8888wftool.doActionFor(payment,'close')
    89 wftool.doActionFor(student,'enter_school_fee_pin')
     89wftool.doActionFor(student,'pay_school_fee')
    9090url = "%s/payments" % (student.absolute_url())
    9191request.RESPONSE.redirect(url)
  • WAeUP_SRP/trunk/skins/waeup_epayment/payments_view.pt

    r1257 r1286  
    11<metal:html tal:define="info context/getPaymentsFolderInfo;
    2              is_so info/is_so;
     2             is_student context/isStudent;
    33             rows info/payments"
    44             >
     
    1515        </a>
    1616        <h3>
    17           <span tal:condition="python:is_so">
     17          <span tal:condition="not:is_student">
    1818            <span tal:content="info/student_name" />:
    1919          </span>
     20          <span tal:condition="is_student">
     21            My
     22          </span>         
    2023          <span tal:content="here/title_or_id" />
    2124        </h3>
  • WAeUP_SRP/trunk/skins/waeup_student/getSchoolFeePrefix.py

    r1274 r1286  
    1818if not res:
    1919    logger.info('"%s","certificate not found", "%s"' % (student_id,course))
    20     prefix = ""
    21 else:   
     20    prefix = "--"
     21else:
    2222    prefix = res[0].getObject().getContent().school_fee_code
    2323    if not prefix or prefix == 'none':
  • WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py

    r1179 r1286  
    150150    row['review_state'] = so.review_state
    151151    if info['review_state'] in ('returning',
    152                                 'school_fee_pin_entered',
     152                                'school_fee_paid',
    153153                                'courses_registered',
    154154                                'courses_validated',):
     
    163163                           so.portal_type not in ('StudentPume',) or\
    164164                           so.portal_type == 'StudentStudyCourse'
    165    
     165
    166166    items.append(row)
    167167info['items'] = items
  • WAeUP_SRP/trunk/skins/waeup_student/getStudentWorkflowInfo.py

    r1184 r1286  
    2929review_state = info['review_state'] = wf.getInfoFor(student,'review_state',None)
    3030info['returning'] = review_state in  ('returning',
    31                                            'school_fee_pin_entered',
     31                                           'school_fee_paid',
    3232                                           'courses_registered',
    3333                                           'courses_validated',
  • WAeUP_SRP/trunk/skins/waeup_student/pay_by_sc_form.pt

    r1274 r1286  
    1313      </metal:block>
    1414      <metal:block fill-slot="main">
    15         <h3>Pay Your 2005/2006 Schoolfee with Scratchcart!</h3>
     15        <h3>Pay Your 2006/2007 School Fee by Scratch Card!</h3>
    1616        <br />
    1717        <div tal:replace="structure rendered_main" />
  • WAeUP_SRP/trunk/skins/waeup_student/portlet_student_workflow_display.pt

    r1184 r1286  
    115115  </td></tr>
    116116  </span>
    117   <span tal:condition="python:info['review_state']=='school_fee_pin_entered'">
     117  <span tal:condition="python:info['review_state']=='school_fee_paid'">
    118118  <tr><td class="active">
    119119    <a href="" tal:attributes="href string:${info/url}/student_view">
     
    122122  </td></tr>
    123123  </span>
    124   <span tal:condition="python:info['review_state']!='school_fee_pin_entered'">
     124  <span tal:condition="python:info['review_state']!='school_fee_paid'">
    125125  <tr><td>
    126126    School fee paid
  • WAeUP_SRP/trunk/skins/waeup_student/search_students_form.pt

    r1259 r1286  
    1818      </span>
    1919      <span tal:condition="allowed" tal:omit-tag="">
    20         <a href="statistics_view"><strong>Student Statistics</strong></a>
     20        <a href="statistics_new_view"><strong>New Student Statistics</strong></a>
     21        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
     22        <a href="statistics_ret_view"><strong>Returning Student Statistics</strong></a>
    2123        <h3> Search Student Section</h3><br />
    2224          You are logged in as member <span tal:replace="info/member|nothing" />
Note: See TracChangeset for help on using the changeset viewer.