Changeset 2503


Ignore:
Timestamp:
2 Nov 2007, 18:16:19 (17 years ago)
Author:
Henrik Bettermann
Message:

seperate add_student and import_student layouts.xml
fix import_student layout (email was overwritten)

Location:
WAeUP_SRP
Files:
2 added
7 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPTables.py

    r2460 r2503  
    344344            ds = DataStructure(data=item,datamodel=dm)
    345345            error_string = ""
     346            #import pdb;pdb.set_trace()
    346347            for k in import_keys:
    347348                if not validators[k](ds,mode=mode):
     
    609610    def new_importCSV(self,filename="JAMB_data",
    610611                  schema_id="application",
    611                   layout_id="application_import",
     612                  layout_id="import_application",
    612613                  mode='add'):
    613614        """ import JAMB data """
     
    13731374            else:
    13741375                normal.append(d)
    1375         normal.sort(cmp=lambda x,y: cmp("%(semester)s%(code)s" % x, 
     1376        normal.sort(cmp=lambda x,y: cmp("%(semester)s%(code)s" % x,
    13761377                                        "%(semester)s%(code)s" % y))
    1377         carry_overs.sort(cmp=lambda x,y: cmp("%(semester)s%(code)s" % x, 
     1378        carry_overs.sort(cmp=lambda x,y: cmp("%(semester)s%(code)s" % x,
    13781379                                             "%(semester)s%(code)s" % y))
    13791380        return credits,carry_overs,normal
  • WAeUP_SRP/base/skins/waeup_student/add_student.py

    r1752 r2503  
    1919d = {}
    2020mode = 'edit'
    21 rendered,psm,ds = lt.renderLayout(layout_id= 'import_student',
    22                       schema_id= 'import_student',
     21rendered,psm,ds = lt.renderLayout(layout_id= 'add_student',
     22                      schema_id= 'add_student',
    2323                      context=context,
    2424                      mapping=validate and REQUEST,
  • WAeUP_SRP/fceokene/profiles/default/layouts.xml

    r2482 r2503  
    2424  <object name="import" meta_type="CPS Layout"/>
    2525  <object name="import_student" meta_type="CPS Layout"/>
     26  <object name="add_student" meta_type="CPS Layout"/>
    2627  <object name="members" meta_type="CPS Layout"/>
    2728  <object name="members_search" meta_type="CPS Layout"/>
  • WAeUP_SRP/fceokene/profiles/default/layouts/application_pce.xml

    r2343 r2503  
    99  <property name="validate_values_expr"></property>
    1010
     11  <widget name="jamb_age" meta_type="String Widget">
     12    <property name="title">Age</property>
     13    <property name="fields">
     14      <element value="jamb_age"/>
     15    </property>
     16    <property name="label">Age</property>
     17    <property name="label_edit">Age</property>
     18    <property name="description"></property>
     19    <property name="help"></property>
     20    <property name="is_i18n">False</property>
     21    <property name="widget_mode_expr"></property>
     22    <property name="readonly_layout_modes">
     23      <element value="edit"/>
     24    </property>
     25    <property name="hidden_layout_modes">
     26      <element value="create"/>
     27    </property>
     28    <property name="hidden_readonly_layout_modes"/>
     29    <property name="css_class_expr">string:row</property>
     30  </widget>
    1131  <widget name="date_of_birth" meta_type="DateTime Widget">
    1232    <property name="title">Date of Birth</property>
  • WAeUP_SRP/fceokene/profiles/default/layouts/import_student.xml

    r2478 r2503  
    1212  <property name="title">Id</property>
    1313  <property name="fields">
    14    <element value="email"/>
     14   <element value="id"/>
    1515  </property>
    1616  <property name="is_required">False</property>
     
    4949  <property name="title">Application Email</property>
    5050  <property name="fields">
    51    <element value="email"/>
     51   <element value="app_email"/>
    5252  </property>
    5353  <property name="is_required">False</property>
     
    217217  <property name="vocabulary">verdicts</property>
    218218  <property name="sorted">True</property>
    219  </widget> 
     219 </widget>
    220220 <widget name="entry_session" meta_type="WAeUP Session Widget">
    221221  <property name="title">Entry Session</property>
     
    363363  <property name="display_width">10</property>
    364364 </widget>
    365  <table>
    366   <row>
    367    <cell name="firstname"/>
    368   </row>
    369   <row>
    370    <cell name="middlename"/>
    371   </row>
    372   <row>
    373    <cell name="lastname"/>
    374   </row>
    375   <row>
    376    <cell name="sex"/>
    377   </row>
    378   <row>
    379    <cell name="email"/>
    380   </row>
    381   <row>
    382    <cell name="phone"/>
    383   </row>
    384   <row>
    385    <cell name="entry_mode"/>
    386   </row>
    387   <row>
    388    <cell name="current_mode"/>
    389   </row>
    390   <row>
    391    <cell name="entry_session"/>
    392   </row>
    393   <row>
    394    <cell name="current_session"/>
    395   </row>
    396   <row>
    397    <cell name="current_level"/>
    398   </row>
    399   <row>
    400    <cell name="current_verdict"/>
    401   </row>
    402   <row>
    403    <cell name="previous_verdict"/>
    404   </row> 
    405   <row>
    406    <cell name="jamb_reg_no"/>
    407   </row>
    408   <row>
    409    <cell name="jamb_score"/>
    410   </row>
    411   <row>
    412    <cell name="matric_no"/>
    413   </row>
    414   <row>
    415    <cell name="study_course"/>
    416   </row>
    417 
    418  </table>
    419365</object>
  • WAeUP_SRP/fceokene/profiles/default/schemas.xml

    r2482 r2503  
    2626 <object name="import" meta_type="CPS Schema"/>
    2727 <object name="import_student" meta_type="CPS Schema"/>
     28 <object name="add_student" meta_type="CPS Schema"/>
    2829 <object name="import_student_level_data" meta_type="CPS Schema"/>
    2930 <object name="import_student_course_results" meta_type="CPS Schema"/>
  • WAeUP_SRP/fceokene/profiles/default/schemas/import_student.xml

    r2478 r2503  
    1515 <field name="jamb_score" meta_type="CPS Int Field"/>
    1616 <field name="jamb_age" meta_type="CPS String Field"/>
     17 <field name="jamb_lga" meta_type="CPS String Field"/>
     18 <field name="jamb_state" meta_type="CPS String Field"/>
    1719 <field name="lga" meta_type="CPS String Field"/>
    1820 <field name="state" meta_type="CPS String Field"/>
Note: See TracChangeset for help on using the changeset viewer.