Changeset 603 for WAeUP_SRP/trunk


Ignore:
Timestamp:
1 Oct 2006, 10:21:09 (18 years ago)
Author:
Henrik Bettermann
Message:

batch of fixes to open the frontend for the first time

Location:
WAeUP_SRP/trunk
Files:
30 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Students.py

    r584 r603  
    115115                logger.info('%(tr_count)s: Creating Student with ID %(sid)s Matric_no %(matric_no)s ' % vars())
    116116                s = getattr(self,sid)
    117                 self.portal_registration.addMember(sid, 
     117                self.portal_registration.addMember(sid,
    118118                                                   'uNsEt' ,
    119119                                                   roles=('Member',
     
    367367            student.application.manage_setLocalRoles(sid, ['Owner',])
    368368            student.personal.manage_setLocalRoles(sid, ['Owner',])
    369            
     369
    370370    security.declareProtected(View,"Title")
    371371    def Title(self):
     
    407407        """make the student a member"""
    408408        membership = self.portal_membership
    409         membership.addMember(sid, 
     409        membership.addMember(sid,
    410410                             password ,
    411411                             roles=('Member',
     
    443443        per_doc.edit(mapping = dp)
    444444        per.manage_setLocalRoles(self.getId(), ['Owner',])
    445         self.portal_workflow.doActionFor(per,'open',dest_container=per)
    446        
     445        #self.portal_workflow.doActionFor(per,'open',dest_container=per)
     446
    447447###)
    448448
  • WAeUP_SRP/trunk/profiles/default/layouts/student_search.xml

    r596 r603  
    1212   <element value="review_state"/>
    1313  </property>
    14   <property name="label">Review State</property>
    15   <property name="label_edit">Review State</property>
     14  <property name="label">Search for students in state</property>
     15  <property name="label_edit">Search for students in state</property>
    1616  <property name="readonly_layout_modes"/>
    1717  <property name="hidden_layout_modes"/>
     
    2020 </widget>
    2121 <widget name="search_mode" meta_type="Generic Select Widget">
    22   <property name="title">Searchmode</property>
     22  <property name="title">Search Mode</property>
    2323  <property name="fields">
    2424   <element value="search_mode"/>
    2525  </property>
    2626  <property name="is_required">True</property>
    27   <property name="label">Search for</property>
    28   <property name="label_edit">Search for</property>
     27  <property name="label">and</property>
     28  <property name="label_edit">and</property>
    2929  <property name="readonly_layout_modes"/>
    3030  <property name="hidden_layout_modes"/>
    3131  <property name="hidden_readonly_layout_modes"/>
    3232  <property name="vocabulary">student_search_mode</property>
    33   <property name="render_format">radio</property>
    3433 </widget>
    3534 <widget name="search_string" meta_type="String Widget">
    36   <property name="title">Searchstring</property>
     35  <property name="title">Search String</property>
    3736  <property name="fields">
    3837   <element value="search_string"/>
    3938  </property>
    40   <property name="label">Search for</property>
    41   <property name="label_edit">Search for</property>
     39  <property name="label">beginning with</property>
     40  <property name="label_edit">beginning with</property>
    4241  <property name="readonly_layout_modes"/>
    4342  <property name="hidden_layout_modes"/>
     
    4746 <table>
    4847  <row>
    49    <cell name="review_state" ncols="2"/>
     48   <cell name="review_state" ncols="3"/>
    5049  </row>
    5150  <row>
     51   <cell name="search_mode" ncols="2"/>
    5252   <cell name="search_string"/>
    53    <cell name="search_mode"/>
    5453  </row>
    5554 </table>
    5655</object>
     56
  • WAeUP_SRP/trunk/profiles/default/vocabularies/searchable_student_states.xml

    r600 r603  
    55 <property name="description"></property>
    66 <property name="acl_write_roles">Manager</property>
    7  <item key="all" msgid="">All States</item>
    8  <item key="admission_applied " msgid="">Applied for Admission</item>
    9  <item key="created" msgid="">Data Imported</item>
    10  <item key="admission_rejected" msgid="">Admission rejected</item>
    11  <item key="admitted" msgid="">Admitted</item>
     7 <item key="all" msgid="">all states</item>
     8 <item key="created" msgid="">data imported</item>
     9 <item key="application_pin_entered" msgid="">application pin entered</item>
     10 <item key="admission_applied" msgid="">applied for admission</item>
     11 <item key="pume_passed" msgid="">pume passed</item>
     12 <item key="pume_failed" msgid="">pume failed</item>
     13 <item key="admission_rejected" msgid="">admission rejected</item>
     14 <item key="finally_rejected" msgid="">finally rejected</item>
     15 <item key="admitted" msgid="">admitted</item>
     16 <item key="clearance_pin_entered" msgid="">clearance pin entered</item>
     17 <item key="clearance_requested" msgid="">clearance requested</item>
     18 <item key="cleared_and_validated" msgid="">cleared and validated</item>
    1219</object>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/student_search_mode.xml

    r596 r603  
    55 <property name="description"></property>
    66 <property name="acl_write_roles">Manager</property>
    7  <item key="student_id" msgid="">Student Id</item>
     7 <item key="student_id" msgid="">Student Id (complete ids only)</item>
    88 <item key="name" msgid="">Name</item>
    9  <item key="matric_no" msgid="">Matriculation Number</item>
    10  <item key="jamb_id" msgid="">Jamb Id</item>
     9 <item key="matric_no" msgid="">Matriculation No</item>
     10 <item key="jamb_reg_no" msgid="">Jamb Registration No</item>
    1111</object>
  • WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_subobject_wf/definition.xml

    r572 r603  
    55              meta_type="CPS Workflow">
    66 <permission>Modify portal content</permission>
     7 <permission>View</permission>
    78 <permission>WAeUPModify own content</permission>
    8  <permission>View</permission>
    99 <state state_id="closed" title="">
    1010  <exit-transition transition_id="open"/>
    1111 </state>
    1212 <state state_id="created" title="">
    13   <exit-transition transition_id="create_content"/>
    14   <exit-transition transition_id="enter_application_pin"/>
     13  <exit-transition transition_id="close"/>
    1514  <exit-transition transition_id="open"/>
    1615  <permission-map name="Modify portal content"
     
    2019   <permission-role>SectionManager</permission-role>
    2120  </permission-map>
    22   <permission-map name="WAeUPModify own content"
    23                   acquired="False">
    24    <permission-role>Owner</permission-role>
    25   </permission-map>
    2621  <permission-map name="View" acquired="False">
    2722   <permission-role>Owner</permission-role>
    2823   <permission-role>Manager</permission-role>
    2924   <permission-role>SectionManager</permission-role>
     25  </permission-map>
     26  <permission-map name="WAeUPModify own content"
     27                  acquired="False">
     28   <permission-role>Owner</permission-role>
    3029  </permission-map>
    3130 </state>
     
    3837   <permission-role>Manager</permission-role>
    3938  </permission-map>
     39  <permission-map name="View" acquired="False">
     40   <permission-role>Owner</permission-role>
     41  </permission-map>
    4042  <permission-map name="WAeUPModify own content"
    4143                  acquired="False">
    42    <permission-role>Owner</permission-role>
    43   </permission-map>
    44   <permission-map name="View" acquired="False">
    4544   <permission-role>Owner</permission-role>
    4645  </permission-map>
     
    5150 
    5251  <guard>
    53     <guard-permission>WAeUPModify own content</guard-permission>
     52   <guard-permission>WAeUPModify own content</guard-permission>
    5453  </guard>
    5554 </transition>
     
    6867 
    6968  <guard>
    70     <guard-permission>WAeUPModify own content</guard-permission>
     69   <guard-permission>WAeUPModify own content</guard-permission>
    7170  </guard>
    7271 </transition>
    7372</cps-workflow>
     73
  • WAeUP_SRP/trunk/skins/waeup_academics/academics_index.py

    r600 r603  
    2121
    2222campus = context.portal_catalog(meta_type = "University")[-1].getObject()
    23 member = pm.getAuthenticatedMember()
    2423
    2524if context.isManager():
  • WAeUP_SRP/trunk/skins/waeup_academics/academics_index_view.pt

    r586 r603  
    3535              <strong tal:content="row/title" /></a> </td>
    3636            <td tal:content="row/id"> </td>
    37             <td><a href="edit" tal:attributes="href string:${row/url}/cpsdocument_edit_form">[edit]</a></td>
     37           
     38            <td>
     39            <a tal:condition="row/is_editable"
     40                href="edit" tal:attributes="href string:${row/url}/external_edit_form"
     41                target="edit"
     42                onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
     43                [edit]
     44                </a>
     45            </td>
     46           
    3847          </tr>
    3948        </table>
  • WAeUP_SRP/trunk/skins/waeup_academics/courses_index_view.pt

    r598 r603  
    6666                <td tal:content="row/id"> </td>
    6767                <td tal:condition="row/is_editable" tal:content="row/review_state"> </td>
    68                 <td tal:condition="row/is_editable"><a href="edit" tal:attributes="href string:${row/url}/cpsdocument_edit_form">[edit]</a></td>
     68                <td>
     69                <a tal:condition="row/is_editable"
     70                    href="edit" tal:attributes="href string:${row/url}/external_edit_form"
     71                    target="edit"
     72                    onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
     73                    [edit]
     74                    </a>
     75                </td>               
    6976              </tr>
    7077            </span>
  • WAeUP_SRP/trunk/skins/waeup_academics/getCertificateInfo.py

    r600 r603  
    1515
    1616wf = context.portal_workflow
    17 mtool = context.portal_membership
    18 member = mtool.getAuthenticatedMember()
    1917path_info = request.get('PATH_INFO').split('/')
    2018
    2119info = {}
    22 member_id = str(member)
    23 roles = member.getRoles()
    2420info['is_manager'] = context.isManager()
    2521info['is_student'] = context.isStudent()
  • WAeUP_SRP/trunk/skins/waeup_academics/getCoursesCertificatesInfo.py

    r600 r603  
    1515
    1616wf = context.portal_workflow
    17 mtool = context.portal_membership
    18 member = mtool.getAuthenticatedMember()
    1917path_info = request.get('PATH_INFO').split('/')
    2018
    2119info = {}
    22 member_id = str(member)
    23 roles = member.getRoles()
    2420info['is_manager'] = context.isManager()
    2521info['is_student'] = context.isStudent()
  • WAeUP_SRP/trunk/skins/waeup_academics/getCoursesInfo.py

    r600 r603  
    1515
    1616wf = context.portal_workflow
     17path_info = request.get('PATH_INFO').split('/')
    1718mtool = context.portal_membership
    18 member = mtool.getAuthenticatedMember()
    19 path_info = request.get('PATH_INFO').split('/')
    2019
    2120info = {}
    22 member_id = str(member)
    2321#dep_id = request.get('PATH_TRANSLATED').split('/')[-2]
    2422dep_id = context.aq_parent.getId()
    25 roles = member.getRoles()
    2623info['is_manager'] = context.isManager()
    2724info['is_student'] = context.isStudent()
  • WAeUP_SRP/trunk/skins/waeup_academics/getDocumentInfo.py

    r556 r603  
    1515
    1616wf = context.portal_workflow
    17 mtool = context.portal_membership
    18 member = mtool.getAuthenticatedMember()
    1917path_info = request.get('PATH_INFO').split('/')
    2018
    2119info = {}
    22 member_id = str(member)
    23 roles = member.getRoles()
    24 info['is_manager'] = 'Manager' in roles or 'SectionManager' in roles
    25 info['is_student'] = 'Student' in roles
     20info['is_manager'] = context.isManager
     21info['is_student'] = context.isStudent
    2622info['doc'] = context.getContent()
    2723return info
  • WAeUP_SRP/trunk/skins/waeup_academics/getFacultiesInfo.py

    r600 r603  
    1616wf = context.portal_workflow
    1717mtool = context.portal_membership
    18 member = mtool.getAuthenticatedMember()
    1918path_info = request.get('PATH_INFO').split('/')
    2019
    2120info = {}
    22 member_id = str(member)
    23 roles = member.getRoles()
    2421info['is_manager'] = context.isManager()
    25 info['is_student'] = context.isStudent() 
     22info['is_student'] = context.isStudent()
    2623info['action'] = "%s" % context.campus.absolute_url()
    2724info['choosen_ids'] = request.get('ids',[])
     
    3532    row['title'] = fd.LongTitle()
    3633    row['url'] = fo.absolute_url()
     34    row['is_editable'] = mtool.checkPermission('Modify portal content', fo)
    3735    items.append(row)
    3836info['items'] = items
  • WAeUP_SRP/trunk/skins/waeup_academics/getLevelInfo.py

    r600 r603  
    1515
    1616wf = context.portal_workflow
    17 mtool = context.portal_membership
    18 member = mtool.getAuthenticatedMember()
    1917path_info = request.get('PATH_INFO').split('/')
    2018try:
     
    2422    p = 1
    2523info = {}
    26 member_id = str(member)
    2724pt = request.get('PATH_TRANSLATED').split('/')
    2825
     
    3027cert_id = pt[-(2+p)]
    3128level_id = pt[-(1+p)]
    32 roles = member.getRoles()
    3329info['is_manager'] = context.isManager()
    3430info['is_student'] = context.isStudent()
     
    5147    row['id'] = r.getId
    5248    row['title'] = rd.Title()
    53     row['core'] = rd.core_or_elective 
     49    row['core'] = rd.core_or_elective
    5450    row['semester'] = rd.semester
    5551    row['url'] = ro.absolute_url()
  • WAeUP_SRP/trunk/skins/waeup_academics/level_index_view.pt

    r598 r603  
    4141                <td tal:content="python: test(row['core'],'core','elective')"></td>
    4242                <td tal:condition="row/is_editable" tal:content="row/review_state"> </td>
    43                 <td tal:condition="row/is_editable" ><a href="edit" tal:attributes="href string:${row/url}/cpsdocument_edit_form">[edit]</a></td>
     43                <td>
     44                <a tal:condition="row/is_editable"
     45                    href="edit" tal:attributes="href string:${row/url}/external_edit_form"
     46                    target="edit"
     47                    onclick="javascript:window.open('','edit','width=600, height=700, directories=no, toolbar=no, location=no, menubar=no, scrollbars=yes, status=no, resizable=no, dependent=no')">
     48                    [edit]
     49                    </a>
     50                </td>
    4451              </tr>
    4552            </span>
  • WAeUP_SRP/trunk/skins/waeup_academics/searchAcademics.py

    r600 r603  
    1818wf = context.portal_workflow
    1919catalog = context.portal_catalog
    20 mtool = context.portal_membership
    21 member = mtool.getAuthenticatedMember()
    2220lt = context.portal_layouts
    2321pr = context.portal_registration
    2422path_info = request.get('PATH_INFO').split('/')
    25 roles = member.getRoles()
    26 is_manager = 'Manager' in roles or 'SectionManager' in roles
     23is_manager = context.isManager
    2724validate = request.has_key("cpsdocument_edit_button")
    2825items = []
    29 default = {'search_mode': 'course', 
    30         'review_state': 'unchecked', 
     26default = {'search_mode': 'course',
     27        'review_state': 'unchecked',
    3128        'search_string': ''
    3229        }
    33        
     30
    3431rend,psm,ds = lt.renderLayout(layout_id= 'academics_search',
    3532                      schema_id= 'academics_search',
     
    5249if state == " ----- ":
    5350    state = ''
    54 if not term and what in ('student_edit','jamb_id','name','matric_no'):
     51if not term and what in ('student_edit','jamb_reg_no','name','matric_no'):
    5552    return context.academics_search_view(rendered = rend,
    5653                             psm = "You must specify a search string",
     
    6966    res = catalog(portal_type='Student',
    7067                  id = term.strip())
    71 elif what == "jamb_id":
     68elif what == "jamb_reg_no":
    7269    res = catalog(portal_type='StudentApplication',
    7370                  SearchableText="%s*" % term.strip().lower())
  • WAeUP_SRP/trunk/skins/waeup_custom/getCPSCandidateLocalRoles.py

    r525 r603  
    1818mtool = getToolByName(context, 'portal_membership')
    1919#return mtool.getCPSCandidateLocalRoles(context)
    20 return ['Manager','SectionReader','SectionManager','Student','Staff']
     20return ['SectionReader','SectionManager']
  • WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py

    r551 r603  
    2121    to_member_home = False
    2222    to_workspaces = False
    23     has_home = mtool.getHomeFolder()
    24     if has_home:
    25         to_member_home = True
    26     if not has_home and mtool.checkPermission('View', portal.workspaces):
    27         to_workspaces = True
     23##    has_home = mtool.getHomeFolder()
     24##    if has_home:
     25##        to_member_home = True
     26##    if not has_home and mtool.checkPermission('View', portal.workspaces):
     27##        to_workspaces = True
    2828    return to_member_home, to_workspaces
    2929
     
    8787        return response.redirect("%s/passport_entry_view" % student.absolute_url())
    8888    return response.redirect("%s" % student.absolute_url())
    89    
     89
    9090elif to_member_home:
    9191    redirect_url = mtool.getHomeFolder().absolute_url()
  • WAeUP_SRP/trunk/skins/waeup_default/campus_index.py

    r543 r603  
    1313"""
    1414
    15 
    1615request = context.REQUEST
    1716redirect = request.RESPONSE.redirect
     
    2221
    2322campus = context.portal_catalog(meta_type = "University")[-1].getObject()
    24 member = pm.getAuthenticatedMember()
    25 roles = member.getRoles()
    26 isManager = "Manager" in roles or "SectionManager" in roles
    27 isStudent = "Student" in roles
    2823
    29 if isManager:
     24if context.isManager():
    3025    return redirect("%s/campus_manager_view" % campus.absolute_url())
    3126
    32 if isStudent:
     27if context.isStudent():
    3328    return redirect("%s/students_index" % campus.students.absolute_url())
    3429
  • WAeUP_SRP/trunk/skins/waeup_default/index_html.py

    r543 r603  
    1313"""
    1414
    15 
    1615request = context.REQUEST
    1716redirect = request.RESPONSE.redirect
     
    2120    return redirect("%s/srp_anonymous_view" % request.get('URL1'))
    2221
    23 member = pm.getAuthenticatedMember()
    24 roles = member.getRoles()
    25 isManager = "Manager" in roles or "SectionManager" in roles
    26 isStudent = "Student" in roles
    27 
    28 if isManager:
     22if context.isManager():
    2923    return redirect("%s/srp_manager_view" % context.absolute_url())
    3024
    31 if isStudent:
     25if context.isStudent():
    3226    return redirect("%s/srp_anonymous_view" % context.absolute_url())
    3327
  • WAeUP_SRP/trunk/skins/waeup_default/isManager.py

    r600 r603  
    1010# $Id: student_edit.py 486 2006-09-06 10:09:39Z joachim $
    1111"""
    12 return True if the member is considered a Manager in this context
     12return True if the member is considered a Manager,
     13consider all non-Student members to be Managers
     14
    1315"""
    1416request = context.REQUEST
     
    1820member = mtool.getAuthenticatedMember()
    1921path_info = request.get('PATH_INFO').split('/')
    20 roles = member.getRolesInContext(context)
     22#roles = member.getRolesInContext(context)
     23roles = member.getRoles()
    2124isStudent = "Student" in roles
    2225isStaff = not isStudent
    23 isManager = "Manager" in roles or "SectionManager" in roles or isStaff
     26#isManager = "Manager" in roles or "SectionManager" in roles or isStaff
     27isManager = isStaff
    2428return isManager
  • WAeUP_SRP/trunk/skins/waeup_default/isStudent.py

    r600 r603  
    1010# $Id: student_edit.py 486 2006-09-06 10:09:39Z joachim $
    1111"""
    12 return True if the member is considered a Student in this context
     12return True if the member is considered a Student
    1313"""
    1414request = context.REQUEST
     
    1818member = mtool.getAuthenticatedMember()
    1919path_info = request.get('PATH_INFO').split('/')
    20 roles = member.getRolesInContext(context)
     20#roles = member.getRolesInContext(context)
     21roles = member.getRoles()  # Student role is global
    2122isStudent = "Student" in roles
    22 isStaff = not isStudent
    23 isManager = "Manager" in roles or "SectionManager" in roles or isStaff
    2423return isStudent
  • WAeUP_SRP/trunk/skins/waeup_default/layout_search_edit.pt

    r584 r603  
    2222    <div class=''>
    2323      <div class='documentFields'>
    24         <table width="80%" cellpadding="2" cellspacing="2" summary="Form layout">
     24        <table width="" cellpadding="2" cellspacing="2" summary="Form layout">
    2525          <tr tal:repeat="row layout/rows" valign="top">
    2626            <td tal:repeat="cell row"
  • WAeUP_SRP/trunk/skins/waeup_student/application_slip.pt

    r544 r603  
    66      </span>
    77      <span tal:condition="info">
     8     
     9      <div style="text-align: right">
     10       <a href="javascript:window.print('media=screen')">
     11         Print Slip</a>
     12      </div>
     13
     14     
    815        <h3>Post UME Acknowledegement Slip</h3>
    916        <br />     
  • WAeUP_SRP/trunk/skins/waeup_student/application_view.pt

    r548 r603  
    99           
    1010        <div style="text-align: right">
    11         <a href="" target=_blank tal:attributes="href string:application_slip">
     11        <a href="" target="slip" tal:attributes="href string:application_slip"
     12            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')">
    1213            <img tal:attributes="src string:${here/portal_url}/actionicon_print.png" />
    1314            Application Slip
    1415        </a>
     16       
    1517        </div>
    1618
  • WAeUP_SRP/trunk/skins/waeup_student/getStudentInfo.py

    r584 r603  
    2121roles = member.getRoles()
    2222info = {}
    23 info['is_manager'] = 'Manager' in roles or 'SectionManager' in roles
     23info['is_manager'] = context.isManager
    2424member_id = str(member)
    2525if student is None:
  • WAeUP_SRP/trunk/skins/waeup_student/searchStudents.py

    r599 r603  
    2222info['wf_states'] = student_wf_states
    2323info['wf_states'][0] = " ----- "
    24 mtool = context.portal_membership
    25 member = mtool.getAuthenticatedMember()
    2624lt = context.portal_layouts
    2725pr = context.portal_registration
    2826path_info = request.get('PATH_INFO').split('/')
    29 roles = member.getRoles()
    30 is_manager = 'Manager' in roles or 'SectionManager' in roles
     27is_manager = context.isManager
    3128validate = request.has_key("cpsdocument_edit_button")
    3229items = []
    33 default = {'search_mode': 'name', 
    34         'review_state': 'admission_applied ',
     30default = {'search_mode': 'name',
     31        'review_state': 'created',
    3532        'search_string': ''
    3633        }
    37        
     34
    3835rend,psm,ds = lt.renderLayout(layout_id= 'student_search',
    3936                      schema_id= 'student_search',
     
    5754with_review = state != "all"
    5855if not term and not with_review:
    59     psm = "You must specify a search string when searching in 'All States'"
     56    psm = "You must specify a search string when searching 'all states'."
    6057    err = True
    6158elif '*' in term:
    6259    psm = "you cannot use the '*' alone"
    6360    err = True
    64 if err: 
     61if err:
    6562    return context.students_manager_view(rendered = rend,
    6663                             psm = psm,
     
    7370res = []
    7471portal_type_query = {'query':['Student','StudentApplication','StudentPersonal']}
    75 st_queries = ('jamb_id','matric_no','name')
     72st_queries = ('jamb_reg_no','matric_no','name')
    7673onlyreview = with_review and not term
    7774if onlyreview:
     
    8683        res = catalog(portal_type='Student',
    8784                      id = term.strip())
    88 elif what in st_queries: 
    89     if what == "jamb_id":
     85elif what in st_queries:
     86    if what == "jamb_reg_no":
    9087        pt = 'StudentApplication'
    9188        st = "%s*" % term.strip().lower()
     
    10299        except:
    103100            return context.students_manager_view(rendered = rend,
    104                                  psm = 'Searchstring "%s" not allowed' % term,
     101                                 psm = 'Search string "%s" not allowed.' % term,
    105102                                 #psm = "%s, %s" % (psm,ds),
    106103                                 students = items,
     
    117114                                 is_manager = is_manager,
    118115                                 )
    119            
     116
    120117if res:
    121118    for r in res:
  • WAeUP_SRP/trunk/skins/waeup_student/student_index.py

    r544 r603  
    1717pm = context.portal_membership
    1818
    19 
    2019if pm.isAnonymousUser():
    2120    return redirect("%s/srp_anonymous_view" % context.absolute_url())
    2221
    23 
    24 member = pm.getAuthenticatedMember()
    25 roles = member.getRoles()
    26 isManager = "Manager" in roles or "SectionManager" in roles
    27 isStudent = "Student" in roles
    28 
    29 if isManager:
     22if context.isManager():
    3023    return redirect("%s/academics_contents" % context.absolute_url())
    31 if isStudent:
     24if context.isStudent():
    3225    info = context.getStudentInfo()
    3326    student = info['student']
  • WAeUP_SRP/trunk/skins/waeup_student/students_index.py

    r584 r603  
    1717pm = context.portal_membership
    1818
    19 
    2019if pm.isAnonymousUser():
    2120    return redirect("%s/srp_anonymous_view" % context.absolute_url())
    2221
     22campus = context.portal_catalog(meta_type = "University")[-1].getObject()
    2323
    24 campus = context.portal_catalog(meta_type = "University")[-1].getObject()
    25 member = pm.getAuthenticatedMember()
    26 roles = member.getRoles()
    27 isManager = "Manager" in roles or "SectionManager" in roles
    28 isStudent = "Student" in roles
    29 
    30 if isManager:
     24if context.isManager():
    3125    return redirect("%s/searchStudents" % campus.students.absolute_url())
    32 if isStudent:
     26if context.isStudent():
    3327    info = context.getStudentInfo()
    3428    student = info['student']
  • WAeUP_SRP/trunk/skins/waeup_student/students_manager_view.pt

    r584 r603  
    2929        tal:omit-tag=""
    3030        >
     31     
     32        <h3> Search Student Section</h3>
     33       
     34        <br />
     35     
    3136        <span tal:replace="structure rendered" />
    3237        <tal:block tal:condition="python: batch_info and batch_info['nb_pages'] > 1">
Note: See TracChangeset for help on using the changeset viewer.