Changeset 535
- Timestamp:
- 19 Sep 2006, 07:53:21 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 12 added
- 1 deleted
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/ScratchCards.py
r502 r535 55 55 return "Pin Batch %s BatchNo %d" % (doc.prefix, doc.batch_no) 56 56 57 security.declareProtected(ModifyPortalContent,"makePins") 57 security.declareProtected(ModifyPortalContent,"makePins") ###( 58 58 def makePins(self): 59 59 """generate Pins""" … … 77 77 ri = r.randint(1000000000,9999999999) 78 78 pin = "%s%d%d" % (prefix,b_no,ri) 79 pins.addRecord(pin=pin,serial=i,student="" )79 pins.addRecord(pin=pin,serial=i,student="",prefix_batch="%s%d" % (prefix, b_no)) 80 80 generated.append('"%(i)d","%(prefix)s-%(b_no)d-%(ri)d"' % vars()) 81 81 print '\n'.join(generated) 82 82 current = DateTime.DateTime().strftime("%d-%m-%y_%H_%M_%S") 83 83 open("%s/import/%s-%s-%s" % (i_home,prefix,b_no,current),"w+").write('\n'.join(generated)) 84 ###) 84 85 86 security.declareProtected(ModifyPortalContent,"getUnusedPins") 87 def getUnusedPins(self): 88 """return a list of unused Pins""" 89 max_pins = 30 90 #import pdb;pdb.set_trace() 91 pins_cat = self.portal_pins 92 doc = self.getContent() 93 l = [{'pin': p.pin, 94 'serial': p.serial, 95 } for p in pins_cat.searchResults(prefix_batch = "%s%d" 96 % (doc.prefix,doc.batch_no), 97 ) if p.student == ''] 98 if len (l) <= max_pins: 99 return l 100 return l[:max_pins] 85 101 86 102 InitializeClass(ScratchCardBatch) -
WAeUP_SRP/trunk/Students.py
r522 r535 193 193 tr_count += 1 194 194 return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1')) 195 return self.students.academics_contents()196 195 ###) 197 196 -
WAeUP_SRP/trunk/WAeUPPermissions.py
r532 r535 23 23 """ 24 24 25 #from AccessControl import ModuleSecurityInfo26 25 from Products.CMFCore.permissions import setDefaultRoles 27 #security = ModuleSecurityInfo('Products.WAeUP.WAeUPPermissions')28 26 29 # - 'Certificat Course delete' : Permission you need to .. 30 # 31 CertificateCourseDelete = "Certificate Course Delete" 32 setDefaultRoles(CertificateCourseDelete, ('Manager', 33 'CourseAdvisor', 34 )) 35 27 WAeUPModifyOwnContent = "WAeUPModify own content" 28 setDefaultRoles(WAeUPModifyOwnContent, ('Owner',)) -
WAeUP_SRP/trunk/Widgets.py
r523 r535 327 327 if ok == 2: 328 328 break 329 ## if self.portal_workflow.getInfoFor(student,330 ## 'review_state',331 ## None) == "created":332 ## student.content_status_modify(workflow_action="enter_application_pin")333 329 student.getContent().makeStudentMember(s_id,password=pin[4:]) 334 330 break -
WAeUP_SRP/trunk/profiles/default/pins.xml
r502 r535 4 4 <column value="student"/> 5 5 <column value="serial"/> 6 <column value="prefix_batch"/> 6 7 <index name="pin" meta_type="FieldIndex"> 7 8 <indexed_attr value="pin"/> 9 </index> 10 <index name="prefix_batch" meta_type="FieldIndex"> 11 <indexed_attr value="prefix_batch" /> 8 12 </index> 9 13 <index name="student" meta_type="FieldIndex"> -
WAeUP_SRP/trunk/profiles/default/rolemap.xml
r511 r535 8 8 </roles> 9 9 <permissions> 10 <permission name="WAeUPModify own content" acquire="True"> 11 <role name="Owner"/> 12 <role name="SectionManager"/> 13 </permission> 10 14 <permission name="List folder contents" acquire="True"> 11 <role name="Owner"/>12 15 <role name="SectionManager"/> 13 16 <role name="SectionReader"/> -
WAeUP_SRP/trunk/profiles/default/roots.xml
r486 r535 2 2 <roots> 3 3 <object name="campus" portal_type="University"/> 4 <script script_id=".cpsskins_theme" 5 type="Script (Python)" 6 filename="roots/.cpsskins_theme.py" 7 /> 4 8 </roots> -
WAeUP_SRP/trunk/profiles/default/roots/campus.xml
r486 r535 2 2 <object name="campus"> 3 3 <property name="Title">University Portal</property> 4 <property name=".cpsskins_theme">waeup_plain_theme</property>5 4 <object name="academics" portal_type="AcademicsFolder" /> 6 5 <object name="accommodation" portal_type="AccoFolder" /> -
WAeUP_SRP/trunk/profiles/default/schemas/certificate.xml
r486 r535 4 4 <field name="category" meta_type="CPS String Field"/> 5 5 <field name="code" meta_type="CPS String Field"> 6 <property name="is_searchabletext"> True</property>6 <property name="is_searchabletext">False</property> 7 7 </field> 8 <field name="department" meta_type="CPS String Field"/>9 8 <field name="end_level" meta_type="CPS String Field"/> 10 <field name="faculty" meta_type="CPS String Field"/>11 <field name="heading" meta_type="CPS String Field"/>12 9 <field name="m_prefix" meta_type="CPS String Field"/> 13 10 <field name="max_elect" meta_type="CPS String Field"/> -
WAeUP_SRP/trunk/profiles/default/schemas/course.xml
r486 r535 4 4 <field name="category" meta_type="CPS String Field"/> 5 5 <field name="code" meta_type="CPS String Field"> 6 <property name="is_searchabletext"> True</property>6 <property name="is_searchabletext">False</property> 7 7 </field> 8 8 <field name="credits" meta_type="CPS Int Field"/> 9 9 <field name="former_code" meta_type="CPS String Field"/> 10 10 <field name="org_code" meta_type="CPS String Field"> 11 <property name="is_searchabletext"> True</property>11 <property name="is_searchabletext">False</property> 12 12 </field> 13 13 <field name="passmark" meta_type="CPS Int Field"> -
WAeUP_SRP/trunk/profiles/default/types/ScratchCardBatch.xml
r488 r535 26 26 <property name="storage_methods"/> 27 27 <property name="cps_is_portlet">False</property> 28 <alias from="(Default)" to=" academics_contents"/>28 <alias from="(Default)" to="batch_index_html"/> 29 29 <alias from="create_do" to="scratch_card_batch_create_do"/> 30 30 <alias from="created" to="scratch_card_batch_created"/> 31 <alias from="view" to=" academics_contents"/>31 <alias from="view" to="batch_index_html"/> 32 32 <action title="Standard View" action_id="view" category="object" 33 condition_expr="" url_expr="string:${object_url}/ academics_contents"33 condition_expr="" url_expr="string:${object_url}/batch_index_html" 34 34 visible="True"> 35 35 <permission value="Modify portal content"/> -
WAeUP_SRP/trunk/profiles/default/types/ScratchCardBatchesFolder.xml
r516 r535 25 25 <property name="storage_methods"/> 26 26 <property name="cps_is_portlet">False</property> 27 <alias from="(Default)" to=" academics_contents"/>27 <alias from="(Default)" to="pins_index_html"/> 28 28 <alias from="create_do" to=""/> 29 29 <alias from="created" to=""/> 30 <alias from="view" to=" academics_contents"/>30 <alias from="view" to="pins_index_html"/> 31 31 <action title="Standard View" action_id="view" category="object" 32 condition_expr="" url_expr="string:${object_url}/ academics_contents"32 condition_expr="" url_expr="string:${object_url}/pins_index_html" 33 33 visible="True"> 34 34 <permission value="View"/> -
WAeUP_SRP/trunk/profiles/default/types/Student.xml
r486 r535 8 8 <property name="product">WAeUP_SRP</property> 9 9 <property name="factory">addStudent</property> 10 <property name="immediate_view"> folder_view</property>10 <property name="immediate_view">student_index</property> 11 11 <property name="global_allow">True</property> 12 12 <property name="filter_content_types">True</property> … … 32 32 <property name="storage_methods"/> 33 33 <property name="cps_is_portlet">False</property> 34 <alias from="(Default)" to=" academics_contents"/>35 <alias from="view" to=" academics_contents"/>34 <alias from="(Default)" to="student_index"/> 35 <alias from="view" to="student_index"/> 36 36 <action title="Standard View" action_id="view" category="object" 37 37 condition_expr="" 38 url_expr="string:${object_url}/ academics_contents" visible="True">38 url_expr="string:${object_url}/student_index" visible="True"> 39 39 <permission value="View"/> 40 40 </action> -
WAeUP_SRP/trunk/profiles/default/types/StudentsFolder.xml
r523 r535 8 8 <property name="product">WAeUP_SRP</property> 9 9 <property name="factory">addStudentsFolder</property> 10 <property name="immediate_view"> home_student</property>10 <property name="immediate_view">student_index</property> 11 11 <property name="global_allow">True</property> 12 12 <property name="filter_content_types">True</property> … … 30 30 <property name="storage_methods"/> 31 31 <property name="cps_is_portlet">False</property> 32 <alias from="(Default)" to=" home_student"/>33 <alias from="view" to=" home_student"/>32 <alias from="(Default)" to="student_index"/> 33 <alias from="view" to="student_index"/> 34 34 <action title="View" action_id="view" category="object" condition_expr="" 35 url_expr="string:${object_url}/ home_student" visible="True">35 url_expr="string:${object_url}/student_index" visible="True"> 36 36 <permission value="View"/> 37 37 </action> -
WAeUP_SRP/trunk/profiles/default/types/University.xml
r523 r535 8 8 <property name="product">WAeUP_SRP</property> 9 9 <property name="factory">addUniversity</property> 10 <property name="immediate_view">home_ student</property>10 <property name="immediate_view">home_index</property> 11 11 <property name="global_allow">True</property> 12 12 <property name="filter_content_types">True</property> … … 34 34 <property name="storage_methods"/> 35 35 <property name="cps_is_portlet">False</property> 36 <alias from="(Default)" to="home_ student"/>37 <alias from="view" to="home_ student"/>36 <alias from="(Default)" to="home_index"/> 37 <alias from="view" to="home_index"/> 38 38 <action title="View" action_id="view" category="object" condition_expr="" 39 url_expr="string:${object_url}/home_ student" visible="True">39 url_expr="string:${object_url}/home_index" visible="True"> 40 40 <permission value="Modify portal content"/> 41 41 </action> -
WAeUP_SRP/trunk/profiles/default/workflows/waeup_student_subobject_wf/definition.xml
r521 r535 5 5 meta_type="CPS Workflow"> 6 6 <permission>Modify portal content</permission> 7 <permission>WAeUPModify own content</permission> 7 8 <permission>View</permission> 8 9 <state state_id="closed" title=""> … … 15 16 <permission-map name="Modify portal content" 16 17 acquired="False"> 18 <permission-role>Owner</permission-role> 17 19 <permission-role>Manager</permission-role> 18 <permission-role>Owner</permission-role>19 20 <permission-role>SectionManager</permission-role> 20 21 </permission-map> 21 <permission-map name="View" acquired="True"> 22 <permission-map name="WAeUPModify own content" 23 acquired="False"> 24 <permission-role>Owner</permission-role> 25 </permission-map> 26 <permission-map name="View" acquired="False"> 22 27 </permission-map> 23 28 </state> … … 26 31 <permission-map name="Modify portal content" 27 32 acquired="True"> 33 <permission-role>SectionManager</permission-role> 34 </permission-map> 35 <permission-map name="WAeUPModify own content" 36 acquired="False"> 28 37 <permission-role>Owner</permission-role> 29 <permission-role>SectionManager</permission-role>30 38 </permission-map> 31 39 <permission-map name="View" acquired="True"> … … 37 45 38 46 <guard> 39 <guard-role>Manager</guard-role> 40 <guard-role>SectionManager</guard-role> 47 <guard-permission>WAeUPModify own content</guard-permission> 41 48 </guard> 42 49 </transition> … … 55 62 56 63 <guard> 57 <guard-role>Manager</guard-role> 58 <guard-role>SectionManager</guard-role> 64 <guard-permission>WAeUPModify own content</guard-permission> 59 65 </guard> 60 66 </transition> -
WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py
r524 r535 13 13 $Id: logged_in.py 34693 2006-03-23 17:44:22Z ogrisel $ 14 14 """ 15 import DateTime 16 current = DateTime.DateTime() 15 17 16 18 from urllib import unquote … … 26 28 return to_member_home, to_workspaces 27 29 30 request = context.REQUEST 31 response = request.RESPONSE 28 32 utool = context.portal_url 29 33 mtool = context.portal_membership … … 43 47 if not is_anon: 44 48 if "Student" in member.getRoles(): 45 member_id = str(member) 46 student = getattr(context.campus.students,member_id,) 47 if context.portal_workflow.getInfoFor(student, 48 'review_state', 49 None) == "created": 49 to_waeup_student_home = True 50 info = context.getStudentInfo() 51 student = info['student'] 52 ## member_id = str(member) 53 ## student = getattr(context.campus.students,member_id,) 54 ## if context.portal_workflow.getInfoFor(student, 55 ## 'review_state', 56 ## None) == "created": 57 if info['review_state'] == "created": 50 58 student.content_status_modify(workflow_action="enter_application_pin") 51 59 da = {} … … 53 61 da['app_ac_pin'] = pin 54 62 da['app_ac_date'] = current 55 application.getContent().edit(mapping = da) 56 to_waeup_student_home = True 63 info['app_doc'].edit(mapping = da) 57 64 elif "Manager" in member.getRoles(): 58 65 pass -
WAeUP_SRP/trunk/skins/waeup_custom/standard_error_message.pt
r531 r535 15 15 <tal:haserror condition="error_type"> 16 16 <tal:NotFound condition="python:error_type == 'NotFound'"> 17 <metal:block use-macro="here/ not_found/macros/not_found" />17 <metal:block use-macro="here/error_not_found/macros/not_found" /> 18 18 </tal:NotFound> 19 19 20 <tal:default condition="python: 0 anderror_type != 'NotFound'">21 <metal:block use-macro="here/error_ lib_other/macros/other" />20 <tal:default condition="python:error_type != 'NotFound'"> 21 <metal:block use-macro="here/error_other/macros/other" /> 22 22 </tal:default> 23 23 24 <tal:debugging condition="python: 0 andcheckPerm('Manage portal', here)">24 <tal:debugging condition="python:checkPerm('Manage portal', here)"> 25 25 <table width="100%" cellpadding="2" cellspacing="2"> 26 26 <tr> -
WAeUP_SRP/trunk/skins/waeup_default/portlet_session_info.pt
r486 r535 4 4 roles member/getRoles; 5 5 backend python:'Manager' in roles or 'SectionManager' in roles; 6 frontend python:'Student' in roles or isAnon;" 6 frontend python:'Student' in roles or isAnon; 7 info context/getStudentInfo;" 7 8 > 8 9 <tal:block condition="not:isAnon"> 9 <strong> <span tal:content="python:member.getProperty('fullname',None)" /> 10 <strong> <span tal:condition="info" tal:content="python:info['per_doc'].lastname" /> 11 <span tal:condition="not: info" tal:content="python:member.getProperty('fullname',None)" /> 10 12 </strong> 11 13 </tal:block> -
WAeUP_SRP/trunk/skins/waeup_student/home_student.pt
r530 r535 1 <metal:html tal:define="info context/get _student_info">1 <metal:html tal:define="info context/getStudentInfo"> 2 2 3 <metal:body use-macro="here/main_template/macros/master">3 <metal:body use-macro="here/main_template/macros/master"> 4 4 5 <metal:main fill-slot="main"> 6 <span tal:condition="isAnon"> 7 <h2>Welcome to the 8 9 <br />Student Registration Portal of the University of Benin, Nigeria</h2> 10 11 <br /> 12 13 <p>This is the frontpage of Uniben's Student Registration Portal (SRP) which is part of the West African e-University Project. 14 For further information see 15 <a href="" tal:attributes="href string:http://waeup.org">waeup.org</a>.</p> 16 17 <p><strong>Fresh Students</strong>, who register for the first time, proceed to the respective application 18 entrance page (UME, DE or Local Programmes). Later they can login to check their admission status and to 19 proceed with the admission and clearance process.</p> 20 21 <p><strong>Returning Students</strong> can login to check the course results of the previous session, 22 to register courses for the current session, to pay their school fees and to book accommodation.</p> 23 24 <p>This site is best seen in Firefox browser.</p> 25 </span> 26 <span tal:condition="python:not isAnon and info"> 27 <h3 tal:content="info/review_state|nothing"></h3> 28 <span tal:omit-tag="" tal:condition="python:info['review_state'] == 'admission_applied'" 29 tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'], 30 layout_mode='view', 31 layout_id='student_application_fe')" /> 32 33 34 </span> 35 </metal:main> 36 </metal:body> 5 <metal:main fill-slot="main"> 6 <span tal:condition="isAnon"> 7 <h2>Welcome to the 8 <br />Student Registration Portal of the University of Benin, Nigeria</h2> 9 <br /> 10 <p>This is the frontpage of Uniben's Student Registration Portal (SRP) which is part of the West African e-University Project. 11 For further information see 12 <a href="" tal:attributes="href string:http://waeup.org">waeup.org</a>.</p> 13 <p><strong>Fresh Students</strong>, who register for the first time, proceed to the respective application 14 entrance page (UME, DE or Local Programmes). Later they can login to check their admission status and to 15 proceed with the admission and clearance process.</p> 16 <p><strong>Returning Students</strong> can login to check the course results of the previous session, 17 to register courses for the current session, to pay their school fees and to book accommodation.</p> 18 <p>This site is best seen in Firefox browser.</p> 19 </span> 20 <span tal:condition="python:not isAnon and info" 21 tal:define="review_state info/review_state"> 22 <h3 tal:content="info/review_state|nothing"></h3> 23 <span tal:omit-tag="" tal:condition="python:review_state == 'admission_applied'" 24 tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'], 25 layout_mode='view', 26 layout_id='student_application_fe')" 27 /> 28 <span tal:omit-tag="" tal:condition="python: review_state == 'application_pin_entered'" 29 tal:content="structure python: info['app_doc'].render(proxy=info['app_doc'], 30 layout_mode='edit', 31 layout_id='student_application_fe')" 32 /> 33 </span> 34 <span tal:condition="python:not isAnon and not info"> 35 <table tal:define="students python: context.objectValues()"> 36 <tr tal:repeat="student students"> 37 <span tal:omit-tag="" tal:define="info python: context.getStudentInfo(student)"> 38 <td><span tal:replace="python: info['per_doc'].lastname" /></td> 39 <td><span tal:replace="python: info['app_doc'].jamb_reg_no" /></td> 40 <td><span tal:replace="info/review_state" /></td> 41 </span> 42 </tr> 43 </table> 44 </span> 45 </metal:main> 46 </metal:body> 37 47 </metal:html> -
WAeUP_SRP/trunk/skins/waeup_student/layout_application_edit.pt
r502 r535 12 12 ti python:type_name and getattr(here.portal_types,type_name,None) or getattr(here.portal_types,here.portal_type,None); 13 13 cpsmcat nocall:here/translation_service; 14 apply request/apply_button|nothing; 14 15 "> 15 16 … … 72 73 <br /> 73 74 <input type="submit" class="standalone" name="cpsdocument_edit_button" 74 value="button_change" i18n:attributes="value" id="cpsdocument_edit_button" 75 tal:condition="not:creation" /> 76 <input type="submit" class="standalone" name="cpsdocument_edit_and_view_button" 77 value="button_change_and_view" i18n:attributes="value" 78 id="cpsdocument_edit_and_view_button" 79 tal:condition="python:0 and not creation" /> 75 value="button_change" 76 id="cpsdocument_edit_button" 77 tal:condition="not:creation" /> 78 <input type="submit" class="standalone" name="apply_admission" 79 value="apply for admission" 80 id="cpsdocument_edit_and_view_button" 81 tal:condition="apply" 82 tal:attributes="value apply"/> 80 83 <input type="submit" 81 84 class="standalone" … … 87 90 </form> 88 91 </metal:block> 89 90 -
WAeUP_SRP/trunk/skins/waeup_student/layout_application_view.pt
r524 r535 1 1 <!-- a layout_lib macro --> 2 2 <!-- $Id: layout_lib_default_view.pt 34052 2006-03-06 14:59:24Z atchertchian $ --> 3 4 3 <metal:block define-macro="default_view" 5 4 tal:define="layout options/layout; 6 5 dm options/datastructure/getDataModel; 7 6 widgets python:context.getRenderedWidgets(layout); 8 "> 9 <span tal:condition="nothing" tal:replace="structure widgets" /> 10 <table width="100%" cellpadding="2" cellspacing="2" summary="layout"> 11 <tr tal:repeat="row layout/rows"> 12 <td tal:repeat="cell row" tal:attributes="colspan cell/ncols"> 13 <tal:block define="widget cell/widget"> 14 <div tal:attributes="class cell/widget_css_class|nothing; 15 id python:widget.getHtmlWidgetId()+'_widget'; 16 "> 17 <tal:block condition="widget/label"> 18 <span class="dlabel" i18n:translate="" tal:condition="widget/is_i18n" 19 tal:content="widget/label">label</span> 20 <span class="dlabel" tal:condition="not:widget/is_i18n" 21 tal:content="widget/label">label</span> 7 fields python:('jamb_reg_no', 8 'app_ac_pin', 9 'app_ac_date', 10 'jamb_lastname', 11 'jamb_sex', 12 'jamb_first_cos', 13 'jamb_second_cos',)" 14 > 15 <span tal:condition="nothing" tal:replace="structure widgets" /> 16 <table width="100%" cellpadding="2" cellspacing="2" summary="layout"> 17 <tr tal:repeat="field fields"> 18 <td tal:define="cell python: widgets[field]"> 19 <tal:block define="widget cell/widget"> 20 <div tal:attributes="class cell/widget_css_class|nothing; 21 id python:widget.getHtmlWidgetId()+'_widget';" 22 > 23 <tal:block condition="widget/label"> 24 <span class="dlabel" 25 tal:content="widget/label">label</span> 26 </tal:block> 27 <tal:block replace="structure cell/widget_rendered" /> 28 </div> 22 29 </tal:block> 23 <tal:block replace="structure cell/widget_rendered" /> 24 </div> 25 </tal:block> 26 </td> 27 </tr> 28 </table> 30 </td> 31 </tr> 32 <tr> 33 <td tal:define="cell widgets/passport"> 34 <tal:block define="widget cell/widget"> 35 <div tal:attributes="class cell/widget_css_class|nothing; 36 id python:widget.getHtmlWidgetId()+'_widget';" 37 > 38 <tal:block condition="widget/label"> 39 <span class="dlabel" 40 tal:content="widget/label">label</span> 41 </tal:block> 42 <img src="img" tal:attributes="src string:${context/aq_parent/absolute_url}/passport" /> 43 </div> 44 </tal:block> 45 </td> 46 </tr> 47 </table> 29 48 </metal:block> -
WAeUP_SRP/trunk/skins/waeup_student/portlet_student_workflow_display.pt
r522 r535 5 5 roles member/getRoles; 6 6 item nocall:options/context_obj; 7 info item/get _student_info;"7 info item/getStudentInfo;" 8 8 condition="python:'Student' in roles 9 9 "> -
WAeUP_SRP/trunk/skins/waeup_student/student_edit.py
r523 r535 33 33 # Validate the document and write it if it's valid 34 34 # (We don't call getEditableContent here, validate does it when needed.) 35 doc = context.getContent()35 info = context.getStudentInfo() 36 36 37 if context.portal_type == "StudentApplication": 38 student = context.aq_parent 39 state = context.portal_workflow.getInfoFor(student,'review_state',None) 37 student = info['student'] 38 app = info['app'] 39 app_doc = info['app_doc'] 40 state = context.getStudentInfo()['review_state'] 41 42 if context.portal_type == "Student": 40 43 if state == "application_pin_entered": 41 44 student.content_status_modify(workflow_action="apply_for_admission") 42 if doc.passport is None:43 is_valid, ds = doc.validate(request=REQUEST,44 proxy= context,45 if app_doc.passport is None: 46 is_valid, ds = app_doc.validate(request=REQUEST, 47 proxy=app_doc, 45 48 layout_id = "student_application_fe", 46 49 layout_mode = 'edit', 47 50 use_session=True) 48 51 49 action = '/application_form'52 action = "/student_edit" 50 53 if is_valid: 51 comments = REQUEST.get('comments')52 context.cpsdocument_notify_modification(comments=comments)53 if cpsdocument_edit_and_view_button is not None:54 action = ''55 54 psm = 'You successfully uploaded your passport image.' 56 55 args = {} 57 action = "/view"58 56 else: 59 57 psm = 'psm_content_error' 60 58 args = getFormUidUrlArg(REQUEST) 59 elif 'apply_admission' not in REQUEST.form: 60 is_valid, ds = app_doc.validate(request=REQUEST, 61 proxy=app_doc, 62 layout_id = "student_application_fe", 63 layout_mode = 'edit', 64 use_session=True) 65 action = "/passport_entry_view" 66 if is_valid: 67 args = {} 68 if 'apply_admission' not in REQUEST.form: 69 args = {'apply_button': 'Save and Apply',} 70 psm = 'You successfully uploaded your passport image.' 71 else: 72 psm = 'You applied for admission.' 73 else: 74 args = getFormUidUrlArg(REQUEST) 75 #psm = 'psm_content_error' 76 psm = '%s' % ds 61 77 else: 62 78 args = {} 63 psm = "You successfully applied for admission."64 action = "/ view"79 psm = 'You applied for admission.' 80 action = "/application_view" 65 81 else: 66 is_valid, ds = doc.validate(request=REQUEST, proxy=context, cluster=cluster,82 is_valid, ds = app_doc.validate(request=REQUEST, proxy=context, cluster=cluster, 67 83 use_session=True) 68 84 69 85 if action is None: 70 ti = doc.getTypeInfo()86 ti = app.getTypeInfo() 71 87 action = ti.queryMethodID('edit', 'cpsdocument_edit_form') 72 88 action = '/' + action
Note: See TracChangeset for help on using the changeset viewer.