Changeset 2758 for WAeUP_SRP/base/skins


Ignore:
Timestamp:
25 Nov 2007, 22:06:28 (17 years ago)
Author:
Henrik Bettermann
Message:

allow registration of probation levels

and more fixes

Location:
WAeUP_SRP/base/skins
Files:
2 added
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_epayment/getPaymentsFolderInfo.py

    r2680 r2758  
    1 ## Script (Python) "getPaymentsFolderInfo"
     1z## Script (Python) "getPaymentsFolderInfo"
    22##bind container=container
    33##bind context=context
     
    109109        row['confirmed'] = 'unsuccessful'
    110110    row['is_editable'] = is_so and (row['confirmed'] == 'active')
    111        
     111
    112112    payments.append(row)
    113113
  • WAeUP_SRP/base/skins/waeup_layout/portlet_student_workflow_display.pt

    r2496 r2758  
    7777  <span tal:condition="python:info['review_state']=='returning'">
    7878  <tr><td class="active">
    79     <a href="" tal:attributes="href string:${info/url}/session_results_view">
     79   
    8080    Returning
    81     </a>
     81
    8282  </td></tr>
    8383  </span>
  • WAeUP_SRP/base/skins/waeup_student/create_level.py

    r2752 r2758  
    117117    cert = res[0]
    118118    path = cert.getPath()
    119     query = Eq("path","%s/%s" % (path,current_level)) &\
     119    academics_level = 100 * (int(current_level)/100)
     120    query = Eq("path","%s/%s" % (path,academics_level)) &\
    120121            Eq('portal_type','CertificateCourse')
    121122    courses = aq_portal(query)
  • WAeUP_SRP/base/skins/waeup_student/getStudyLevelInfo.py

    r2757 r2758  
    3838logger = logging.getLogger('Skins.getStudyLevelInfo')
    3939
     40info = {}
     41
    4042student_id = context.getStudentId()
    41 level_id = context.getId()
     43level_id  = context.getId()
    4244
    43 info = {}
    4445info['is_so'] = is_so = context.isSectionOfficer()
    4546info['is_student'] = is_student = context.isStudent()
     
    4950info['view_only'] =  review_state != "school_fee_paid"
    5051
     52level_doc = info['doc'] = context.getContent()
    5153
    5254school_fee_paid =  review_state == 'school_fee_paid'
    53 
    5455is_current_level = level_id == student.level
    5556
    56 info['show_check_boxes'] =  (is_ca and school_fee_paid and is_current_level) or\
    57                             (is_student and school_fee_paid and is_current_level) or\
    58                             (is_so and is_current_level)
     57
     58
     59info['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)
    5962
    6063info['is_current_level'] = is_current_level
     
    7275    elif review_state == 'courses_validated':
    7376        info['status_info'] = "Courses validated"
    74 level_doc = info['doc'] = context.getContent()
     77
    7578cert_id = student.course
    7679info['cert_id'] = cert_id
     
    9093if gpa and total_credits:
    9194    info['gpa'] = "%4.2f" % (float(gpa)/int(total_credits))
    92    
    93 info['submission_allowed']= school_fee_paid and level_id == student.level
     95
     96info['submission_allowed']= school_fee_paid and level_id == student.level and not level_doc.verdict
    9497info['validation_allowed']= review_state == 'courses_registered' and is_current_level
    9598info['rejection_allowed']= review_state in ('courses_registered', 'courses_validated',) and is_current_level
    9699
    97 info['verdict'] = context.portal_vocabularies.verdicts.get(level_doc.verdict)
     100info['verdict'] = context.portal_vocabularies.verdicts.get(level_doc.verdict).upper()
    98101info['session'] = context.portal_vocabularies.sessions.get(level_doc.session)
     102info['level_str'] = context.portal_vocabularies.levels.get(level_id)
     103
    99104
    100105# carry_overs.sort(cmp_semester_id)
  • WAeUP_SRP/base/skins/waeup_student/refresh_level.py

    r2460 r2758  
    4747res = context.portal_catalog(portal_type="Certificate", id = cert_id)
    4848query = Eq('student_id',student_id) & Eq('level_id', level_id)
    49 existing_courses = [course.code for course in 
     49existing_courses = [course.code for course in
    5050                    context.course_results.evalAdvancedQuery(query)]
    5151l = []
     
    5454    cert = res[0]
    5555    path = cert.getPath()
    56     query = Eq("path","%s/%s" % (path,student.level)) &\
     56    academics_level = 100 * (int(student.level)/100)
     57    query = Eq("path","%s/%s" % (path,academics_level)) &\
    5758            Eq('portal_type','CertificateCourse')
    5859    courses = aq_portal(query)
     
    6768        d['core_or_elective'] = getattr(c.getObject().getContent(),'core_or_elective')
    6869        d['course_id'] = course_id
    69         d['student_id'] = student_id 
    70         d['level_id'] = level_id 
     70        d['student_id'] = student_id
     71        d['level_id'] = level_id
    7172        d['key'] = "%s|%s|%s" % (student_id,level_id,course_id)
    7273        records.append(d)
  • WAeUP_SRP/base/skins/waeup_student/study_level_view.pt

    r2757 r2758  
    1717                       view_only info/view_only">       
    1818    <div style="text-align: right"
    19          tal:condition="python:review_state in ('courses_registered','courses_validated',)">
     19         tal:condition="python:review_state in ('courses_registered','courses_validated',) and is_current_level">
    2020    <a href="" target="slip" tal:attributes="href string:course_registration_slip"
    2121        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')">
     
    2424    </a>
    2525    </div>
     26   
     27    <div style="text-align: right"
     28         tal:condition="info/verdict">
     29    <a href="" target="slip" tal:attributes="href string:new_session_results_slip"
     30        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')">
     31        <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
     32        Session Results Slip
     33    </a>
     34    </div>   
    2635
    2736         
     
    6473    <form action="." method="post" class="group" onsubmit="return submit_once()">
    6574      <span tal:condition="info/carry_overs" tal:omit-tag="">
    66       <h4>Carryover Courses</h4>
     75      <h3>Carryover Courses</h3>
    6776      <br />
    6877      <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">
     
    94103      </table>
    95104      </span>
    96       <br />
    97105
    98106      <div class="" tal:condition="python: info['data_missing'] and not info['spillover']">
     
    102110       
    103111      <span tal:condition="not:info/data_missing" tal:omit-tag="">
    104       <h4>Session Courses</h4>
     112      <h3>Session Courses</h3>
    105113      <br />
    106114
     
    112120        <th tal:attributes="colspan python: test(show_check_boxes,'2','1')"
    113121            tal:content="python: test(sem == '1','First Semester', 'Second Semester')" />
    114         <th align='center'>code</th>
     122        <th align='center'></th>
    115123        <th align='center'>sm</th>
    116124        <th align='center'>cr</th>
     
    186194      </span>
    187195     
    188    
     196      <br />
     197      <table>
     198      <tr><th>sm:</th> <td>Semester</td></tr>
     199      <tr><th>cr:</th> <td>Credits</td></tr>
     200      <tr><th>sc:</th> <td>Score</td></tr>
     201      <tr><th>gr: </th> <td>Grade</td></tr>
     202      <tr><th>wt: </th> <td>Weight</td></tr>
     203      </table>     
     204         
     205      <br />
    189206     
    190207      <table tal:condition="python: is_student and info['submission_allowed'] and show_check_boxes" width="100%" cellspacing="0" cellpadding="2"
     
    230247        </tr>
    231248      </table>
    232       <table tal:condition="python:is_so and is_current_level" width="100%" cellspacing="0" cellpadding="2"
     249      <table tal:condition="python: is_so and show_check_boxes" width="100%" cellspacing="0" cellpadding="2"
    233250             class="folderButtons">
    234251        <tr>
Note: See TracChangeset for help on using the changeset viewer.