Changeset 999 for WAeUP_SRP/trunk
- Timestamp:
- 6 Dec 2006, 10:46:32 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_academics/academics_contents.pt
r502 r999 53 53 54 54 <!-- a content_lib macro --> 55 <!-- $Id$-->55 <!-- from content_lib_display_contents_column.pt academics_contents.pt --> 56 56 57 57 <!-- List contents in 'items' in the specified number of columns … … 59 59 60 60 <tal:block 61 define="tmp_format format|nothing; 61 define="no_ajax not:nothing; 62 tmp_format format|nothing; 62 63 tmp_sort_by sort_by|nothing; 63 64 tmp_direction direction|nothing; … … 118 119 <td align="left" valign="top"> 119 120 <tal:block define="no_form not:nothing; 121 no_ajax no_ajax|nothing; 120 122 info python:here.getContentInfo(item, level=1, cpsmcat=cpsmcat);"> 121 123 <metal:block use-macro="here/content_lib_info_summary/macros/info_summary" /> … … 133 135 <tal:block condition="batch_items"> 134 136 <!-- a content_lib macro --> 135 <!-- $Id$-->137 <!-- from content_lib_info_detail_tab.pt --> 136 138 137 139 <!-- Final display of items in a column using the given format --> … … 150 152 ('Manager', 'WorkspaceManager'), here); 151 153 "> 152 <div id="ajax_psm" style="display:none" tal:condition="python:not no_form ">154 <div id="ajax_psm" style="display:none" tal:condition="python:not no_form and not no_ajax"> 153 155 ajax feedback 154 156 </div> … … 170 172 XXX Deactivated for CPS 3.4.0, will be re-enabled for 3.4.1 171 173 172 <tal:block tal:condition="python:not no_form and sort_by is None"174 <tal:block tal:condition="python:not no_form and not no_ajax and sort_by is None" 173 175 tal:define="ajax_working_msg python:cpsmcat('ajax_working'); 174 176 ajax_working_msg python:ajax_working_msg.replace('\'', '\\\''); -
WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py
r998 r999 45 45 member = mtool.getAuthenticatedMember() 46 46 47 if True or not redirect_url or redirect_url.endswith('/logged_out'): 48 if not is_anon: 49 if "Student" in member.getRoles(): 50 to_waeup_student_home = True 51 #info = context.getStudentInfo() 52 #student = info['student'] 53 students = context.portal_url.getPortalObject().campus.students 54 student = getattr(students,str(member)) 55 student_app = getattr(student,'application') 56 student_pume = getattr(student,'pume',None) 57 s_review_state = wftool.getInfoFor(student,'review_state',None) 58 a_review_state = wftool.getInfoFor(student_app,'review_state',None) 59 #if info['review_state'] in ("student_created","admitted") and\ 60 #wftool.getInfoFor(info['app'],'review_state',None) == 'created' : 61 if s_review_state in ("student_created","admitted") and\ 62 a_review_state == 'created' : 63 #student.content_status_modify(workflow_action="enter_clearance_pin") 64 #wftool.doActionFor(info['app'],'open') 65 wftool.doActionFor(student_app,'open') 66 #wftool.doActionFor(info['pume'],'close') 67 #if info['pume'] is not None: 68 if student_pume is not None: 69 #wftool.doActionFor(info['pume'],'close') 70 wftool.doActionFor(student_pume,'close') 47 if not is_anon: 48 if "Student" in member.getRoles(): 49 to_waeup_student_home = True 50 students = context.portal_url.getPortalObject().campus.students 51 student = getattr(students,str(member)) 52 student_app = getattr(student,'application') 53 student_pume = getattr(student,'pume',None) 54 s_review_state = wftool.getInfoFor(student,'review_state',None) 55 a_review_state = wftool.getInfoFor(student_app,'review_state',None) 56 app_doc = student_app.getContent() 57 #from Products.zdb import set_trace 58 #set_trace() 59 if s_review_state in ("student_created","admitted") and\ 60 a_review_state == 'created' : 61 wftool.doActionFor(student_app,'open') 62 if student_pume is not None: 63 wftool.doActionFor(student_pume,'close') 64 da = {} 65 pin = request.get('pin') 66 if not pin: 67 jamb_reg_no = app_doc.jamb_reg_no 68 for reg_no in (jamb_reg_no,jamb_reg_no.lower(),jamb_reg_no.upper()): 69 res = context.portal_pins(student=reg_no) 70 if len(res) > 0: 71 break 72 if len(res) > 0: 73 p = res[0].pin 74 if len(p) > 10: 75 pin = "%s-%s-%s" % (p[:3],p[3:4],p[4:]) 76 else: 77 pin = p 78 da['app_ac_pin'] = pin 79 da['app_ac_date'] = current 80 app_doc.edit(mapping = da) 81 elif s_review_state in ("admitted") and a_review_state == 'opened' and\ 82 not app_doc.app_ac_pin: 83 jamb_reg_no = app_doc.jamb_reg_no 84 for reg_no in (jamb_reg_no,jamb_reg_no.lower(),jamb_reg_no.upper()): 85 res = context.portal_pins(student=reg_no) 86 if len(res) > 0: 87 break 88 if len(res) > 0: 89 p = res[0].pin 90 if len(p) > 10: 91 pin = "%s-%s-%s" % (p[:3],p[3:4],p[4:]) 92 else: 93 pin = p 71 94 da = {} 72 pin = request.get('pin')73 app_doc = student_app.getContent()74 if not pin:75 app_doc = student_app.getContent()76 jamb_reg_no = app_doc.jamb_reg_no77 res = context.portal_pins(student=jamb_reg_no)78 if len(res) == 1:79 p = res[0].pin80 if len(p) > 10:81 pin = "%s-%s-%s" % (p[:3],p[3:4],p[4:])82 else:83 pin = p84 ## email = request.get('email')85 #app_doc = info['app_doc']86 95 da['app_ac_pin'] = pin 87 ## da['app_email'] = email88 da['app_ac_date'] = current89 96 app_doc.edit(mapping = da) 90 ## dc = {} 91 ## dc['clr_ac_pin'] = pin 92 ## dc['entry_date'] = current 93 ## dc['session'] = "%s" % current.year() 94 ## dc['lga'] = app_doc.jamb_lga 95 ## info['clear_doc'].edit(mapping = dc) 96 elif "Manager" in member.getRoles(): 97 pass 98 else: 99 to_member_home, to_workspaces = checkRedirect(portal, mtool) 100 if (not to_member_home) and (not to_workspaces): 101 redirect_to_portal = True 102 else: 103 redirect_url = unquote(redirect_url) 104 # One can be redirected from an http page while the login is done from an 105 # https page. This is a fix for #1205. 106 # A better option here would be to replace the previous portal_absolute_url 107 # prefix in the redirect_url by the current portal absolute URL. 108 if not redirect_url.startswith(portal_absolute_url): 109 if not is_anon: 110 to_member_home, to_workspaces = checkRedirect(portal, mtool) 111 if (not to_member_home) and (not to_workspaces): 112 redirect_to_portal = True 97 elif "Manager" in member.getRoles(): 98 pass 99 else: 100 to_member_home, to_workspaces = checkRedirect(portal, mtool) 101 if (not to_member_home) and (not to_workspaces): 102 redirect_to_portal = True 113 103 114 104 if to_waeup_student_home: -
WAeUP_SRP/trunk/skins/waeup_pins/batch_view.pt
r930 r999 26 26 <br /> 27 27 28 <span tal:condition="python:member.id in ('admin',' perry')">28 <span tal:condition="python:member.id in ('admin','joachim')"> 29 29 <h3>Unused</h3> 30 30 <table> -
WAeUP_SRP/trunk/skins/waeup_student/check_admission.py
r997 r999 48 48 elif psm == 'valid': 49 49 s_id = ds.get('s_id') 50 <<<<<<< .mine 51 if is_anon and not s_id: 52 return context.check_admission_pin_form(rendered = res, 53 psm = "You are not allowed to do this in this context", 54 #psm = "%s, %s" % (psm,ds), 55 firstlayout = True, 56 lastlayout = True, 57 ds = ds, 58 ) 59 elif not is_anon: 60 return context.check_admission_pin_form(rendered = res, 61 psm = "You are logged in", 62 #psm = "%s, %s" % (psm,ds), 63 firstlayout = True, 64 lastlayout = True, 65 ds = ds, 66 ) 67 ======= 50 68 if is_anon and not s_id: 51 69 return context.check_admission_pin_form(rendered = res, … … 64 82 ds = ds, 65 83 ) 84 >>>>>>> .r998 66 85 ## 67 86 ## email = ds.get('app_email') -
WAeUP_SRP/trunk/skins/waeup_student/search_students.py
r985 r999 50 50 validate = request.has_key("cpsdocument_edit_button") 51 51 default = {'search_mode': 'name', 52 'review_state': ' clearance_requested',52 'review_state': 'all', 53 53 'search_string': '' 54 54 } -
WAeUP_SRP/trunk/skins/waeup_student/student_index.py
r903 r999 16 16 redirect = request.RESPONSE.redirect 17 17 pm = context.portal_membership 18 member = pm.getAuthenticatedMember() 18 19 19 20 if context.isStaff(): … … 25 26 return context.clearance_view() 26 27 elif context.portal_type == 'Student': 27 28 return redirect("%s/student_view" % context.absolute_url()) 28 29 return redirect("%s/waeup_document_view" % context.absolute_url()) 29 30 if context.isStudent(): 30 info = context.getStudentInfo()31 student = info['student']31 students = context.portal_url.getPortalObject().campus.students 32 student = getattr(students,str(member)) 32 33 return redirect("%s/student_view" % student.absolute_url()) 33 34
Note: See TracChangeset for help on using the changeset viewer.