Changeset 1513 for WAeUP_SRP/trunk


Ignore:
Timestamp:
2 Mar 2007, 22:59:45 (18 years ago)
Author:
joachim
Message:

register courses

Location:
WAeUP_SRP/trunk/skins
Files:
5 added
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_student/create_level.py

    r1498 r1513  
    6060            continue
    6161        course_cat_entry = c_res[0]
    62         if not course_cat_entry.passmark:
     62        passmark = getattr(course_cat_entry,'passmark',None)
     63        if not passmark:
    6364            carry_over = co.GRADE in ('D','E','F')
    6465        else:
  • WAeUP_SRP/trunk/skins/waeup_student/getStudyLevelInfo.py

    r1494 r1513  
    1 # Script (Python) "getStudyLevelInfo"
     1## Script (Python) "getStudyLevelInfo"
    22##bind container=container
    33##bind context=context
     
    5353
    5454info = {}
     55info['is_student'] = is_student = context.isStudent()
     56info['is_ca'] = is_ca = context.isCourseAdviser()
    5557info['student'] = student = context.students_catalog(id=student_id)[0]
     58info['review_state'] = review_state = context.getStudentReviewState()
     59info['view_only'] =  review_state != "school_fee_paid"
     60info['show_check_boxes'] =  (is_ca and review_state == 'courses_registered') or (is_student and context.getStudentReviewState() == "school_fee_paid")
    5661info['choosen_ids'] = request.get('ids',[])
     62info['status_info'] = ""
     63if is_student:
     64    if review_state == 'courses_registered':
     65        info['status_info'] = "Request for Course Validation pending"
     66    elif review_state == 'courses_validated':
     67        info['status_info'] = "Courses validated"
     68elif is_ca:
     69    if review_state == 'courses_registered':
     70        info['status_info'] = "Please validate these Courses"
     71    elif review_state == 'courses_validated':
     72        info['status_info'] = "Courses validated"
    5773info['doc'] = context.getContent()
    5874##study_course = context.aq_parent.getContent()
  • WAeUP_SRP/trunk/skins/waeup_student/study_level_view.pt

    r1510 r1513  
    33    <metal:block fill-slot="header"
    44                 tal:define="global info context/getStudyLevelInfo;
    5                  global is_so context/isSectionOfficer;"
    6                  >
     5                 global is_so context/isSectionOfficer;
     6                 global is_ca info/is_ca;
     7                 global show_check_boxes info/show_check_boxes;
     8                 global is_student info/is_student;
     9                 global status_info info/status_info;
     10                 global review_state info/review_state;
     11                 global view_only info/view_only">
    712      <a href=""
    813         tal:attributes="href string:${here/academicsParent}">
     
    1015        Up one level
    1116      </a>
     17              <div style="text-align: right"
     18             tal:condition="python:review_state == 'courses_validated'">
     19        <a href="" target="slip" tal:attributes="href string:courses_validated_slip"
     20            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')">
     21            <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
     22            Validated Courses Slip
     23        </a>
     24       
     25        </div>
     26
    1227      <h3>
    1328        <span tal:condition="is_so">
     
    1934    </metal:block>
    2035    <metal:main fill-slot="main" tal:condition="python:1">
    21 
     36      <h3 tal:content="status_info"></h3>
    2237      <form action="." method="post" class="group">
    2338        <span tal:condition="info/carry_overs" tal:omit-tag="">
    2439        <h3>Carryover Courses</h3>
    2540        <br />
    26         <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">     
     41        <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">
    2742          <tr tal:repeat="row info/carry_overs"
    2843              tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
    29             <td align="left" valign="middle" style="width: 5px;">
     44            <td align="left" valign="middle" style="width: 5px;"
     45                tal:condition="show_check_boxes">
    3046              <input type="checkbox" name="ids:list" value="" id="" class="noborder"
    3147                     tal:define="id row/id"
     
    4561        <h3>Session Courses</h3>
    4662        <br />
    47         <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">     
     63        <table class="contentListing" width="100%" summary="content layout" id="folder_content">     
    4864          <tr tal:repeat="row info/normal"
    4965              tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
    50             <td align="left" valign="middle" style="width: 5px;">
     66            <td align="left" valign="middle" style="width: 5px;"
     67                tal:condition="show_check_boxes">
    5168              <input type="checkbox" name="ids:list" value="" id="" class="noborder"
    5269                     tal:define="id row/id"
     
    6986          </tr>
    7087        </table>
    71         <table width="100%" cellspacing="0" cellpadding="2"
     88        <table tal:condition="not:view_only" width="100%" cellspacing="0" cellpadding="2"
     89               class="folderButtons">
     90          <tr>
     91            <td align="left" valign="top" rowspan="3"></td>
     92            <td align="left" valign="top">
     93              <span tal:condition="python:1">
     94                <input type="button" value="button_select_all" class="context"
     95                       onclick="someJavaScriptFunctionThatWillBeReplaced"
     96                       i18n:attributes="value"
     97                       tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
     98                       % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
     99                       />
     100                <input type="submit" name="course_result_delete:method" value="Delete checked"
     101                       class="destructive" i18n:attributes="value"
     102                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
     103                       ('really delete checked courses', )"
     104                       />
     105                <input tal:condition="python:1" type="submit" name="register_courses:method"
     106                       class="context" value="Register" />
     107                <input tal:condition="is_ca" type="submit" name="notify_change_courses:method"
     108                       class="context" value="Reject Courses" />
     109                <input tal:condition="python: 1"
     110                       type="submit" name="refresh_level:method"
     111                       class="context" value="Refresh List"
     112                       />
     113              </span>
     114            </td>
     115          </tr>
     116        </table>
     117        <table tal:condition="python:is_ca and show_check_boxes" width="100%" cellspacing="0" cellpadding="2"
    72118               class="folderButtons">
    73119          <tr>
     
    81127                       % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
    82128                       />
    83                 <input tal:condition="python:0" type="submit" name="register_checked:method"
    84                        class="context" value="Register" />
    85                 <input tal:condition="python:0" type="submit" name="retract_checked:method"
    86                        class="context" value="Retract" />
    87                 <input type="submit" name="course_result_delete:method" value="button_delete"
     129                <input type="submit" name="course_result_delete:method" value="Delete checked"
    88130                       class="destructive" i18n:attributes="value"
    89131                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
    90                        (cpsmcat('description_confirm_delete'), )"
     132                       ('really delete checked courses', )"
    91133                       />
     134                <input tal:condition="python:1" type="submit" name="validate_courses:method"
     135                       class="context" value="Validate" />
     136                <input tal:condition="is_ca" type="submit" name="notify_change_courses:method"
     137                       class="context" value="Reject Courses" />
    92138                <input tal:condition="python: 1"
    93139                       type="submit" name="refresh_level:method"
     
    100146      </form>
    101147      <br />
    102       <form action="add_course_result" method="post" class="group">
     148      <form action="add_course_result" method="post" class="group"
     149            tal:condition="show_check_boxes">
    103150        <table>
    104151          <tr>
Note: See TracChangeset for help on using the changeset viewer.