Changeset 3169 for WAeUP_SRP/base


Ignore:
Timestamp:
15 Feb 2008, 08:06:37 (17 years ago)
Author:
Henrik Bettermann
Message:

srp_view.pt: Notice for course advisers added

action_after_* in external_study_level_view.pt and study_level_view.pt fixed

change_bed.py: psm modified and fixed for calls without parameter

Location:
WAeUP_SRP/base/skins
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_accommodation/change_bed.py

    r3165 r3169  
    4646        allocated_bed = res[0]
    4747        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))
    4949            psm='Student status has not changed!'
    5050            break
    5151            #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))
    5353        query = Eq('bed_type',status) & Eq('student',context.portal_accommodation.not_occupied)
    5454        records = context.portal_accommodation.evalAdvancedQuery(query)
    5555        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)
    5757            logger.info(psm)
    58             psm='Bed change failed!'
    5958            break
    6059        beds.modifyRecord(bed=allocated_bed.bed,student=beds.not_occupied)
     
    7675        #acco_doc = info['acco_doc']
    7776        #acco_doc.edit(mapping={'bed':"-- cancelled by officer due to failed bed change request --"})
    78         logger.info('New bed allocation for %s failed, code = %s' % (student_id,code))
     77        logger.info('Bed change for %s failed, code = %s' % (student_id,code))
    7978        #logger.info('%s cancelled booking of bed %s by %s' % (member,bed,student_id))
    8079        psm='Bed change failed!'
     
    8281
    8382info = {}
    84 records = [r for r in beds() if  r.student]
     83records = [r for r in beds() if  r.student and  r.student != beds.not_occupied]
    8584list = []
    8685to_modify = []
     
    9190        continue
    9291    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))
    9493        continue
    9594    list.append("Student %s bed_type %s != %s" % (r.student,
    9695                                                  r.bed_type,
    9796                                                  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   
     99return "\r".join(list)
     100   
    99101for former_bed, student, status,acco_doc in to_modify:
    100102    beds.modifyRecord(bed=former_bed,student='')
  • WAeUP_SRP/base/skins/waeup_student/external_study_level_view.pt

    r2757 r3169  
    11<metal:body use-macro="here/slip_template/macros/master">
    22  <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                      ">
    47             
    58  <metal:block use-macro="here/study_level_view/macros/edit_form" />
  • WAeUP_SRP/base/skins/waeup_student/study_level_view.pt

    r3103 r3169  
    11<metal:body use-macro="here/main_template/macros/master">
    22  <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;">
    46  <metal:block define-macro="edit_form">   
    57             
     
    246248                     
    247249              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
    248                      tal:attributes="value string:study_level_view"/> 
     250                     tal:attributes="value study_level_view"/> 
    249251                     
    250252              <br /><br />
     
    290292                     
    291293              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
    292                      tal:attributes="value string:study_level_view"/>                         
     294                     tal:attributes="value study_level_view"/>                         
    293295              <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"/>                         
    295297
    296298          </td>
     
    327329                     
    328330              <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
    329                      tal:attributes="value string:external_study_level_view"/>                         
     331                     tal:attributes="value study_level_view"/>                         
    330332              <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"/>   
    332334                                           
    333335
     
    350352                   />
    351353            <input type="hidden" name="action_after_validate" type="text" id="action_after_validate"
    352                      tal:attributes="value string:study_level_view"/>                       
     354                     tal:attributes="value study_level_view"/>                       
    353355          </td>               
    354356      </table>
Note: See TracChangeset for help on using the changeset viewer.