Changeset 3169 for WAeUP_SRP/base/skins
- Timestamp:
- 15 Feb 2008, 08:06:37 (17 years ago)
- Location:
- WAeUP_SRP/base/skins
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/skins/waeup_accommodation/change_bed.py
r3165 r3169 46 46 allocated_bed = res[0] 47 47 if allocated_bed.bed_type == status: 48 logger.info('Status %s of %s has not changed ' % (status,student_id))48 logger.info('Status %s of %s has not changed.' % (status,student_id)) 49 49 psm='Student status has not changed!' 50 50 break 51 51 #return redirect("%s/%s/%s/waeup_document_view?portal_status_message=%s" % (students.absolute_url(),student_id,info['acco_id'],psm)) 52 logger.info('Bed status %s of %s has changed to %s ' % (allocated_bed.bed_type,student_id,status))52 logger.info('Bed status %s of %s has changed to %s.' % (allocated_bed.bed_type,student_id,status)) 53 53 query = Eq('bed_type',status) & Eq('student',context.portal_accommodation.not_occupied) 54 54 records = context.portal_accommodation.evalAdvancedQuery(query) 55 55 if len(records) < 1: 56 psm=' New bed allocation for %s failed, No bed free in category %s' % (student_id,status)56 psm='Bed change for %s failed, no free bed in category %s.' % (student_id,status) 57 57 logger.info(psm) 58 psm='Bed change failed!'59 58 break 60 59 beds.modifyRecord(bed=allocated_bed.bed,student=beds.not_occupied) … … 76 75 #acco_doc = info['acco_doc'] 77 76 #acco_doc.edit(mapping={'bed':"-- cancelled by officer due to failed bed change request --"}) 78 logger.info(' New bed allocationfor %s failed, code = %s' % (student_id,code))77 logger.info('Bed change for %s failed, code = %s' % (student_id,code)) 79 78 #logger.info('%s cancelled booking of bed %s by %s' % (member,bed,student_id)) 80 79 psm='Bed change failed!' … … 82 81 83 82 info = {} 84 records = [r for r in beds() if r.student ]83 records = [r for r in beds() if r.student and r.student != beds.not_occupied] 85 84 list = [] 86 85 to_modify = [] … … 91 90 continue 92 91 elif r.bed_type == sbt: 93 list.append("Student %s bed_type %s ok" % (r.student,r.bed_type))92 #list.append("Student %s bed_type %s ok" % (r.student,r.bed_type)) 94 93 continue 95 94 list.append("Student %s bed_type %s != %s" % (r.student, 96 95 r.bed_type, 97 96 info['student_status'])) 98 to_modify.append((r.bed,r.student,info['student_status'],info['acco_doc'])) 97 #to_modify.append((r.bed,r.student,info['student_status'],info['acco_doc'])) 98 99 return "\r".join(list) 100 99 101 for former_bed, student, status,acco_doc in to_modify: 100 102 beds.modifyRecord(bed=former_bed,student='') -
WAeUP_SRP/base/skins/waeup_student/external_study_level_view.pt
r2757 r3169 1 1 <metal:body use-macro="here/slip_template/macros/master"> 2 2 <metal:main fill-slot="main" 3 tal:define="info context/getStudyLevelInfo;"> 3 tal:define="info context/getStudyLevelInfo; 4 contact_student_form string:external_contact_student_form; 5 study_level_view string:external_study_level_view; 6 "> 4 7 5 8 <metal:block use-macro="here/study_level_view/macros/edit_form" /> -
WAeUP_SRP/base/skins/waeup_student/study_level_view.pt
r3103 r3169 1 1 <metal:body use-macro="here/main_template/macros/master"> 2 2 <metal:main fill-slot="main" 3 tal:define="info context/getStudyLevelInfo;"> 3 tal:define="info context/getStudyLevelInfo; 4 contact_student_form string:contact_student_form; 5 study_level_view string:study_level_view;"> 4 6 <metal:block define-macro="edit_form"> 5 7 … … 246 248 247 249 <input type="hidden" name="action_after_validate" type="text" id="action_after_validate" 248 tal:attributes="value st ring:study_level_view"/>250 tal:attributes="value study_level_view"/> 249 251 250 252 <br /><br /> … … 290 292 291 293 <input type="hidden" name="action_after_validate" type="text" id="action_after_validate" 292 tal:attributes="value st ring:study_level_view"/>294 tal:attributes="value study_level_view"/> 293 295 <input type="hidden" name="action_after_reject" type="text" id="action_after_reject" 294 tal:attributes="value string:contact_student_form"/>296 tal:attributes="value contact_student_form"/> 295 297 296 298 </td> … … 327 329 328 330 <input type="hidden" name="action_after_validate" type="text" id="action_after_validate" 329 tal:attributes="value st ring:external_study_level_view"/>331 tal:attributes="value study_level_view"/> 330 332 <input type="hidden" name="action_after_reject" type="text" id="action_after_reject" 331 tal:attributes="value string:external_contact_student_form"/>333 tal:attributes="value contact_student_form"/> 332 334 333 335 … … 350 352 /> 351 353 <input type="hidden" name="action_after_validate" type="text" id="action_after_validate" 352 tal:attributes="value st ring:study_level_view"/>354 tal:attributes="value study_level_view"/> 353 355 </td> 354 356 </table>
Note: See TracChangeset for help on using the changeset viewer.