Ignore:
Timestamp:
10 Nov 2005, 21:40:01 (19 years ago)
Author:
joachim
Message:

=clearence + eligibility added

Location:
waeup_product/trunk/skins/waeup_student
Files:
7 added
6 edited
1 copied
1 moved

Legend:

Unmodified
Added
Removed
  • waeup_product/trunk/skins/waeup_student/add_course_ticket.py

    r163 r164  
    2222                      ob={},
    2323                      layout_mode='create',
    24                       create_action = 'register_study_level',
     24                      create_action = 'add_course_ticket',
    2525                      )
    2626if True or psm == 'invalid':
  • waeup_product/trunk/skins/waeup_student/book_accommodation.py

    r163 r164  
    2121                      ob={},
    2222                      layout_mode='create',
     23                      create_action = 'book_accommodation',
    2324                      )
    2425if psm == 'invalid':
    25     return context.check_admission_form(rendered = res,
     26    return context.book_accommodation_form(rendered = res,
    2627                                 psm = "Please correct your input",
    2728                                 ds = ds,
    2829                                 )
    2930elif psm == '':
    30     return context.check_admission_form(rendered = res,
     31    return context.book_accommodation_form(rendered = res,
    3132                                 psm = None,
    3233                                 ds = ds,
     
    3637    halls = getattr(context,'accommodation').contentValues()
    3738    beds = []
    38     student = context.getContent()
     39    student = context.PERSONAL.getContent()
    3940    sf = context.getContent()
    4041    for hall in halls:
  • waeup_product/trunk/skins/waeup_student/check_admission.py

    r155 r164  
    1717
    1818res,psm,ds = lt.renderLayout(layout_id= 'admission',
    19                       schema_id= 'jamb',
     19                      schema_id= 'student_admission',
    2020                      context=context,
    2121                      mapping=validate and REQUEST,
     
    3737    catalog = context.portal_catalog
    3838    search = catalog(SearchableText = "%s*" % s_id)
    39     if len(search) < 1:
    40         psm = "Your not admitted"
     39    student = getattr(context,s_id,None)
     40    if student is None:
     41    #if len(search) < 1:
     42        psm = "Your are not admitted"
    4143        return context.check_admission_form(rendered = res,
    42                                  psm = psm + str(search),
     44                                 psm = psm,
    4345                                 ds = ds,
    4446                                 )
    45     sf = getattr(context,s_id,None)
    46     if sf and getattr(sf,'PERSONAL',None):
    47         psm = "Your already admitted, please login"
    48         return context.check_admission_form(rendered = res,
    49                                  psm = psm,
    50                                  ds = ds,
    51                                  )
    52     rset = REQUEST.set
    53     sc_pin =  ds.get('sc_pin')
    54     return REQUEST.RESPONSE.redirect("%s/logged_in?__ac_name=%s&__ac_password=UnSeT&sc_pin=%s"
    55                                     % (context.absolute_url(),s_id,sc_pin))
    56 ##    return context.student_admitted_form(rendered = res,
    57 ##                                 psm = psm,
    58 ##                                 ds = ds,
    59 ##                                 student = student,
    60 ##                                 jamb = jamb,
    61 ##                                 pd = pd,
    62 ##                                 )
    63 ##   
    64 ##return res,psm,ds
     47student.getContent().setScratchCardData('adm_check',ds)
    6548
     49jamb = getattr(student,'JAMB')
     50res = jamb.getContent().render(layout_id = 'admission_slip',
     51                               layout_mode = 'view',
     52                               schema_id = 'jamb')
     53
     54return jamb.admission_slip_form(rendered = res, dict = ds)
     55
  • waeup_product/trunk/skins/waeup_student/check_admission_form.pt

    r124 r164  
    1313                >
    1414    </metal:block>
    15 
    16     <metal:block fill-slot="main">
    17         <h1>Check your admission status!</h1>
    18       <div tal:replace="structure rendered_main" />
     15      <metal:block fill-slot="main">
     16        <h1> Check Your Admission Status! </h1>
     17        <div tal:replace="structure rendered_main" />
     18          Instructions :<br />
     19          <ul>
     20            <li>Enter the scratch card PIN for admission check </li>
     21            <li>Print the Admission Slip which is displayed if you are admitted by the School </li>
     22            <li>Buy a Clearance card </li>
     23            <li>Proceed to the Clearance Eligibility Online Form and fill your O/L details </li>
     24            <li>Proceed to the School with all original documents for Clearance to finalize the clearance process </li>
     25          </ul>
     26      </metal:block>
     27      <metal:block fill-slot="sub">
     28      </metal:block>
    1929    </metal:block>
    20   <metal:block fill-slot="sub">
    2130  </metal:block>
    22 
    23 </metal:block>
    24 </metal:block>
    2531</tal:block>
  • waeup_product/trunk/skins/waeup_student/layout_accobook_create.pt

    r117 r164  
    1010             edit_form     python:ti and ti.getActionById('edit',   'cpsdocument_edit_form') or  'cpsdocument_edit_form';
    1111             metadata_form python:ti and ti.getActionById('metadata', 'cpsdocument_metadata') or 'cpsdocument_metadata';
    12              formaction string:check_admission_form;
    1312             first_layout options/first_layout|python:0;
    1413             last_layout options/last_layout|python:0;
     
    1716             "
    1817             >
    19   <form action='book_accommodation' method='post'
     18  <form action='' method='post' tal:attributes="action string:${options/create_action}"
    2019        enctype='multipart/form-data' class='workflow'>
    2120    <div class='group'>
     
    8180  </form>
    8281</metal:block>
    83  
  • waeup_product/trunk/skins/waeup_student/layout_clearence_create.pt

    r160 r164  
    1717             "
    1818             >
    19   <form action='check_admission' method='post'
     19  <form action='clearence' method='post'
    2020        enctype='multipart/form-data' class='workflow'>
    2121    <div class='group'>
  • waeup_product/trunk/skins/waeup_student/process_waeup_login.py

    r152 r164  
    3737pd.getContent().edit(mapping=pkw)
    3838context.notifyCPSDocumentCreation(ob=pd)
    39 return response.redirect(ma.absolute_url())
    4039
     40return response.redirect("%s/eligibility" % ma.absolute_url())
     41return ma.eligibility(REQUEST=context.REQUEST)
     42
  • waeup_product/trunk/skins/waeup_student/register_level.py

    r152 r164  
    22# $Id$
    33"""
    4 book an accomodation
     4register for next level
    55"""
    66type_name = 'StudyLevel'
     
    1717
    1818res,psm,ds = lt.renderLayout(layout_id= 'study_level',
    19                       schema_id= 'metadata',
     19                      schema_id= 'study_level',
    2020                      context=context,
    2121                      mapping=validate and REQUEST,
     
    2828                                 create = 1,
    2929                                 type_name = type_name,
    30                                  #psm = 'Not yet active',
    31                                  psm = 'Please correct your errors',
     30                                 psm = str(ds),
     31                                 #psm = 'Please correct your errors',
    3232                                 )
    3333elif psm == '':
     
    4040   
    4141elif psm == 'valid':
    42     psm = (ds)
    43     oid = ds.get('Title')
    44     if hasattr(context,oid):
     42    voc = pv.courselevel
     43    level_id = voc.items()[0][0]
     44    level = getattr(context,level_id,None)
     45    if level:
    4546        return context.common_edit_form(rendered = res,
    4647                                 create = 1,
    4748                                 type_name = type_name,
    48                                  psm = 'You already registered for that level',
     49                                 psm = "You have already registered for Level %s" % voc.get(level_id)
    4950                                 )
    50     context.invokeFactory(type_name,oid)
    51     object = getattr(context,oid)
    52     voc = pv.courselevel
    53     ds.set('Title',voc.get(oid))
     51   
     52    context.invokeFactory(type_name,level_id)
     53    object = getattr(context,level_id)
     54    ds.set('Title',voc.get(level_id))
    5455    object.getContent().edit(mapping=ds,proxy=object)
    5556    context.notifyCPSDocumentCreation(ob=object)
    56     psm = 'new %s created' % oid
    57     semester_id = 'Semester_1_%s_%s' % (oid,context.getId())
     57    psm = 'new %s created' % level_id
     58    semester_id = 'Semester_1_%s_%s' % (level_id,context.getId())
    5859    object.invokeFactory('Semester',semester_id)
    5960    semester = getattr(object,semester_id)
    6061    semester.getContent().edit(mapping={'Title': 'First Semester'})
    61     semester_id = 'Semester_2_%s_%s' % (oid,context.getId())
     62    semester_id = 'Semester_2_%s_%s' % (level_id,context.getId())
    6263    object.invokeFactory('Semester',semester_id)
    6364    semester = getattr(object,semester_id)
Note: See TracChangeset for help on using the changeset viewer.