Changeset 1158 for WAeUP_SRP/trunk


Ignore:
Timestamp:
30 Dec 2006, 16:58:14 (18 years ago)
Author:
joachim
Message:

added jamb_reg_no checking + phone_nr
made schoolfee_code a string field in certificate.xml

Location:
WAeUP_SRP/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/WAeUPTool.py

    r1151 r1158  
    105105       
    106106    security.declarePublic('makeStudentData') ###(
    107     def makeStudentData(self,student_id,email=None):
     107    def makeStudentData(self,student_id,email=None,phone_nr=None):
    108108        "create Datastructure for a returning Student"
    109109        #import pdb;pdb.set_trace()
     
    116116        if res:
    117117            student = res[0]
    118         logger.info('"%s", "creating Datastructure"')
     118        logger.info('"%s", "creating Datastructure"' % student_id)
    119119        certcode_org = student.Coursemajorcode
    120120        certcode = makeCertificateCode(certcode_org)
     
    154154            lga = "None"
    155155        dc['lga'] = lga
    156         dc['email'] = email
     156        dp['email'] = email
     157        dp['phone'] = phone_nr
    157158        dp['firstname'] = student.Firstname
    158159        dp['middlename'] = student.Middlename
     
    163164        personal.getContent().edit(mapping=dp)
    164165        clearance.getContent().edit(mapping=dc)
     166        catd = {}
     167        catd['id'] = sid
     168        catd['entry_mode']= da['entry_mode']
     169        catd['matric_no'] = matric_no
     170        catd['jamb_reg_no'] = da['jamb_reg_no']
     171        catd['name'] = "%(firstname)s %(middlename)s %(lastname)s" % dp 
     172        catd['sex'] = dp['sex']
     173        catd['level'] = level
     174        if certificate_brain:
     175            cpath = certificate_brain.getPath().split('/')
     176            catd['faculty'] = cpath[-4]
     177            catd['department'] = cpath[-3]
     178            catd['course'] = certcode
     179        self.students_catalog.modifyRecord(**catd)
    165180        #
    166181        # Study Course
  • WAeUP_SRP/trunk/profiles/default/layouts/certificate.xml

    r1015 r1158  
    194194  <property name="vocabulary">courselevel</property>
    195195 </widget>
    196  <widget name="school_fee_code" meta_type="Select Widget">
     196 <widget name="school_fee_code" meta_type="String Widget">
    197197  <property name="title">School Fee Prefix</property>
    198198  <property name="fields">
     
    204204  <property name="hidden_layout_modes"/>
    205205  <property name="hidden_readonly_layout_modes"/>
    206   <property name="vocabulary">pin_prefixes</property>
    207206 </widget>
    208207 <table>
  • WAeUP_SRP/trunk/profiles/default/layouts/student_session_results_search.xml

    r1153 r1158  
    3030  <property name="hidden_layout_modes">
    3131   <element value="create"/>
    32    <element value="edit"/>
    3332  </property>
    3433  <property name="hidden_readonly_layout_modes"/>
    3534  <property name="display_width">10</property>
    3635  <property name="size_max">10</property>
     36 </widget>
     37 <widget name="phone_nr" meta_type="String Widget">
     38  <property name="title">Phone Number</property>
     39  <property name="fields">
     40   <element value="phone_nr"/>
     41  </property>
     42  <property name="label">Phone Number</property>
     43  <property name="label_edit">Phone Number</property>
     44  <property name="readonly_layout_modes"/>
     45  <property name="hidden_layout_modes">
     46   <element value="create"/>
     47  </property>
     48  <property name="hidden_readonly_layout_modes"/>
     49  <property name="display_width">15</property>
     50  <property name="size_max">15</property>
    3751 </widget>
    3852 <widget name="matric_no" meta_type="MatricNo Widget">
     
    88102  </row>
    89103  <row>
     104   <cell name="jamb_reg_no" />
     105  </row>
     106  <row>
    90107   <cell name="email" />
     108  </row>
     109  <row>
     110   <cell name="phone_nr" />
    91111  </row>
    92112  <row>
  • WAeUP_SRP/trunk/profiles/default/schemas/student_returning.xml

    r1151 r1158  
    22<object name="student_returning" meta_type="CPS Schema">
    33 <field name="email" meta_type="CPS String Field"/>
     4 <field name="phone_nr" meta_type="CPS String Field"/>
    45 <field name="jamb_reg_no" meta_type="CPS String Field"/>
    56 <field name="matric_no" meta_type="CPS String Field"/>
  • WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py

    r1151 r1158  
    3838        student = getattr(students,str(member))
    3939        if request.has_key('email'):
    40             context.waeup_tool.makeStudentData(str(member),email=request.get("email"))
     40            context.waeup_tool.makeStudentData(str(member),
     41                                               email=request.get("email"),
     42                                               phone_nr=request.get("phone_nr"),
     43                                               )
    4144        student_app = getattr(student,'application',None)
    4245        if student_app is None:
  • WAeUP_SRP/trunk/skins/waeup_epayment/pay_online.py

    r1147 r1158  
    1010# $Id$
    1111"""
    12 return Info about the current Student
     12pay online
    1313"""
    1414import logging
     
    2424
    2525student = getattr(students,student_id)
     26sbrain = context.students_catalog(id=student_id)[0]
     27res = context.portal_catalog(portal_type="Certificate",
     28                                     id = sbrain.course)
     29if not res:
     30    return None
     31sfc = res[0].getObject().getContent().school_fee_code
    2632info = {}
    27 
     33info['callback_url'] = "%s/epayment_cb" % student.absolute_url()
     34info['payment_type_code'] = sfc
     35info['payment_type_description'] = "Schoolfee %s for 2006/2007 Session" % sfc
     36info['payment_bill_to'] = sbrain.name
     37info['payment_ship_to'] = "University of Benin"
     38info['student_id'] = student_id
     39info['student_name'] = sbrain.name
     40info['student_email'] = sbrain.email
     41info['order_id'] = "%s%s" % (student_id[1:],DateTime.DateTime().strftime("%d%m%y%H%M%S"))
     42info['amount'] = "75000"
     43return context.wema_form(info=info)
  • WAeUP_SRP/trunk/skins/waeup_epayment/wema_form.pt

    r1147 r1158  
    1212          <tr>
    1313            <input name="x_PaymentCode" type="hidden"
    14                    tal:attributes="info/payment_type_code" />
     14                   tal:attributes="value info/payment_type_code" />
    1515            <input name="x_PaymentDesc" type="hidden"
    16                    tal:attributes="info/payment_type_description" />
     16                   tal:attributes="value info/payment_type_description" />
    1717            <td >Description</td>
    1818            <td tal:content="info/payment_type_description"></td>
     
    2020          <tr>
    2121            <input name="x_Billto" type="hidden"
    22                    tal:attributes="info/payment_billto" />
     22                   tal:attributes="value info/payment_bill_to" />
    2323            <input name="x_Shipto" type="hidden"
    24                    tal:attributes="info/payment_shipto" />
     24                   tal:attributes="value info/payment_ship_to" />
    2525            <input name="x_PayersID" type="hidden"
    26                    tal:attributes="info/student_id" />
     26                   tal:attributes="value info/student_id" />
    2727            <input name="x_PayerName" type="hidden"
    28                    tal:attributes="info/student_name" />
     28                   tal:attributes="value info/student_name" />
    2929            <input name="x_PayerEmail" type="hidden"
    30                    tal:attributes="info/student_email" />
     30                   tal:attributes="value info/student_email" />
    3131            <input name="x_OrderID" type="hidden"
    32                    tal:attributes="info/order_id" />
    33             <td tal:content="info/payment_billto"></td>
     32                   tal:attributes="value info/order_id" />
     33            <td tal:content="info/payment_bill_to"></td>
    3434          </tr>
    3535          <tr>
    3636            <input name="x_amt" type="hidden"
    37                    tal:attributes="info/amount" />
     37                   tal:attributes="value info/amount" />
    3838            <td >Amount
    3939            </td>
  • WAeUP_SRP/trunk/skins/waeup_student/createStudentFT.py

    r1151 r1158  
    4444                                                        student_brain.Lastname)
    4545                                )
    46 return "Student MatricelNo %s and %s created" % (matric_no,sid)
     46return "Student MatricelNo %s and %s Jamb %s created" % (matric_no,
     47                                                         sid,
     48                                                         student_brain.Entryregno)
    4749   
  • WAeUP_SRP/trunk/skins/waeup_student/set_access_data.py

    r1154 r1158  
    4242elif psm == 'valid':
    4343    pass
    44     #jamb_reg_no = ds.get('jamb_reg_no')
    45     #r = context.returning_import(matric_no = matric_no)
    46     #if 0 and r and r[0].Entryregno != jamb_reg_no or not r:
    47     #    psm = "Your Jamb Registration Nr is wrong"
    48     #    return context.set_access_data_form(rendered = res,
    49     #                             psm = psm,
    50     #                             firstlayout = True,
    51     #                             lastlayout = True,
    52     #                             ds = ds,
    53     #                             )
     44    jamb_reg_no = ds.get('jamb_reg_no')
     45    r = context.returning_import(matric_no = matric_no)
     46    if r and r[0].Entryregno != jamb_reg_no or not r:
     47        psm = "Your Jamb Registration Nr is wrong"
     48        return context.set_access_data_form(rendered = res,
     49                                 psm = psm,
     50                                 firstlayout = True,
     51                                 lastlayout = True,
     52                                 ds = ds,
     53                                 )
    5454## from Products.zdb import set_trace;set_trace()
    5555password = REQUEST.get('widget__password')
Note: See TracChangeset for help on using the changeset viewer.