Changeset 1515 for WAeUP_SRP/trunk/skins


Ignore:
Timestamp:
3 Mar 2007, 11:45:58 (18 years ago)
Author:
Henrik Bettermann
Message:

CouseAdviser? role modifications

Location:
WAeUP_SRP/trunk/skins
Files:
1 added
1 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_custom/getCPSCandidateLocalRoles.py

    r1028 r1515  
    2424
    2525if member.id in ("admin","perry"):
    26     return ['SectionReader','SectionManager','ClearanceOfficer', 'SectionOfficer']
    27 return ['SectionReader', 'ClearanceOfficer', 'SectionOfficer']
     26    return ['SectionReader','SectionManager','ClearanceOfficer', 'SectionOfficer', 'CourseAdviser']
     27return ['SectionReader', 'ClearanceOfficer', 'SectionOfficer', 'CourseAdviser']
  • WAeUP_SRP/trunk/skins/waeup_default/isCourseAdviser.py

    r1513 r1515  
    1616mtool = context.portal_membership
    1717roles = mtool.getAuthenticatedMember().getRolesInContext(context)
    18 return context.isSectionOfficer or "ClearanceOfficer" in roles
     18return "CourseAdviser" in roles
     19
  • WAeUP_SRP/trunk/skins/waeup_student/getStudyLevelInfo.py

    r1513 r1515  
    5252student_id = context.getStudentId()
    5353
     54
     55
    5456info = {}
    55 info['is_student'] = is_student = context.isStudent()
    56 info['is_ca'] = is_ca = context.isCourseAdviser()
     57info['is_so'] = is_so = context.isSectionOfficer()
     58info['is_student'] = is_student = context.isStudent()
     59info['is_ca'] = is_ca = context.isCourseAdviser()
    5760info['student'] = student = context.students_catalog(id=student_id)[0]
    5861info['review_state'] = review_state = context.getStudentReviewState()
    59 info['view_only'] =  review_state != "school_fee_paid"
    60 info['show_check_boxes'] =  (is_ca and review_state == 'courses_registered') or (is_student and context.getStudentReviewState() == "school_fee_paid")
     62info['view_only'] =  review_state != "school_fee_paid"
     63info['show_check_boxes'] =  (is_ca and review_state in ('courses_registered',)) or\
     64                            (is_student and context.getStudentReviewState() == "school_fee_paid") or\
     65                            (is_so)
    6166info['choosen_ids'] = request.get('ids',[])
    6267info['status_info'] = ""
    6368if is_student:
    64     if review_state == 'courses_registered': 
     69    if review_state == 'courses_registered':
    6570        info['status_info'] = "Request for Course Validation pending"
    66     elif review_state == 'courses_validated': 
     71    elif review_state == 'courses_validated':
    6772        info['status_info'] = "Courses validated"
    6873elif is_ca:
    69     if review_state == 'courses_registered': 
     74    if review_state == 'courses_registered':
    7075        info['status_info'] = "Please validate these Courses"
    71     elif review_state == 'courses_validated': 
     76    elif review_state == 'courses_validated':
    7277        info['status_info'] = "Courses validated"
    7378info['doc'] = context.getContent()
  • WAeUP_SRP/trunk/skins/waeup_student/study_level_view.pt

    r1513 r1515  
    2626
    2727      <h3>
    28         <span tal:condition="is_so">
     28        <span tal:condition="python: is_so or is_ca">
    2929          <span tal:content="info/student/name" />:
    3030        </span>
    31         <span tal:content="here/title_or_id" />
     31        <span tal:condition="is_student">My </span>
     32       
     33        Course Registration Form for <span tal:content="here/title_or_id" />
    3234      </h3>
    33       <br />
     35
    3436    </metal:block>
    3537    <metal:main fill-slot="main" tal:condition="python:1">
    36       <h3 tal:content="status_info"></h3>
    3738      <form action="." method="post" class="group">
    3839        <span tal:condition="info/carry_overs" tal:omit-tag="">
    39         <h3>Carryover Courses</h3>
     40        <h4>Carryover Courses</h4>
    4041        <br />
    4142        <table tal:condition="python: 1" class="contentListing" width="100%" summary="content layout" id="folder_content">
     
    5859          </tr>
    5960        </table>
    60         </span>
    61         <h3>Session Courses</h3>
     61        </span>
     62        <br />
     63        <h4>Session Courses</h4>
    6264        <br />
    6365        <table class="contentListing" width="100%" summary="content layout" id="folder_content">     
     
    6567              tal:attributes="class python:test(repeat['row'].even(), 'even ajaxtd', 'odd ajaxtd')">
    6668            <td align="left" valign="middle" style="width: 5px;"
    67                 tal:condition="show_check_boxes">
     69                      tal:condition="show_check_boxes">
    6870              <input type="checkbox" name="ids:list" value="" id="" class="noborder"
    6971                     tal:define="id row/id"
     
    8082          </tr>
    8183          <tr>
    82             <td colspan="1"></td>
     84            <td tal:condition="show_check_boxes" colspan="1"></td>
    8385            <td colspan="1"></td>
    8486            <th colspan="2">Total Credits:</th>
     
    8688          </tr>
    8789        </table>
    88         <table tal:condition="not:view_only" width="100%" cellspacing="0" cellpadding="2"
     90
     91       
     92     
     93       
     94        <table tal:condition="python: is_student and review_state == 'school_fee_paid'" width="100%" cellspacing="0" cellpadding="2"
    8995               class="folderButtons">
    9096          <tr>
    9197            <td align="left" valign="top" rowspan="3"></td>
    9298            <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"
     99                <input type="submit" name="course_result_delete:method" value="Delete Selected"
    101100                       class="destructive" i18n:attributes="value"
    102101                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
    103                        ('really delete checked courses', )"
     102                       ('Do you really want to delete selected courses?', )"
    104103                       />
    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"
     104                <input
    110105                       type="submit" name="refresh_level:method"
    111                        class="context" value="Refresh List"
     106                       class="context" value="Check for Courses"
    112107                       />
    113               </span>
     108                <br /><br />
     109                <input type="submit" name="register_courses:method"
     110                       class="context" value="Submit Course List" />
    114111            </td>
    115112          </tr>
    116113        </table>
    117         <table tal:condition="python:is_ca and show_check_boxes" width="100%" cellspacing="0" cellpadding="2"
     114        <table tal:condition="python:is_so" width="100%" cellspacing="0" cellpadding="2"
    118115               class="folderButtons">
    119116          <tr>
    120117            <td align="left" valign="top" rowspan="3"></td>
    121118            <td align="left" valign="top">
    122               <span tal:condition="python:1">
    123                 <input type="button" value="button_select_all" class="context"
     119                <input type="button" value="Select All" class="context"
    124120                       onclick="someJavaScriptFunctionThatWillBeReplaced"
    125121                       i18n:attributes="value"
     
    127123                       % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
    128124                       />
    129                 <input type="submit" name="course_result_delete:method" value="Delete checked"
     125                <input type="submit" name="course_result_delete:method" value="Delete Selected"
    130126                       class="destructive" i18n:attributes="value"
    131127                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
    132128                       ('really delete checked courses', )"
    133129                       />
    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" />
    138                 <input tal:condition="python: 1"
     130                <input
    139131                       type="submit" name="refresh_level:method"
    140                        class="context" value="Refresh List"
     132                       class="context" value="Check for Courses"
    141133                       />
    142               </span>
     134                <input tal:condition="python: review_state == 'school_fee_paid'" type="submit" name="register_courses:method"
     135                       class="context" value="Submit Course List" /> 
     136                <input tal:condition="python: review_state == 'courses_registered'" type="submit" name="validate_courses:method"
     137                       class="context" value="Validate List" />
     138                <input tal:condition="python: review_state in ('courses_registered', 'courses_validated',)" type="submit" name="reject_courses:method"
     139                       class="context" value="Reject Course List" />
     140
    143141            </td>
    144142          </tr>
    145143        </table>
     144        <table tal:condition="python:is_ca" width="100%" cellspacing="0" cellpadding="2"
     145               class="folderButtons">
     146          <tr>
     147            <td align="left" valign="top" rowspan="3"></td>
     148            <td align="left" valign="top">
     149                <input tal:condition="python: review_state == 'school_fee_paid'"
     150                       type="button" value="Select All" class="context"
     151                       onclick="someJavaScriptFunctionThatWillBeReplaced"
     152                       i18n:attributes="value"
     153                       tal:attributes="onclick python:'toggleSelect(this, \'%s\', \'%s\')'
     154                       % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
     155                       />
     156                <input tal:condition="python: review_state == 'school_fee_paid'"
     157                       type="submit" name="course_result_delete:method" value="Delete Selected"
     158                       class="destructive" i18n:attributes="value"
     159                       tal:attributes="onclick python:'return window.confirm(\'%s\')' %
     160                       ('really delete checked courses', )"
     161                       />
     162                <input tal:condition="python: review_state == 'school_fee_paid'"
     163                       type="submit" name="refresh_level:method"
     164                       class="context" value="Check for Courses"
     165                       />
     166                <input tal:condition="python: review_state == 'school_fee_paid'" type="submit" name="register_courses:method"
     167                       class="context" value="Submit Course List" /> 
     168                <input tal:condition="python: review_state == 'courses_registered'" type="submit" name="validate_courses:method"
     169                       class="context" value="Validate List" />
     170                <input tal:condition="python: review_state in ('courses_registered', 'courses_validated',)" type="submit" name="reject_courses:method"
     171                       class="context" value="Reject Course List" />
     172
     173            </td>
     174          </tr>
     175        </table>
     176
    146177      </form>
    147178      <br />
    148       <form action="add_course_result" method="post" class="group"
     179        <form action="add_course_result" method="post" class="group"
    149180            tal:condition="show_check_boxes">
    150181        <table>
     
    155186            <td tal:condition="request/error|nothing"
    156187                tal:content="request/error" />
    157           </tr>
    158           <tr>
    159             <th></th>
    160188            <td colspan="2">
    161189              <input type="submit" name="add"
    162190                     class="context" value="Add Course"
    163191                     />
    164             </td>
    165           </tr>
     192            </td>               
    166193        </table>
    167       </form>          
     194        </form>         
    168195    </metal:main>
    169196  </metal:body>
Note: See TracChangeset for help on using the changeset viewer.