Changeset 2760


Ignore:
Timestamp:
26 Nov 2007, 07:39:15 (17 years ago)
Author:
Henrik Bettermann
Message:

this works for Okene, must be tested for Benin also

Location:
WAeUP_SRP/base/skins/waeup_student
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_student/course_registration_slip.pt

    r2757 r2760  
    1212          show_check_boxes info/show_check_boxes;
    1313          is_student info/is_student;
    14           status_info info/status_info;
    15           review_state info/review_state;
    16           validated python:review_state in ('courses_validated',);
    17           view_only info/view_only"
    18           >
     14          validated info/validated;
     15          ">
    1916      <h3>Course Registration Slip for <span tal:content="here/title_or_id" /></h3>
    2017      <br />
  • WAeUP_SRP/base/skins/waeup_student/getStudyLevelInfo.py

    r2758 r2760  
    4242student_id = context.getStudentId()
    4343level_id  =  context.getId()
     44level_doc = info['doc'] = context.getContent()
    4445
    4546info['is_so'] = is_so = context.isSectionOfficer()
     
    4849info['student'] = student = context.students_catalog(id=student_id)[0]
    4950info['review_state'] = review_state = student.review_state
    50 info['view_only'] =  review_state != "school_fee_paid"
     51is_current_level = level_id == student.level
     52school_fee_paid =  review_state == 'school_fee_paid'
     53info['is_current_level'] = is_current_level
     54info['has_verdict'] = has_verdict = level_doc.verdict
    5155
    52 level_doc = info['doc'] = context.getContent()
     56info['submission_allowed']= school_fee_paid and is_current_level and not has_verdict
     57info['validation_allowed']= review_state == 'courses_registered' and is_current_level
     58info['rejection_allowed']= review_state in ('courses_registered', 'courses_validated',) and is_current_level
     59info['validated'] = review_state == 'courses_validated' and is_current_level
    5360
    54 school_fee_paid =  review_state == 'school_fee_paid'
    55 is_current_level = level_id == student.level
     61info['show_check_boxes'] =  (is_ca and school_fee_paid and is_current_level and not has_verdict) or\
     62                            (is_student and school_fee_paid and is_current_level and not has_verdict) or\
     63                            (is_so and is_current_level and not has_verdict)
    5664
    57 
    58 
    59 info['show_check_boxes'] =  (is_ca and school_fee_paid and is_current_level and not level_doc.verdict) or\
    60                             (is_student and school_fee_paid and is_current_level and not level_doc.verdict) or\
    61                             (is_so and is_current_level and not level_doc.verdict)
    62 
    63 info['is_current_level'] = is_current_level
     65info['verdict'] = context.portal_vocabularies.verdicts.get(level_doc.verdict).upper()
     66info['session'] = context.portal_vocabularies.sessions.get(level_doc.session)
     67info['level_str'] = context.portal_vocabularies.levels.get(level_id)
    6468
    6569info['choosen_ids'] = request.get('ids',[])
    66 info['status_info'] = ""
    67 if is_student:
    68     if review_state == 'courses_registered':
    69         info['status_info'] = "Request for course validation pending"
    70     elif review_state == 'courses_validated':
    71         info['status_info'] = "Courses validated"
    72 elif is_ca:
    73     if review_state == 'courses_registered':
    74         info['status_info'] = "Please validate these courses"
    75     elif review_state == 'courses_validated':
    76         info['status_info'] = "Courses validated"
     70
     71#info['status_info'] = ""
     72#if is_student:
     73#    if review_state == 'courses_registered':
     74#        info['status_info'] = "Request for course validation pending"
     75#    elif review_state == 'courses_validated':
     76#        info['status_info'] = "Courses validated"
     77#elif is_ca:
     78#    if review_state == 'courses_registered':
     79#        info['status_info'] = "Please validate these courses"
     80#    elif review_state == 'courses_validated':
     81#        info['status_info'] = "Courses validated"
    7782
    7883cert_id = student.course
     
    9499    info['gpa'] = "%4.2f" % (float(gpa)/int(total_credits))
    95100
    96 info['submission_allowed']= school_fee_paid and level_id == student.level and not level_doc.verdict
    97 info['validation_allowed']= review_state == 'courses_registered' and is_current_level
    98 info['rejection_allowed']= review_state in ('courses_registered', 'courses_validated',) and is_current_level
    99 
    100 info['verdict'] = context.portal_vocabularies.verdicts.get(level_doc.verdict).upper()
    101 info['session'] = context.portal_vocabularies.sessions.get(level_doc.session)
    102 info['level_str'] = context.portal_vocabularies.levels.get(level_id)
    103101
    104102
  • WAeUP_SRP/base/skins/waeup_student/study_level_view.pt

    r2758 r2760  
    1111                       is_ca info/is_ca;
    1212                       show_check_boxes info/show_check_boxes;
     13                       has_verdict info/has_verdict;
     14                       submission_allowed info/submission_allowed;
     15                       rejection_allowed info/rejection_allowed;
    1316                       is_current_level info/is_current_level;
    1417                       is_student info/is_student;
    15                        status_info info/status_info;
    16                        review_state info/review_state;
    17                        view_only info/view_only">       
     18                       ">       
    1819    <div style="text-align: right"
    19          tal:condition="python:review_state in ('courses_registered','courses_validated',) and is_current_level">
     20         tal:condition="rejection_allowed">
    2021    <a href="" target="slip" tal:attributes="href string:course_registration_slip"
    2122        onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
     
    2627   
    2728    <div style="text-align: right"
    28          tal:condition="info/verdict">
     29         tal:condition="has_verdict">
    2930    <a href="" target="slip" tal:attributes="href string:new_session_results_slip"
    3031        onclick="javascript:window.open('','slip','width=600, height=700, directories=no, toolbar=no, location=no, menubar=yes, scrollbars=yes, status=no, resizable=no, dependent=no')">
     
    6061            <td tal:content="info/total_credits" />
    6162          </tr>
    62           <tr>
     63          <tr tal:condition="has_verdict">
    6364            <th>Verdict:</th>
    6465            <td><span tal:content="info/verdict" /></td>
    6566          </tr>     
    66           <tr>
     67          <tr tal:condition="has_verdict">
    6768            <th>GPA:</th>
    6869            <td><span tal:content="info/gpa" /></td>
     
    9899          <td align="center" width="10%" tal:content="row/coe|nothing"></td>
    99100         
    100           <td tal:condition="python:info['submission_allowed']" align="center" width="5%">&nbsp;</td>
     101          <td tal:condition="submission_allowed" align="center" width="5%">&nbsp;</td>
    101102       
    102103        </tr>
     
    150151          <td align="center" width="10%" tal:content="row/coe|nothing"></td>
    151152         
    152           <td tal:condition="python:info['submission_allowed']" width="5%" align="center">
     153          <td tal:condition="submission_allowed" width="5%" align="center">
    153154            <a href="edit" tal:attributes="href string:course_edit/${row/code}"
    154155            target="edit"
     
    182183          <td align="center" width="10%" tal:content="row/coe|nothing"></td>
    183184         
    184           <td tal:condition="python:info['submission_allowed']" width="5%" align="center">
     185          <td tal:condition="submission_allowed" width="5%" align="center">
    185186          <a href="edit" tal:attributes="href string:course_edit/${row/code}"
    186187          target="edit"
     
    205206      <br />
    206207     
    207       <table tal:condition="python: is_student and info['submission_allowed'] and show_check_boxes" width="100%" cellspacing="0" cellpadding="2"
     208      <table tal:condition="python: is_student and submission_allowed and show_check_boxes" width="100%" cellspacing="0" cellpadding="2"
    208209             class="folderButtons">
    209210        <tr>
     
    267268                     class="context" value="Update"
    268269                     />
    269               <input tal:condition="info/submission_allowed" type="submit" name="register_courses:method"
     270              <input tal:condition="submission_allowed" type="submit" name="register_courses:method"
    270271                     class="context" value="Submit" /> 
    271272              <input tal:condition="info/validation_allowed" type="submit" name="validate_courses:method"
     
    287288          <td align="left" valign="top" rowspan="3"></td>
    288289          <td align="left" valign="top">
    289               <input tal:condition="python: info['submission_allowed']"
     290              <input tal:condition="submission_allowed"
    290291                     type="button" value="Select all" class="context"
    291292                     onclick="someJavaScriptFunctionThatWillBeReplaced"
     
    294295                     % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
    295296                     />
    296               <input tal:condition="python: info['submission_allowed']"
     297              <input tal:condition="submission_allowed"
    297298                     type="submit" name="delete_course_result:method" value="Delete selected"
    298299                     class="destructive" i18n:attributes="value"
     
    300301                     ('Do you really want to delete the courses selected?', )"
    301302                     />
    302               <input tal:condition="python: info['submission_allowed']"
     303              <input tal:condition="submission_allowed"
    303304                     type="submit" name="refresh_level:method"
    304305                     class="context" value="Update"
    305306                     />
    306               <input tal:condition="info/submission_allowed" type="submit" name="register_courses:method"
     307              <input tal:condition="submission_allowed" type="submit" name="register_courses:method"
    307308                     class="context" value="Submit" /> 
    308309              <input tal:condition="info/validation_allowed" type="submit" name="validate_courses:method"
Note: See TracChangeset for help on using the changeset viewer.