Changeset 2119 for WAeUP_SRP/trunk
- Timestamp:
- 18 Aug 2007, 17:23:25 (17 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/WAeUPTool.py
r2114 r2119 213 213 t_max = t_per 214 214 if t_per > 0.0 and t_per < t_min: 215 t_min = t_per 215 t_min = t_per 216 216 itf = 0.0 217 217 if found: … … 220 220 if not_found : 221 221 itnf = time_not_found / not_found 222 interval_time = time_found + time_not_found 223 s = "%(c)d: %(found)d/%(not_found)d " % vars() 222 interval_time = time_found + time_not_found 223 s = "%(c)d: %(found)d/%(not_found)d " % vars() 224 224 s += "%(interval_time)6.2f %(itf)6.4f/%(itnf)6.4f " % vars() 225 225 s += "%(t_min)6.4f/%(t_max)6.4f" % vars() … … 241 241 itnf = t_time_not_found / t_not_found 242 242 #c_elapse = time.clock() - c_elapse 243 s = "%(probe)d: %(t_found)d/%(t_not_found)d " % vars() 243 s = "%(probe)d: %(t_found)d/%(t_not_found)d " % vars() 244 244 s += "%(elapse)6.2f %(itf)6.4f/%(itnf)6.4f " % vars() 245 245 s += "%(t_min)6.4f/%(t_max)6.4f" % vars() … … 687 687 def showFsPicture(self,path): 688 688 """return a picture from the filesystem""" 689 picture_path = "%s/ var/%s" % (i_home,path)689 picture_path = "%s/import/%s" % (i_home,path) 690 690 if os.path.exists(picture_path): 691 691 return open(picture_path).read() 692 692 693 693 ###) 694 694 -
WAeUP_SRP/trunk/Widgets.py
r2117 r2119 1389 1389 if self.isStudent(): 1390 1390 err = "This is only for Pume application." 1391 s_logger.info('%s/%s applied for PUMEwith PIN %s' % (s_id,ref,pin_str))1391 s_logger.info('%s/%s applied for screening test with PIN %s' % (s_id,ref,pin_str)) 1392 1392 break 1393 1393 else: … … 1400 1400 getattr(self,self.catalog).modifyRecord(**d) 1401 1401 elif applicant.pin != pin_str: 1402 s_logger.info('%s/%s repeatedly applied for PUMEwith different PIN %s' % (s_id,ref,pin_str))1402 s_logger.info('%s/%s tried to enter application record with different PIN %s' % (s_id,ref,pin_str)) 1403 1403 elif applicant.pin == pin_str: 1404 s_logger.info('%s/%s repeatedly applied for PUMEwith PIN %s' % (s_id,ref,pin_str))1404 s_logger.info('%s/%s repeatedly entered application record with PIN %s' % (s_id,ref,pin_str)) 1405 1405 break 1406 1406 if err: … … 1491 1491 ) 1492 1492 path = "images" 1493 storage_path = "%s/ var/%s" % (i_home,path)1493 storage_path = "%s/import/%s" % (i_home,path) 1494 1494 id_field = "reg_no" 1495 1495 … … 1558 1558 mimetype = '' 1559 1559 last_modified = '' 1560 height = '' 1561 width = '' 1562 1560 1563 else: 1561 1564 image = open(file_path) … … 1570 1573 mimetype, width, height = gia(data) 1571 1574 #import pdb;pdb.set_trace() 1572 1575 1573 1576 if width < 0: 1574 1577 width = None -
WAeUP_SRP/trunk/profiles/default/layouts/application.xml
r2117 r2119 325 325 </widget> 326 326 <widget name="passport" meta_type="No Zodb Image Widget"> 327 <property name="title">Passport </property>327 <property name="title">Passport Photograph</property> 328 328 <property name="fields"> 329 329 <element value="passport"/> 330 330 </property> 331 331 <property name="is_required">False</property> 332 <property name="label">Passport </property>333 <property name="label_edit">Passport </property>334 <property name="readonly_layout_modes"/> 335 <property name="hidden_layout_modes"> 336 <element value="create"/> 337 </property> 338 <property name="hidden_readonly_layout_modes"/> 339 <property name="size_max"> 50000</property>332 <property name="label">Passport Photograph</property> 333 <property name="label_edit">Passport Photograph</property> 334 <property name="readonly_layout_modes"/> 335 <property name="hidden_layout_modes"> 336 <element value="create"/> 337 </property> 338 <property name="hidden_readonly_layout_modes"/> 339 <property name="size_max">20000</property> 340 340 <property name="display_external_editor">False</property> 341 341 <property name="display_width">100</property> 342 <property name="display_height"> 200</property>342 <property name="display_height">150</property> 343 343 </widget> 344 344 <widget name="phone" meta_type="String Widget"> -
WAeUP_SRP/trunk/skins/waeup_default/widget_passport_render.pt
r2114 r2119 36 36 <metal:block fill-slot="change_file"> 37 37 <input type="file" name="." size="24" 38 tal:attributes="name name; 39 onclick string:document.getElementById('${radio_name}_change').checked='checked'" 40 /> 38 tal:attributes="name name;"/> 41 39 <tal:block condition="python:1"> 42 40 <input type="hidden" value="img_auto_size" -
WAeUP_SRP/trunk/skins/waeup_student/apply_pume.py
r2114 r2119 19 19 20 20 import DateTime 21 import logging 22 logger = logging.getLogger('Skins.apply_pume') 23 21 24 current = DateTime.DateTime() 22 25 pr = context.portal_registration … … 55 58 submitted = True 56 59 if not create and pin != object['pin']: 60 logger.info('%s entered wrong pin %s' % (reg_no,pin)) 57 61 return request.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url()) 58 62 if slip: 59 63 mode = "view_slip" 64 logger.info('%s views application slip' % (reg_no)) 65 60 66 res,psm,ds = lt.renderLayout(layout_id= 'application', 61 67 schema_id= 'application', … … 101 107 mode = "view" 102 108 psm = "The form has already been submitted and you are not allowed to resubmit the data!" 109 logger.info('%s tried to resubmit application record' % (reg_no)) 103 110 res,psm_dummy,ds_dummy = lt.renderLayout(layout_id= 'application', 104 111 schema_id= 'application', … … 112 119 mode = "edit" 113 120 psm = "Please confirm Passport Photograph!" 121 logger.info('%s tried to submit without ticking confirmation check box' % (reg_no)) 114 122 else: 115 123 mode = "view" … … 118 126 data['status'] = "submitted" 119 127 context.applicants_catalog.modifyRecord(**data) 128 logger.info('%s modified and submitted application record' % (reg_no)) 120 129 res,psm_dummy,ds = lt.renderLayout(layout_id= 'application', 121 130 schema_id= 'application', … … 129 138 if submitted: 130 139 mode = "view" 140 logger.info('%s views application record' % (reg_no)) 131 141 else: 132 142 mode = "edit" 143 logger.info('%s edits application process' % (reg_no)) 133 144 psm = "" 134 145 #set_trace() … … 147 158 mode = "view" 148 159 psm = "The form has already been submitted and you are not allowed to modify the data!" 160 logger.info('%s tried to edit submitted application record' % (reg_no)) 149 161 res,psm_dummy,ds_dummy = lt.renderLayout(layout_id= 'application', 150 162 schema_id= 'application', … … 160 172 data['status'] = "edited" 161 173 context.applicants_catalog.modifyRecord(**data) 174 logger.info('%s modified application record' % (reg_no)) 162 175 163 176 -
WAeUP_SRP/trunk/skins/waeup_student/apply_pume_slip.pt
r2109 r2119 13 13 <br /> 14 14 <div tal:replace="structure rendered_main" /> 15 Please ensure that you come to the screening venus with a copy of this slip. 15 Please check for your screening venue at any of the UNIBEN entry gates or 16 at the Sports Complex and come to the screening venue with a copy of this slip. 16 17 </metal:block> 17 18 </metal:block>
Note: See TracChangeset for help on using the changeset viewer.