Changeset 2757 for WAeUP_SRP


Ignore:
Timestamp:
25 Nov 2007, 18:21:03 (17 years ago)
Author:
Henrik Bettermann
Message:

revised study_level_view and methods

Location:
WAeUP_SRP/base
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/WAeUPTables.py

    r2750 r2757  
    13191319        normal1 = []
    13201320        normal2 = []
    1321         normal3 = []
    1322         credits = 0
     1321        normal3 = [] 
     1322        total_credits = 0
     1323        gpa = 0
    13231324        for brain in course_results:
    13241325            d = {}
     1326            weight = ''
     1327            grade = ''
    13251328            if str(brain.credits).isdigit():
    1326                 credits += int(brain.credits)
     1329                credits = int(brain.credits)
     1330                total_credits += credits
     1331                if str(brain.score).isdigit():
     1332                    score = int(brain.score)
     1333
     1334                    grade,weight = self.getGradesFromScore(score)
     1335                    #weight = 4
     1336                    #grade = 'B'
     1337                    if weight:
     1338                        gpa += weight * credits
     1339 
     1340           
    13271341            for field in self.schema():
    13281342                d[field] = getattr(brain,field,'')
    1329             #d['sheduled'] = brain.queue_status == ADDING_SHEDULED
    1330             d['coe'] = 'Elective'
     1343
     1344            d['weight'] = weight
     1345            d['grade'] = grade         
     1346           
     1347            d['coe'] = ''
    13311348            if brain.core_or_elective:
    13321349                d['coe'] = 'Core'
     1350            elif brain.core_or_elective == False:
     1351                d['coe'] = 'Elective'
    13331352            id = code = d['id'] = brain.code
    13341353            d['code'] = code
     
    13541373        carry_overs.sort(cmp=lambda x,y: cmp("%(semester)s%(code)s" % x,
    13551374                                             "%(semester)s%(code)s" % y))
    1356         return credits,carry_overs,normal1,normal2,normal3
     1375        return total_credits,gpa,carry_overs,normal1,normal2,normal3
    13571376    ###)
    13581377
  • WAeUP_SRP/base/skins/waeup_default/getSessionsVoc.py

    r2653 r2757  
    1515    y = int(key)
    1616except:
    17     return ''
     17    return key
    1818if y == -1:
    1919    return ''
  • WAeUP_SRP/base/skins/waeup_student/course_registration_slip.pt

    r2649 r2757  
    8888          <td align="center" width="2%">S<span tal:content="row/semester" /></td>
    8989          <td align="center" width="4%" tal:content="row/credits"></td>
    90           <td align="center" width="10%" tal:content="row/coe|nothing"></td>
    91          
    92           <td tal:condition="python:review_state == 'school_fee_paid'" width="5%" align="center">
    93           <a href="edit" tal:attributes="href string:course_edit/${row/code}"
    94           target="edit"
    95           onclick="javascript:window.open('','edit','width=600, height=350, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
    96           [edit]
    97           </a>
    98           </td>         
     90          <td align="center" width="10%" tal:content="row/coe|nothing"></td>     
    9991        </tr>
    10092       
     
    110102          <td align="center" width="10%" tal:content="row/coe|nothing"></td>
    111103         
    112           <td tal:condition="python:review_state == 'school_fee_paid'" width="5%" align="center">
    113           <a href="edit" tal:attributes="href string:course_edit/${row/code}"
    114           target="edit"
    115           onclick="javascript:window.open('','edit','width=600, height=350, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
    116           [edit]
    117           </a>
    118           </td>         
     104 
    119105        </tr>       
    120106       
     
    123109            <td width="84%" colspan="2" align="right">Total Credits:</td>
    124110            <td width="2%">&nbsp;</td>
    125             <td width="4%" tal:content="info/credits_total"></td>
     111            <td align="center" width="4%" tal:content="info/total_credits"></td>
    126112            <td width="10%">&nbsp;</td>
    127113          </tr>
  • WAeUP_SRP/base/skins/waeup_student/external_study_level_view.pt

    r2630 r2757  
    33          tal:define="info context/getStudyLevelInfo;">
    44             
    5     <span tal:condition="not: info">
    6       <span tal:content="here/illegal_view" />
    7     </span>
    8     <span tal:condition="info">
    9     <span tal:define= "is_so context/isSectionOfficer;
    10                        is_ca info/is_ca;
    11                        show_check_boxes info/show_check_boxes;
    12                        is_student info/is_student;
    13                        status_info info/status_info;
    14                        review_state info/review_state;
    15                        view_only info/view_only">       
     5  <metal:block use-macro="here/study_level_view/macros/edit_form" />
    166
    17     <div style="text-align: right"
    18          tal:condition="python:review_state in ('courses_registered','courses_validated',)">
    19     <a href="" target="slip" tal:attributes="href string:course_registration_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         Course Registration Slip
    23     </a>
    24     </div>
    25 
    26 
    27       <h3>
    28         <span tal:condition="python: is_so or is_ca">
    29           <span tal:content="info/student/name" />:
    30         </span>
    31         Course Registration Form for <span tal:content="here/title_or_id" />
    32       </h3>
    33 
    34       <form action="." method="post" class="group">
    35         <span tal:condition="info/carry_overs" tal:omit-tag="">
    36         <h4>Carryover Courses</h4>
    37         <br />
    38         <table class="contentListing" width="100%" summary="content layout" id="folder_content" tal:condition="info/carry_overs">
    39           <tr tal:repeat="row info/carry_overs"
    40               tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
    41              
    42             <td align="left" valign="middle" width="5%" tal:condition="show_check_boxes">
    43               <input type="checkbox" name="ids:list" value="" id="" class="noborder"
    44                      tal:define="id row/id"
    45                      tal:attributes="value id;
    46                      id python:'cb_' + id;
    47                      checked python:id in info['choosen_ids'];"
    48                      />
    49             </td>
    50             <td width="69%" tal:content="row/title"></td>
    51             <td align="center" width="10%" tal:content="row/code"></td>
    52             <td align="center" width="2%">S<span tal:content="row/semester" /></td>
    53             <td align="center" width="4%" tal:content="row/credits"></td>
    54             <td align="center" width="10%">CO</td>
    55           </tr>
    56         </table>
    57         </span>
    58         <br />
    59        
    60         <h4>Session Courses</h4>
    61         <br />
    62     <div class="" tal:condition="python: not (info['normal1'] or info['normal2'] or info['normal3'])">
    63       <font color="red">Your faculty has not yet provided the list of courses for your certificate. Please contact your faculty!</font>
    64       <br /><br />
    65     </div>
    66          
    67       <table class="contentListing" width="100%" id="folder_content">
    68        
    69         <span tal:repeat="sem python:('1','2')">       
    70         <tr><th colspan="5" tal:content="python: test(sem == '1','First Semester', 'Second Semester')" /></tr>               
    71         <tr tal:repeat="row python: test(sem == '1',info['normal1'],info['normal2'])"
    72             tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
    73           <td align="left" valign="middle" style="width: 5%;"
    74              tal:condition="show_check_boxes">
    75             <input type="checkbox" name="ids:list" value="" id="" class="noborder"
    76                    tal:define="id row/id"
    77                    tal:attributes="value id;
    78                    id python:'cb_' + id;
    79                    checked python:id in info['choosen_ids'];"
    80                    />
    81           </td>
    82           <td width="69%" tal:content="row/title"></td>
    83           <td align="center" width="10%" tal:content="row/code"></td>
    84           <td align="center" width="2%">S<span tal:content="row/semester" /></td>
    85           <td align="center" width="4%" tal:content="row/credits"></td>
    86           <td align="center" width="10%" tal:content="row/coe|nothing"></td>
    87          
    88           <td tal:condition="python:review_state == 'school_fee_paid'" width="5%" align="center">
    89           <a href="edit" tal:attributes="href string:course_edit/${row/code}"
    90           target="edit"
    91           onclick="javascript:window.open('','edit','width=600, height=350, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
    92           [edit]
    93           </a>
    94           </td>         
    95         </tr>
    96 
    97         </span>       
    98        
    99         <tr><th colspan="5" tal:condition="info/normal3"> Combined</th></tr>               
    100         <tr tal:condition="info/normal3" tal:repeat="row info/normal3"
    101             tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
    102           <td align="left" valign="middle" style="width: 5%;"
    103              tal:condition="show_check_boxes">
    104             <input type="checkbox" name="ids:list" value="" id="" class="noborder"
    105                    tal:define="id row/id"
    106                    tal:attributes="value id;
    107                    id python:'cb_' + id;
    108                    checked python:id in info['choosen_ids'];"
    109                    />
    110           </td>
    111           <td width="69%" tal:content="row/title"></td>
    112           <td align="center" width="10%" tal:content="row/code"></td>
    113           <td align="center" width="2%">S<span tal:content="row/semester" /></td>
    114           <td align="center" width="4%" tal:content="row/credits"></td>
    115           <td align="center" width="10%" tal:content="row/coe|nothing"></td>
    116          
    117           <td tal:condition="python:review_state == 'school_fee_paid'" width="5%" align="center">
    118           <a href="edit" tal:attributes="href string:course_edit/${row/code}"
    119           target="edit"
    120           onclick="javascript:window.open('','edit','width=600, height=350, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
    121           [edit]
    122           </a>
    123           </td>         
    124         </tr>             
    125          
    126 
    127           <tr>
    128             <td width="5%" tal:condition="show_check_boxes">&nbsp;</td>
    129             <td width="80%" colspan="2" align="right">Total Credits:</td>
    130             <td width="2%">&nbsp;</td>
    131             <td width="4%" align="center" tal:content="info/credits_total"></td>
    132             <td width="9%">&nbsp;</td>
    133           </tr>
    134         </table>
    135 
    136        
    137      
    138        
    139         <table tal:condition="python: is_student and review_state == 'school_fee_paid'" width="100%" cellspacing="0" cellpadding="2"
    140                class="folderButtons">
    141           <tr>
    142             <td align="left" valign="top" rowspan="3"></td>
    143             <td align="left" valign="top">
    144                 <input type="submit" name="delete_course_result:method" value="Delete selected"
    145                        class="destructive" i18n:attributes="value"
    146                        tal:attributes="onclick python:'return window.confirm(\'%s\')' %
    147                        ('Do you really want to delete selected courses?', )"
    148                        />
    149                 <input type="submit" name="refresh_level:method"
    150                        class="context" value="Update"
    151                        />
    152                 <br /><br />
    153                 <input tal:condition="info/normal"
    154                        type="submit" name="register_courses:method"
    155                        class="context" value="Submit" />
    156             </td>
    157           </tr>
    158         </table>
    159         <table tal:condition="python:is_so" width="100%" cellspacing="0" cellpadding="2"
    160                class="folderButtons">
    161           <tr>
    162             <td align="left" valign="top" rowspan="3"></td>
    163             <td align="left" valign="top">
    164                 <input type="button" value="Select all" class="context"
    165                        onclick="someJavaScriptFunctionThatWillBeReplaced"
    166                        i18n:attributes="value"
    167                        tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
    168                        % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
    169                        />
    170                 <input type="submit" name="delete_course_result:method" value="Delete selected"
    171                        class="destructive" i18n:attributes="value"
    172                        tal:attributes="onclick python:'return window.confirm(\'%s\')' %
    173                        ('Do you really want to delete the courses selected?', )"
    174                        />
    175                 <input
    176                        type="submit" name="refresh_level:method"
    177                        class="context" value="Update"
    178                        />
    179                 <input tal:condition="python: review_state == 'school_fee_paid'" type="submit" name="register_courses:method"
    180                        class="context" value="Submit" /> 
    181                 <input tal:condition="python: review_state == 'courses_registered'" type="submit" name="validate_courses:method"
    182                        class="context" value="Validate" />
    183                 <input tal:condition="python: review_state in ('courses_registered', 'courses_validated',)" type="submit" name="reject_courses:method"
    184                        class="context" value="Reject" />
    185                 <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
    186                        tal:attributes="value string:external_study_level_view"/>                         
    187                 <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
    188                        tal:attributes="value string:external_contact_student_form"/>                           
    189 
    190             </td>
    191           </tr>
    192         </table>
    193         <table tal:condition="python:is_ca" width="100%" cellspacing="0" cellpadding="2"
    194                class="folderButtons">
    195           <tr>
    196             <td align="left" valign="top" rowspan="3"></td>
    197             <td align="left" valign="top">
    198                 <input tal:condition="python: review_state == 'school_fee_paid'"
    199                        type="button" value="Select all" class="context"
    200                        onclick="someJavaScriptFunctionThatWillBeReplaced"
    201                        i18n:attributes="value"
    202                        tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
    203                        % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
    204                        />
    205                 <input tal:condition="python: review_state == 'school_fee_paid'"
    206                        type="submit" name="delete_course_result:method" value="Delete selected"
    207                        class="destructive" i18n:attributes="value"
    208                        tal:attributes="onclick python:'return window.confirm(\'%s\')' %
    209                        ('Do you really want to delete the courses selected?', )"
    210                        />
    211                 <input tal:condition="python: review_state == 'school_fee_paid'"
    212                        type="submit" name="refresh_level:method"
    213                        class="context" value="Update"
    214                        />
    215                 <input tal:condition="python: review_state == 'school_fee_paid'" type="submit" name="register_courses:method"
    216                        class="context" value="Submit" /> 
    217                 <input tal:condition="python: review_state == 'courses_registered'" type="submit" name="validate_courses:method"
    218                        class="context" value="Validate" />
    219                 <input tal:condition="python: review_state in ('courses_registered', 'courses_validated',)" type="submit" name="reject_courses:method"
    220                        class="context" value="Reject" />
    221 
    222                 <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
    223                        tal:attributes="value string:external_study_level_view"/>                         
    224                 <input type="hidden" name="action_after_reject" type="text" id="action_after_reject"
    225                        tal:attributes="value string:external_contact_student_form"/>   
    226                                            
    227 
    228             </td>
    229           </tr>
    230         </table>
    231 
    232       </form>
    233       <br />
    234         <form action="add_course_result" method="post" class="group"
    235             tal:condition="show_check_boxes">
    236         <table>
    237           <tr>
    238             <th>Course Id</th>
    239             <td><input type="text" name="course_id"
    240                        tal:attributes="value request/course_id|nothing"/></td>
    241             <td colspan="2">
    242               <input type="submit" name="add"
    243                      class="context" value="Add Course"
    244                      />
    245               <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
    246                        tal:attributes="value string:external_study_level_view"/>                     
    247             </td>               
    248         </table>
    249         </form>         
    250   </span>
    251   </span>         
    2527  </metal:main>
    2538</metal:body>
  • WAeUP_SRP/base/skins/waeup_student/getStudyLevelInfo.py

    r2664 r2757  
    5050
    5151
    52 has_paid =  review_state == 'school_fee_paid'
     52school_fee_paid =  review_state == 'school_fee_paid'
    5353
    54 info['show_check_boxes'] =  (is_ca and has_paid) or\
    55                             (is_student and has_paid) or\
    56                             (is_so)
     54is_current_level = level_id == student.level
    5755
     56info['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)
     59
     60info['is_current_level'] = is_current_level
    5861
    5962info['choosen_ids'] = request.get('ids',[])
     
    6164if is_student:
    6265    if review_state == 'courses_registered':
    63         info['status_info'] = "Request for Course Validation pending"
     66        info['status_info'] = "Request for course validation pending"
    6467    elif review_state == 'courses_validated':
    6568        info['status_info'] = "Courses validated"
    6669elif is_ca:
    6770    if review_state == 'courses_registered':
    68         info['status_info'] = "Please validate these Courses"
     71        info['status_info'] = "Please validate these courses"
    6972    elif review_state == 'courses_validated':
    7073        info['status_info'] = "Courses validated"
    71 info['doc'] = context.getContent()
     74level_doc = info['doc'] = context.getContent()
    7275cert_id = student.course
    7376info['cert_id'] = cert_id
     
    7578    course_results.moveResultsHere(context,student_id)
    7679    logger.info("%s initiated moveResultsHere for %s in level %s" % (member_id,student_id,level_id))
    77 credits_total,carry_overs,normal1,normal2,normal3 = course_results.getCourses(student_id,level_id)
    78 info['credits_total'] = credits_total
     80total_credits,gpa,carry_overs,normal1,normal2,normal3 = course_results.getCourses(student_id,level_id)
     81info['total_credits'] = total_credits
    7982max_credits = 50
    8083if context.getId() == student.end_level:
    8184    max_credits = 51
    8285info['max_credits'] = max_credits
    83 info['credits_exceeded'] = credits_total > max_credits
     86info['credits_exceeded'] = total_credits > max_credits
    8487current_session = student.session
    8588
    86 info['submission_allowed']= review_state in  ('school_fee_paid','returning') and has_paid
    87 info['validation_allowed']= review_state == 'courses_registered'
    88 info['rejection_allowed']= review_state in ('courses_registered', 'courses_validated',)
     89info['gpa'] = gpa
     90if gpa and total_credits:
     91    info['gpa'] = "%4.2f" % (float(gpa)/int(total_credits))
     92   
     93info['submission_allowed']= school_fee_paid and level_id == student.level
     94info['validation_allowed']= review_state == 'courses_registered' and is_current_level
     95info['rejection_allowed']= review_state in ('courses_registered', 'courses_validated',) and is_current_level
    8996
     97info['verdict'] = context.portal_vocabularies.verdicts.get(level_doc.verdict)
     98info['session'] = context.portal_vocabularies.sessions.get(level_doc.session)
    9099
    91100# carry_overs.sort(cmp_semester_id)
  • WAeUP_SRP/base/skins/waeup_student/study_level_view.pt

    r2664 r2757  
    22  <metal:main fill-slot="main"
    33          tal:define="info context/getStudyLevelInfo;">
    4              
     4  <metal:block define-macro="edit_form">   
     5             
    56    <span tal:condition="not: info">
    67      <span tal:content="here/illegal_view" />
     
    1011                       is_ca info/is_ca;
    1112                       show_check_boxes info/show_check_boxes;
     13                       is_current_level info/is_current_level;
    1214                       is_student info/is_student;
    1315                       status_info info/status_info;
     
    3840      Course Registration Form for <span tal:content="here/Title" />
    3941    </h3>
     42   
     43        <br />
     44        <table>
     45          <tr>
     46            <th  width="220px">Session:</th>
     47            <td><span tal:content="info/session" /></td>
     48          </tr>
     49          <tr>
     50            <th>Total Credits:</th>
     51            <td tal:content="info/total_credits" />
     52          </tr>
     53          <tr>
     54            <th>Verdict:</th>
     55            <td><span tal:content="info/verdict" /></td>
     56          </tr>     
     57          <tr>
     58            <th>GPA:</th>
     59            <td><span tal:content="info/gpa" /></td>
     60          </tr>
     61        </table>           
     62   
    4063             
    4164    <form action="." method="post" class="group" onsubmit="return submit_once()">
     
    5679                   />
    5780          </td>
    58           <td width="64%" tal:content="row/title"></td>
     81
     82          <td width="58%" tal:content="row/title"></td>
    5983          <td align="center" width="10%" tal:content="row/code"></td>
    60           <td align="center" width="2%">S<span tal:content="row/semester" /></td>
    61           <td align="center" width="4%" tal:content="row/credits"></td>
    62           <td align="center" width="10%"> <span tal:content="row/coe|nothing" /></td>
    63           <td tal:condition="python:review_state == 'school_fee_paid'" align="center" width="5%">&nbsp;</td>
     84          <td align="center" width="2%"><span tal:content="row/semester" /></td>
     85          <td align="center" width="2%" tal:content="row/credits"></td>
     86          <td align="center" width="4%" tal:content="row/score"></td>
     87          <td align="center" width="2%" tal:content="row/grade"></td>
     88          <td align="center" width="2%" tal:content="row/weight"></td>
     89          <td align="center" width="10%" tal:content="row/coe|nothing"></td>
     90         
     91          <td tal:condition="python:info['submission_allowed']" align="center" width="5%">&nbsp;</td>
    6492       
    6593        </tr>
     
    81109        <span tal:repeat="sem python:('1','2')">       
    82110                   
    83         <tr><th colspan="3" tal:content="python: test(sem == '1','First Semester', 'Second Semester')" /></tr>               
     111        <tr>
     112        <th tal:attributes="colspan python: test(show_check_boxes,'2','1')"
     113            tal:content="python: test(sem == '1','First Semester', 'Second Semester')" />
     114        <th align='center'>code</th>
     115        <th align='center'>sm</th>
     116        <th align='center'>cr</th>
     117        <th align='center'>sc</th>
     118        <th align='center'>gr</th>
     119        <th align='center'>wt</th>
     120        <th align='center'></th>
     121        <th align='center'></th>   
     122           
     123        </tr>               
    84124        <tr tal:repeat="row python: test(sem == '1',info['normal1'],info['normal2'])"
    85125            tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
     
    93133                   />
    94134          </td>
    95           <td width="64%" tal:content="row/title"></td>
     135          <td width="58%" tal:content="row/title"></td>
    96136          <td align="center" width="10%" tal:content="row/code"></td>
    97           <td align="center" width="2%">S<span tal:content="row/semester" /></td>
    98           <td align="center" width="4%" tal:content="row/credits"></td>
     137          <td align="center" width="2%"><span tal:content="row/semester" /></td>
     138          <td align="center" width="2%" tal:content="row/credits"></td>
     139          <td align="center" width="4%" tal:content="row/score"></td>
     140          <td align="center" width="2%" tal:content="row/grade"></td>
     141          <td align="center" width="2%" tal:content="row/weight"></td>
    99142          <td align="center" width="10%" tal:content="row/coe|nothing"></td>
    100143         
    101           <td tal:condition="python:review_state == 'school_fee_paid'" width="5%" align="center">
    102           <a href="edit" tal:attributes="href string:course_edit/${row/code}"
    103           target="edit"
    104           onclick="javascript:window.open('','edit','width=600, height=350, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
    105           [edit]
    106           </a>
     144          <td tal:condition="python:info['submission_allowed']" width="5%" align="center">
     145            <a href="edit" tal:attributes="href string:course_edit/${row/code}"
     146            target="edit"
     147            onclick="javascript:window.open('','edit','width=600, height=350, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
     148            [edit]
     149            </a>
    107150          </td>         
    108151        </tr>
     
    122165                   />
    123166          </td>
    124           <td width="64%" tal:content="row/title"></td>
     167          <td width="58%" tal:content="row/title"></td>
    125168          <td align="center" width="10%" tal:content="row/code"></td>
    126           <td align="center" width="2%">S<span tal:content="row/semester" /></td>
    127           <td align="center" width="4%" tal:content="row/credits"></td>
     169          <td align="center" width="2%"><span tal:content="row/semester" /></td>
     170          <td align="center" width="2%" tal:content="row/credits"></td>
     171          <td align="center" width="4%" tal:content="row/score"></td>
     172          <td align="center" width="2%" tal:content="row/grade"></td>
     173          <td align="center" width="2%" tal:content="row/weight"></td>
    128174          <td align="center" width="10%" tal:content="row/coe|nothing"></td>
    129175         
    130           <td tal:condition="python:review_state == 'school_fee_paid'" width="5%" align="center">
     176          <td tal:condition="python:info['submission_allowed']" width="5%" align="center">
    131177          <a href="edit" tal:attributes="href string:course_edit/${row/code}"
    132178          target="edit"
     
    137183        </tr>       
    138184       
    139         <tr>
    140           <td tal:condition="show_check_boxes" colspan="1"></td>
    141           <td colspan="1"></td>
    142           <th colspan="2">Total Credits:</th>
    143           <td align="center" width="4%" tal:content="info/credits_total"></td>
    144         </tr>
    145185      </table>
    146186      </span>
     
    148188   
    149189     
    150       <table tal:condition="python: is_student and info['submission_allowed']" width="100%" cellspacing="0" cellpadding="2"
     190      <table tal:condition="python: is_student and info['submission_allowed'] and show_check_boxes" width="100%" cellspacing="0" cellpadding="2"
    151191             class="folderButtons">
    152192        <tr>
     
    190230        </tr>
    191231      </table>
    192       <table tal:condition="python:is_so" width="100%" cellspacing="0" cellpadding="2"
     232      <table tal:condition="python:is_so and is_current_level" width="100%" cellspacing="0" cellpadding="2"
    193233             class="folderButtons">
    194234        <tr>
     
    225265        </tr>
    226266      </table>
    227       <table tal:condition="python:is_ca" width="100%" cellspacing="0" cellpadding="2"
     267      <table tal:condition="python:is_ca and is_current_level" width="100%" cellspacing="0" cellpadding="2"
    228268             class="folderButtons">
    229269        <tr>
     
    283323      </form>   
    284324  </span>
    285   </span>         
     325  </span>       
     326  </metal:block>   
    286327  </metal:main>
     328
    287329</metal:body>
    288330
Note: See TracChangeset for help on using the changeset viewer.