Changeset 2738


Ignore:
Timestamp:
22 Nov 2007, 10:28:41 (17 years ago)
Author:
joachim
Message:

parttime application

Location:
WAeUP_SRP
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPTables.py

    r2716 r2738  
    125125    def deleteRecord(self, uid):
    126126        self.uncatalog_object(uid)
     127
     128    def getRecordByKey(self,key):
     129        if not key:
     130            return None
     131        res = self.evalAdvancedQuery(Eq(self.key,key))
     132        if res:
     133            return res[0]
     134        return None
    127135
    128136    def searchAndSetRecord(self, **data):
     
    602610    #               "course_admitted",
    603611    #               )
    604     ###)
    605612
    606613    def __init__(self,name=None):
     
    13961403
    13971404class PaymentsCatalog(WAeUPTable): ###(
     1405    security = ClassSecurityInfo()
    13981406
    13991407    meta_type = 'WAeUP Payments Catalog'
    14001408    name = "students_catalog"
    1401     key = "id"
     1409    key = "key"
    14021410    def __init__(self,name=None):
    14031411        if name ==  None:
     
    14051413        WAeUPTable.__init__(self, name)
    14061414
     1415    security.declarePrivate('notify_event_listener') ###(
     1416    def notify_event_listener(self,event_type,object,infos):
     1417        "listen for events"
     1418        if not infos.has_key('rpath'):
     1419            return
     1420        pt = getattr(object,'portal_type',None)
     1421        mt = getattr(object,'meta_type',None)
     1422        data = {}
     1423        if pt == 'Payment' and mt == 'CPS Proxy Folder':
     1424            order_id = object.id
     1425            if event_type == "sys_add_object":
     1426                try:
     1427                    self.addRecord(order_id = order_id)
     1428                except ValueError:
     1429                    pass
     1430                return
     1431            elif event_type == 'sys_del_object':
     1432                self.deleteRecord(order_id)
     1433        if pt != 'Payment' or mt == 'CPS Proxy Folder':
     1434            return
     1435        if event_type not in ('sys_modify_object'):
     1436            return
     1437        for field in self.schema():
     1438            data[field] = getattr(object,field)
     1439        rpl = infos['rpath'].split('/')
     1440        student_id = rpl[-3]
     1441        data['student_id'] = student_id
     1442        self.modifyRecord(**data)
     1443    ###)
     1444
    14071445
    14081446InitializeClass(PaymentsCatalog)
  • WAeUP_SRP/base/Widgets.py

    r2723 r2738  
    769769##            return 0
    770770        widget_id = self.getWidgetId()
    771         value = makeCertificateCode(datastructure[widget_id]).upper()
     771        #value = makeCertificateCode(datastructure[widget_id]).upper()
     772        value = datastructure[widget_id].upper()
    772773        id_pat_str = r"\S"
    773774        inv_id_pat = re.compile(r"^%s$" % id_pat_str)
     
    11481149        widget_id = self.getWidgetId()
    11491150        v = datastructure[widget_id]
     1151        if not v:
     1152            v = []
    11501153        err = 0
    11511154        s = datastructure[widget_id+'_s'].strip()
  • WAeUP_SRP/base/skins/waeup_layout/layout_apply_admission_create.pt

    r2329 r2738  
    33<!-- a layout_lib macro -->
    44<!-- $Id: layout_apply_admission_create.pt 2141 2007-08-21 16:50:33Z henrik $ -->
    5 
    65<metal:block define-macro="default_table"
    7   tal:define="layout options/layout;
    8   ds options/datastructure;
    9   dm ds/getDataModel;
    10   creation creation|nothing;
    11   metadata metadata|nothing;
    12   cpsmcat nocall:here/translation_service;
    13   apply request/apply_button|nothing;">
    14  
    15   <table  cellpadding="2" cellspacing="2" summary="Form layout" border=0
    16        tal:condition="layout/rows">
    17   <tr tal:repeat="row layout/rows" valign="top">
    18 
    19   <span tal:repeat="cell row">
    20         <tal:block define="widget cell/widget;
    21                            wid widget/getWidgetId;
    22                            err python:ds.getError(wid);
    23                            err_mapping python:ds.getErrorMapping(wid);
    24                            widget_css_class cell/widget_css_class|nothing;
    25                            css_class python:test(err, 'row error','row')">
     6             tal:define="layout options/layout;
     7             ds options/datastructure;
     8             dm ds/getDataModel;
     9             creation creation|nothing;
     10             metadata metadata|nothing;
     11             cpsmcat nocall:here/translation_service;
     12             apply request/apply_button|nothing;"
     13             >
     14    <table  cellpadding="2" cellspacing="2" summary="Form layout" border=0
     15            tal:condition="layout/rows">
     16      <span tal:repeat="row layout/rows" valign="top" tal:omit-tag="">
     17        <span tal:repeat="cell row" tal:omit-tag="">
     18          <tal:block define="widget cell/widget;
     19          wid widget/getWidgetId;
     20          err python:ds.getError(wid);
     21          err_mapping python:ds.getErrorMapping(wid);
     22          widget_css_class cell/widget_css_class|nothing;
     23          css_class python:test(err, 'row error','row')">
    2624          <span tal:attributes="class widget_css_class;
    27                                id python:widget.getHtmlWidgetId()+'_widget';
    28                               ">
    29                              
    30                    
    31             <td valign="middle" tal:condition="python:widget.label_edit and widget.label_edit!='label field'">               
    32               <div class="label">
    33                 <label tal:content="widget/label_edit"
    34                   tal:attributes="for cell/widget_input_area_id|nothing;">label</label>
    35               </div>
    36             </td>
    37            
    38             <td tal:condition="cell/widget_rendered">
    39               <div tal:attributes="class python:test(widget.label_edit == 'label field', 'label','')">         
    40               <label tal:replace="structure cell/widget_rendered"/>
    41               </div>         
    42               <tal:block condition="err">
     25          id python:widget.getHtmlWidgetId()+'_widget';"
     26          >
     27            <tr tal:condition="widget/description|nothing" class="even ajaxtd">
     28              <th colspan="5" align="left"><h3 tal:replace="widget/description" /></th>
     29            </tr>
     30            <tr>
     31              <td valign="middle" tal:condition="python:widget.label_edit and widget.label_edit!='label field'">               
     32                <div class="label">
     33                  <label tal:content="widget/label_edit"
     34                         tal:attributes="for cell/widget_input_area_id|nothing;">label</label>
     35                </div>
     36              </td>
     37              <td tal:condition="cell/widget_rendered">
     38                <div tal:attributes="class python:test(widget.label_edit == 'label field', 'label','')">         
     39                  <label tal:replace="structure cell/widget_rendered"/>
     40                </div>         
     41                <tal:block condition="err">
    4342                  <tal:block define="msg python:cpsmcat(err, mapping=err_mapping)">
    4443                    <br /><em style="color: red"
    45                       tal:content="msg">err</em>
     44                              tal:content="msg">err</em>
    4645                  </tal:block>
    47               </tal:block>
    48             </td>
    49  
     46                </tal:block>
     47              </td>
     48            </tr>
    5049          </span>
    5150        </tal:block>
    52   </span>     
    53   </tr>
     51      </span>     
     52    </span>     
    5453  </table>
    5554  <br/>
    5655</metal:block>
     56 
  • WAeUP_SRP/uniben/profiles/default/applicants_catalog.xml

    r2512 r2738  
    3737 <column value="screening_score"/>
    3838 <column value="notice"/>
     39 <column value="fst_sit_fname"/>
     40 <column value="fst_sit_no"/>
     41 <column value="fst_sit_date"/>
     42 <column value="fst_sit_type"/>
     43 <column value="fst_sit_results"/>
     44 <column value="scd_sit_fname"/>
     45 <column value="scd_sit_no"/>
     46 <column value="scd_sit_date"/>
     47 <column value="scd_sit_type"/>
     48 <column value="scd_sit_results"/>
    3949 <column value="hq_type"/>
    4050 <column value="hq_grade"/>
     51 <column value="hq_school"/>
     52 <column value="hq_matric_no"/>
     53 <column value="hq_session"/>
     54 <column value="hq_disc"/>
    4155 <column value="passport"/>
    4256 <column value="status"/>
  • WAeUP_SRP/uniben/profiles/default/layouts.xml

    r2574 r2738  
    1010  <object name="application_prence" meta_type="CPS Layout"/>
    1111  <object name="application_pce" meta_type="CPS Layout"/>
     12  <object name="application_pt" meta_type="CPS Layout"/>
    1213  <object name="application_manage" meta_type="CPS Layout"/>
    1314  <object name="certificate" meta_type="CPS Layout"/>
  • WAeUP_SRP/uniben/profiles/default/layouts/student_application.xml

    r2715 r2738  
    3939  <property name="prefix">APP</property>
    4040  <property name="reference">jamb_reg_no</property>
    41  </widget>
     41 <property name="reuse_pin">False</property>
     42  </widget>
    4243 <widget name="app_email" meta_type="Email Widget">
    4344  <property name="title">Email Address</property>
  • WAeUP_SRP/uniben/profiles/default/payments_catalog.xml

    r2619 r2738  
    22<?xml-stylesheet type="text/xsl" href="catalog.xsl"?>
    33<object name="payments_catalog" meta_type="WAeUP Table">
     4 <column value="amount"/>
     5 <column value="date"/>
    46 <column value="order_id"/>
     7 <column value="resp_approved_amount"/>
     8 <column value="resp_card_num"/>
     9 <column value="resp_code"/>
     10 <column value="resp_date"/>
     11 <column value="resp_desc"/>
     12 <column value="resp_pay_reference"/>
     13 <column value="session_id"/>
     14 <column value="status"/>
    515 <column value="student_id"/>
    6  <column value="date"/>
    7  <column value="type_description"/>
    8  <column value="amount"/>
    9  <column value="resp_pay_reference"/>
    10  <column value="resp_desc"/>
    11  <column value="resp_code"/>
    12  <column value="resp_card_num"/>
    13  <column value="resp_approved_amount"/>
    14  <column value="faculty"/>
    15  <column value="department"/>
    16  <column value="certificate"/>
    17  <column value="review_state"/>
    18  
    19  
    20  <index name="order_id" meta_type="FieldIndex">
    21   <indexed_attr value="order_id"/>
    22  </index>
    23  <index name="student_id" meta_type="FieldIndex">
    24   <indexed_attr value="student_id"/>
     16 <column value="subject"/>
     17 <column value="type"/>
     18 <column value="target"/>
     19 <index name="key" meta_type="FieldIndex">
     20  <indexed_attr value="key"/>
    2521 </index>
    2622 <index name="date" meta_type="DateIndex">
    2723  <indexed_attr value="date"/>
    2824 </index>
    29  <index name="faculty" meta_type="FieldIndex">
    30   <indexed_attr value="faculty"/>
    31  </index> 
    32  <index name="department" meta_type="FieldIndex">
    33   <indexed_attr value="department"/>
    34  </index> 
    35  <index name="resp_code" meta_type="FieldIndex">
    36   <indexed_attr value="resp_code"/>
    37  </index> 
     25 <index name="order_id" meta_type="FieldIndex">
     26  <indexed_attr value="order_id"/>
     27 </index>
     28 <index name="order_id" meta_type="FieldIndex">
     29  <indexed_attr value="order_id"/>
     30 </index>
     31 <index name="resp_date" meta_type="DateIndex">
     32  <indexed_attr value="date"/>
     33 </index>
    3834 <index name="resp_desc" meta_type="KeywordIndex">
    3935  <indexed_attr value="resp_desc"/>
    4036 </index> 
    41   <index name="review_state" meta_type="FieldIndex">
    42   <indexed_attr value="review_state"/>
     37 <index name="session_id" meta_type="FieldIndex">
     38  <indexed_attr value="session_id"/>
     39 </index>
     40  <index name="status" meta_type="FieldIndex">
     41    <indexed_attr value="status"/>
    4342 </index>
    44  
     43 <index name="student_id" meta_type="FieldIndex">
     44  <indexed_attr value="student_id"/>
     45 </index>
     46 <index name="subject" meta_type="KeywordIndex">
     47  <indexed_attr value="subject"/>
     48 </index>
     49 <index name="target" meta_type="KeywordIndex">
     50  <indexed_attr value="target"/>
     51 </index>
     52 <index name="type" meta_type="KeywordIndex">
     53  <indexed_attr value="type"/>
     54 </index>
    4555</object>
  • WAeUP_SRP/uniben/profiles/default/schemas/import_application.xml

    r2517 r2738  
    3535 <field name="passport" meta_type="CPS String Field"/>
    3636 <field name="status" meta_type="CPS String Field"/>
    37   <field name="hq_type" meta_type="CPS String Field"/>
    38  <field name="hq_grade" meta_type="CPS String Field"/>
    3937 <field name="screening_venue" meta_type="CPS String Field"/>
    4038 <field name="aos" meta_type="CPS String Field"/>
     
    4240 <field name="notice" meta_type="CPS String Field"/>
    4341 <field name="student_id" meta_type="CPS String Field"/>
     42 <field name="fst_sit_fname" meta_type="CPS String Field"/>
     43 <field name="fst_sit_no" meta_type="CPS String Field"/>
     44 <field name="fst_sit_date" meta_type="CPS DateTime Field"/>
     45 <field name="fst_sit_type" meta_type="CPS String Field"/>
     46 <field name="fst_sit_results" meta_type="CPS String List Field"/>
     47 <field name="scd_sit_fname" meta_type="CPS String Field"/>
     48 <field name="scd_sit_no" meta_type="CPS String Field"/>
     49 <field name="scd_sit_date" meta_type="CPS DateTime Field"/>
     50 <field name="scd_sit_type" meta_type="CPS String Field"/>
     51 <field name="scd_sit_results" meta_type="CPS String List Field"/>
     52 <field name="hq_type" meta_type="CPS String Field"/>
     53 <field name="hq_grade" meta_type="CPS String Field"/>
     54 <field name="hq_school" meta_type="CPS String Field"/>
     55 <field name="hq_matric_no" meta_type="CPS String Field"/>
     56 <field name="hq_session" meta_type="CPS String Field"/>
     57 <field name="hq_disc" meta_type="CPS String Field"/>
    4458</object>
Note: See TracChangeset for help on using the changeset viewer.