Changeset 1449 for WAeUP_SRP/trunk


Ignore:
Timestamp:
20 Feb 2007, 20:23:34 (18 years ago)
Author:
joachim
Message:

modified importReservedBeds
fixReservedBeds
added release_bed
many documentation addons for xml-files

Location:
WAeUP_SRP/trunk
Files:
2 added
79 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Accommodation.py

    r1443 r1449  
    146146                continue
    147147            sid = student.id
    148             already = accommodation(student=sid)
    149             if already:
    150                 bed['Error'] = "Student already reserved %s" % already[0].bed
    151                 no_import.append( format_error % bed)
    152                 continue
    153148            names = bed.get('name').split()
    154149            n = 0
     
    197192                no_import.append( format_error % bed)
    198193                continue
     194            already = accommodation(student=sid)
     195            if already:
     196                accommodation.modifyRecord(bed=already[0].bed,student='')
     197                student_obj = getattr(students_folder, student.id)
     198                acco_id = "accommodation_%s" % self.getSessionId()
     199                if acco_id in student_obj.objectIds():
     200                    acco_doc = getattr(student_obj, acco_id).getContent()
     201                    acco_doc.edit(mapping={'bed': bid})
     202                    member = self.portal_membership.getAuthenticatedMember()
     203                    logger.info('"%s","changed reserved bed %s for","%s"' % (member,bid,sid))
    199204            accommodation.modifyRecord(bed = bid, student = sid)
    200205            imported.append( format % bed)
     
    219224        open("%s/import/%s_not_imported%s.csv" % (i_home,name,current),"a").write(
    220225                                                '\n'.join(no_import))
     226        logger.info('finished loading from %s.csv' % name)
    221227        return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1'))
    222228
  • WAeUP_SRP/trunk/Widgets.py

    r1393 r1449  
    278278###)
    279279
    280 ##class StudentIdWidget(CPSStringWidget): ###(
    281 ##    """ StudentId Widget"""
    282 ##    meta_type = "StudentId Widget"
    283 ##    digits = 8
    284 ##    digits_str = "N"*digits
    285 ##    letters = 2
    286 ##    letters_str = "L"*letters
    287 ##
    288 ##    def validate(self, datastructure, **kw):
    289 ##        """Validate datastructure and update datamodel."""
    290 ##
    291 ##        valid = CPSStringWidget.validate(self, datastructure, **kw)
    292 ##        if not valid:
    293 ##            return 0
    294 ##        else:
    295 ##            widget_id = self.getWidgetId()
    296 ##            value = datastructure[widget_id]
    297 ##            err = 0
    298 ##            if not (len(value) == self.digits + self.letters and value[:self.digits].isdigit() and value[self.digits:].isalpha()):
    299 ##                err = 'Invalid Registration Number in the format: %s%s with N = Number, L = Letter' % (self.digits_str,self.letters_str)
    300 ##            if err:
    301 ##                datastructure.setError(widget_id, err)
    302 ##            else:
    303 ##                datamodel = datastructure.getDataModel()
    304 ##                datamodel[self.fields[0]] = value
    305 ##
    306 ##            return not err
    307 ##
    308 ##InitializeClass(StudentIdWidget)
    309 ##widgetRegistry.register(StudentIdWidget)
    310 ##
    311 #####)
    312 
    313280class JambRegNoWidget(CPSStringWidget): ###(
    314281    """ JambRegNo Widget"""
     
    478445            err = 'Invalid StudentId String %s.' % value
    479446            logger.info('"%s","invalid StudentId String"' % value)
    480             datastructure['student'] = res
     447            datastructure['student'] = None
    481448        else:
    482449            value = value.upper()
  • WAeUP_SRP/trunk/doc/srp_documentation.mm

    r1440 r1449  
    1010<node CREATED="1170079621592" ID="Freemind_Link_1297017754" MODIFIED="1170079640872" POSITION="right" TEXT="Campus">
    1111<node CREATED="1171710559043" ID="Freemind_Link_1592396213" MODIFIED="1171710565212" TEXT="Id: campus"/>
    12 <node CREATED="1170079643589" FOLDED="true" ID="Freemind_Link_1231068129" MODIFIED="1171710686426" TEXT="Academic Section">
     12<node CREATED="1170079643589" ID="Freemind_Link_1231068129" MODIFIED="1171710686426" TEXT="Academic Section">
    1313<node CREATED="1171710577379" ID="Freemind_Link_1444831124" MODIFIED="1171710589887" TEXT="Id: academics"/>
    1414<node CREATED="1170080366716" ID="Freemind_Link_415048819" MODIFIED="1171709591652" TEXT="{Faculties}">
     
    1818<node CREATED="1170080406892" ID="Freemind_Link_1983042340" MODIFIED="1171709620984" TEXT="{Departments}">
    1919<node CREATED="1171125049973" ID="Freemind_Link_734335561" LINK="../profiles/default/types/Department.xml" MODIFIED="1171125103478" TEXT="Type: Department"/>
    20 <node CREATED="1171125108968" ID="Freemind_Link_553285905" LINK="../profiles/default/schemas/department.xml" MODIFIED="1171125232838" TEXT="Schema: department"/>
     20<node CREATED="1171125108968" ID="Freemind_Link_553285905" LINK="../profiles/default/schemas/department.xml" MODIFIED="1172001385770" TEXT="Schema: department"/>
    2121<node CREATED="1171125727127" ID="Freemind_Link_481382280" LINK="../profiles/default/layouts/department.xml" MODIFIED="1171125762591" TEXT="Layout: department"/>
    2222<node CREATED="1170080420252" ID="Freemind_Link_290613406" MODIFIED="1171710340659" TEXT="Courses">
     
    4646</node>
    4747</node>
    48 <node CREATED="1170082138244" ID="Freemind_Link_1354366927" MODIFIED="1171710679266" TEXT="Student Section">
     48<node CREATED="1170082138244" FOLDED="true" ID="Freemind_Link_1354366927" MODIFIED="1171710679266" TEXT="Student Section">
    4949<node CREATED="1171709784119" ID="_" MODIFIED="1171709937449" TEXT="Type: StudentsFolder" VSHIFT="104"/>
    5050<node CREATED="1171710545564" ID="Freemind_Link_221165828" MODIFIED="1171710551332" TEXT="Id: students"/>
     
    117117</node>
    118118</node>
    119 <node CREATED="1170082502675" ID="Freemind_Link_1051871348" MODIFIED="1171710707226" TEXT="Accommodation Section">
     119<node CREATED="1170082502675" FOLDED="true" ID="Freemind_Link_1051871348" MODIFIED="1171710707226" TEXT="Accommodation Section">
    120120<node CREATED="1171710631948" ID="Freemind_Link_161316738" MODIFIED="1171710638848" TEXT="Id: accommodation"/>
    121121<node CREATED="1171114205479" ID="Freemind_Link_685193459" LINK="../profiles/default/types/AccoFolder.xml" MODIFIED="1171360542032" TEXT="Type: AccoFolder"/>
     
    164164<node CREATED="1171712154817" ID="Freemind_Link_1307066201" MODIFIED="1171712169348" TEXT="PUME/PDE Resuts Table"/>
    165165</node>
     166<node CREATED="1172001308558" ID="Freemind_Link_1997267023" MODIFIED="1172001322577" POSITION="right" TEXT="profiles">
     167<node CREATED="1172001324877" ID="Freemind_Link_1866579033" MODIFIED="1172001330846" TEXT="default">
     168<node CREATED="1172001340812" ID="Freemind_Link_274105864" LINK="../profiles/default/directories.xml" MODIFIED="1172001465313" TEXT="portal_directories"/>
     169<node CREATED="1172001340812" ID="Freemind_Link_1612370167" LINK="../profiles/default/layouts.xml" MODIFIED="1172001506077" TEXT="portal_layouts"/>
     170<node CREATED="1172001340812" ID="Freemind_Link_7840481" LINK="../profiles/default/schemas.xml" MODIFIED="1172001572800" TEXT="portal_schemas"/>
     171<node CREATED="1172001340812" ID="Freemind_Link_1164818739" LINK="../profiles/default/types.xml" MODIFIED="1172001612293" TEXT="portal_types"/>
     172</node>
     173</node>
    166174</node>
    167175</map>
  • WAeUP_SRP/trunk/profiles/default/directories.xml

    r933 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="content.xsl"?>
    23<object name="portal_directories" meta_type="CPS Directory Tool">
    34 <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts.xml

    r1415 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="content.xsl"?>
    23<object name="portal_layouts" meta_type="CPS Layouts Tool">
    3  <property name="title"></property>
    4  <object name="acco_hall" meta_type="CPS Layout"/>
    5  <object name="acco_bed_booking" meta_type="CPS Layout"/>
    6  <object name="academics_search" meta_type="CPS Layout"/>
    7  <object name="certificate" meta_type="CPS Layout"/>
    8  <object name="certificate_course" meta_type="CPS Layout"/>
    9  <object name="course" meta_type="CPS Layout"/>
    10  <object name="department" meta_type="CPS Layout"/>
    11  <object name="faculty" meta_type="CPS Layout"/>
    12  <object name="members" meta_type="CPS Layout"/>
    13  <object name="members_search" meta_type="CPS Layout"/>
    14  <object name="payment" meta_type="CPS Layout"/>
    15  <object name="student" meta_type="CPS Layout"/>
    16  <object name="scratch_card_batch" meta_type="CPS Layout"/>
    17  <object name="scratch_card_search" meta_type="CPS Layout"/>
    18  <object name="student_accommodation" meta_type="CPS Layout"/>
    19  <object name="student_accommodation_fe" meta_type="CPS Layout"/>
    20  <object name="student_application" meta_type="CPS Layout"/>
    21  <object name="student_application_fe" meta_type="CPS Layout"/>
    22  <object name="student_application_search" meta_type="CPS Layout"/>
    23  <object name="student_session_results_search" meta_type="CPS Layout"/>
    24  <object name="student_clearance" meta_type="CPS Layout"/>
    25  <object name="student_clearance_fe" meta_type="CPS Layout"/>
    26  <object name="student_course_result" meta_type="CPS Layout"/>
    27  <object name="student_create" meta_type="CPS Layout"/>
    28  <object name="student_personal" meta_type="CPS Layout"/>
    29  <object name="student_personal_fe" meta_type="CPS Layout"/>
    30  <object name="student_password" meta_type="CPS Layout"/>
    31  <object name="student_pume" meta_type="CPS Layout"/>
    32  <object name="student_pume_fe" meta_type="CPS Layout"/>
    33  <object name="student_schoolfee" meta_type="CPS Layout"/>
    34  <object name="student_search" meta_type="CPS Layout"/>
    35  <object name="student_study_level" meta_type="CPS Layout"/>
    36  <object name="student_study_course" meta_type="CPS Layout"/>
    37  <object name="student_transfer" meta_type="CPS Layout"/>
    38  <object name="study_level" meta_type="CPS Layout"/>
    39  <object name="university" meta_type="CPS Layout"/>
    40  <object name="waeup_common" meta_type="CPS Layout"/>
     4  <property name="title">layouts</property>
     5  <object name="acco_hall" meta_type="CPS Layout"/>
     6  <object name="acco_bed_booking" meta_type="CPS Layout"/>
     7  <object name="academics_search" meta_type="CPS Layout"/>
     8  <object name="certificate" meta_type="CPS Layout"/>
     9  <object name="certificate_course" meta_type="CPS Layout"/>
     10  <object name="course" meta_type="CPS Layout"/>
     11  <object name="department" meta_type="CPS Layout"/>
     12  <object name="faculty" meta_type="CPS Layout"/>
     13  <object name="members" meta_type="CPS Layout"/>
     14  <object name="members_search" meta_type="CPS Layout"/>
     15  <object name="payment" meta_type="CPS Layout"/>
     16  <object name="student" meta_type="CPS Layout"/>
     17  <object name="scratch_card_batch" meta_type="CPS Layout"/>
     18  <object name="scratch_card_search" meta_type="CPS Layout"/>
     19  <object name="student_accommodation" meta_type="CPS Layout"/>
     20  <object name="student_accommodation_fe" meta_type="CPS Layout"/>
     21  <object name="student_application" meta_type="CPS Layout"/>
     22  <object name="student_application_fe" meta_type="CPS Layout"/>
     23  <object name="student_application_search" meta_type="CPS Layout"/>
     24  <object name="student_session_results_search" meta_type="CPS Layout"/>
     25  <object name="student_clearance" meta_type="CPS Layout"/>
     26  <object name="student_clearance_fe" meta_type="CPS Layout"/>
     27  <object name="student_course_result" meta_type="CPS Layout"/>
     28  <object name="student_create" meta_type="CPS Layout"/>
     29  <object name="student_personal" meta_type="CPS Layout"/>
     30  <object name="student_personal_fe" meta_type="CPS Layout"/>
     31  <object name="student_password" meta_type="CPS Layout"/>
     32  <object name="student_pume" meta_type="CPS Layout"/>
     33  <object name="student_pume_fe" meta_type="CPS Layout"/>
     34  <object name="student_schoolfee" meta_type="CPS Layout"/>
     35  <object name="student_search" meta_type="CPS Layout"/>
     36  <object name="student_study_level" meta_type="CPS Layout"/>
     37  <object name="student_study_course" meta_type="CPS Layout"/>
     38  <object name="student_transfer" meta_type="CPS Layout"/>
     39  <object name="study_level" meta_type="CPS Layout"/>
     40  <object name="university" meta_type="CPS Layout"/>
     41  <object name="waeup_common" meta_type="CPS Layout"/>
    4142</object>
  • WAeUP_SRP/trunk/profiles/default/layouts/academics_search.xml

    r805 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="student_search" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/common.xml

    r486 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="common" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/course.xml

    r1375 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="course" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/department.xml

    r1404 r1449  
    11<?xml version="1.0"?>
    2 <?xml-stylesheet type="text/xsl" href="types.xsl"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    33<object name="department" meta_type="CPS Layout">
    44 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/faculty.xml

    r1404 r1449  
    11<?xml version="1.0"?>
    2 <?xml-stylesheet type="text/xsl" href="types.xsl"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    33<object name="faculty" meta_type="CPS Layout">
    44 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/members.xml

    r953 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="members" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/members_search.xml

    r930 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="members_search" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/payment.xml

    r1247 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="payment" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/scratch_card_batch.xml

    r877 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="scratch_card_batch" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/scratch_card_search.xml

    r1064 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="scratch_card_search" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/student.xml

    r486 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="student" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation.xml

    r1146 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="student_accommodation" meta_type="CPS Layout">
    34 <property name="layout_create_method">layout_enter_access_code</property>
  • WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation_fe.xml

    r1316 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="student_accommodation_fe" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/student_application_fe.xml

    r1028 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="student_application_fe" meta_type="CPS Layout">
    34 <property name="layout_create_method">layout_enter_access_code</property>
  • WAeUP_SRP/trunk/profiles/default/layouts/student_application_search.xml

    r1280 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="student_application_search" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/student_clearance_fe.xml

    r1114 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="student_clearance_fe" meta_type="CPS Layout">
    34 <property name="layout_create_method">layout_enter_access_code</property>
  • WAeUP_SRP/trunk/profiles/default/layouts/student_course_result.xml

    r853 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="course_results" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/student_password.xml

    r486 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="student_password" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/student_personal.xml

    r1232 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="student_personal" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/student_personal_fe.xml

    r1232 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="student_personal_fe" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/student_pume.xml

    r965 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="student_pume" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/student_pume_fe.xml

    r965 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="student_pume" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/student_schoolfee.xml

    r1376 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="student_schoolfee" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/student_search.xml

    r874 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="student_search" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/student_session_results_search.xml

    r1217 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="student_session_results_search" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/student_transfer.xml

    r1327 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="student_transfer" meta_type="CPS Layout">
    34  <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/study_level.xml

    r556 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="study_level" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/university.xml

    r853 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="university" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/layouts/waeup_common.xml

    r853 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="layout.xsl"?>
    23<object name="waeup_common" meta_type="CPS Layout">
    34 <property name="layout_create_method"></property>
  • WAeUP_SRP/trunk/profiles/default/schemas.xml

    r1415 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="content.xsl"?>
    23<object name="portal_schemas" meta_type="CPS Schemas Tool">
    34 <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/types.xml

    r1224 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="content.xsl"?>
    23<object name="portal_types" meta_type="CMF Types Tool">
    34 <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/types/AcademicsFolder.xml

    r945 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="types.xsl"?>
    23<object name="AcademicsFolder" meta_type="CPS Flexible Type Information"
    34   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
  • WAeUP_SRP/trunk/profiles/default/types/CertificatesFolder.xml

    r538 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="types.xsl"?>
    23<object name="CertificatesFolder" meta_type="CPS Flexible Type Information"
    34   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
  • WAeUP_SRP/trunk/profiles/default/types/CoursesFolder.xml

    r538 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="types.xsl"?>
    23<object name="CoursesFolder" meta_type="CPS Flexible Type Information"
    34   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
  • WAeUP_SRP/trunk/profiles/default/types/Payment.xml

    r1237 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="types.xsl"?>
    23<object name="Payment" meta_type="CPS Flexible Type Information"
    34   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
  • WAeUP_SRP/trunk/profiles/default/types/PaymentsFolder.xml

    r1361 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="types.xsl"?>
    23<object name="PaymentsFolder" meta_type="CPS Flexible Type Information"
    34   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
  • WAeUP_SRP/trunk/profiles/default/types/ScratchCardBatch.xml

    r1027 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="types.xsl"?>
    23<object name="ScratchCardBatch" meta_type="CPS Flexible Type Information"
    34   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
  • WAeUP_SRP/trunk/profiles/default/types/ScratchCardBatchesFolder.xml

    r1062 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="types.xsl"?>
    23<object name="ScratchCardBatchesFolder"
    34   meta_type="CPS Flexible Type Information"
  • WAeUP_SRP/trunk/profiles/default/types/StudentAccommodation.xml

    r1440 r1449  
    4444  <permission value="Modify portal content"/>
    4545 </action>
     46 <action title="Release Bed" action_id="release_bed" category="object"
     47         condition_expr=""
     48         url_expr="string:${object_url}/release_bed"
     49         visible="True">
     50  <permission value="Modify portal content"/>
     51 </action>
    4652</object>
  • WAeUP_SRP/trunk/profiles/default/types/StudentCourseResult.xml

    r873 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="types.xsl"?>
    23<object name="StudentCourseResult" meta_type="CPS Flexible Type Information"
    34   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
  • WAeUP_SRP/trunk/profiles/default/types/StudentPume.xml

    r873 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="types.xsl"?>
    23<object name="StudentPume" meta_type="CPS Flexible Type Information"
    34   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
  • WAeUP_SRP/trunk/profiles/default/types/StudentsFolder.xml

    r1221 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="types.xsl"?>
    23<object name="StudentsFolder" meta_type="CPS Flexible Type Information"
    34   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
  • WAeUP_SRP/trunk/profiles/default/types/StudyLevel.xml

    r731 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="types.xsl"?>
    23<object name="StudyLevel" meta_type="CPS Flexible Type Information"
    34   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
  • WAeUP_SRP/trunk/profiles/default/types/University.xml

    r942 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="types.xsl"?>
    23<object name="University" meta_type="CPS Flexible Type Information"
    34   xmlns:i18n="http://xml.zope.org/namespaces/i18n">
  • WAeUP_SRP/trunk/profiles/default/vocabularies.xml

    r1417 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="content.xsl"?>
    23<object name="portal_vocabularies" meta_type="CPS Vocabularies Tool">
    34 <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/academics_search_mode.xml

    r805 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="search_mode_voc" meta_type="CPS Vocabulary">
    34 <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/acco_special_handling.xml

    r1118 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="acco_special_handling" meta_type="CPS Vocabulary">
    34 <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/courselevel.xml

    r486 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="courselevel" meta_type="CPS Vocabulary">
    34 <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/exam_grades.xml

    r846 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="high_grade" meta_type="CPS Vocabulary">
    34  <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/exam_subjects.xml

    r1091 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="high_grade" meta_type="CPS Vocabulary">
    34  <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/exam_types.xml

    r1009 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="exam_types" meta_type="CPS Vocabulary">
    34    <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/get_departments_voc.xml

    r486 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="get_departments_voc" meta_type="CPS Method Vocabulary">
    34 <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/get_faculties_voc.xml

    r486 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="get_faculties_voc" meta_type="CPS Method Vocabulary">
    34 <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/get_searchable_student_states.xml

    r874 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="get_searchable_student_states" meta_type="CPS Method Vocabulary">
    34 <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/global_roles.xml

    r486 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="global_roles" meta_type="CPS Vocabulary">
    34 <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/high_grade.xml

    r833 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="high_grade" meta_type="CPS Vocabulary">
    34    <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/high_qual.xml

    r833 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="high_qual" meta_type="CPS Vocabulary">
    34    <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/institution_types_voc.xml

    r1063 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="institute_types_voc" meta_type="CPS Vocabulary">
    34 <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/local_gov_areas.xml

    r1074 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="local_gov_areas" meta_type="CPS Vocabulary">
    34    <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/nigerian_states.xml

    r486 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="nigerian_states" meta_type="CPS Vocabulary">
    34 <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/pin_prefixes.xml

    r925 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="pin_prefixes" meta_type="CPS Vocabulary">
    34    <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/religion.xml

    r486 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="religion" meta_type="CPS Vocabulary">
    34    <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/scratch_card_search_mode.xml

    r1061 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="search_mode_voc" meta_type="CPS Vocabulary">
    34 <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/searchable_academics_states.xml

    r805 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="searchable_review_states_voc" meta_type="CPS Vocabulary">
    34 <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/searchable_student_states.xml

    r1368 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="searchable_student_states_voc" meta_type="CPS Vocabulary">
    34 <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/semester_voc.xml

    r556 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="courselevel" meta_type="CPS Vocabulary">
    34 <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/states.xml

    r486 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="states" meta_type="CPS Vocabulary">
    34    <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/student_search_mode.xml

    r1082 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="search_mode_voc" meta_type="CPS Vocabulary">
    34 <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/waeup_bed_letters.xml

    r486 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="waeup_bed_letters" meta_type="CPS Vocabulary">
    34 <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/vocabularies/waeup_block_letters.xml

    r933 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?>
    23<object name="waeup_bed_letters" meta_type="CPS Vocabulary">
    34 <property name="title"></property>
  • WAeUP_SRP/trunk/profiles/default/workflows.xml

    r1225 r1449  
    11<?xml version="1.0"?>
     2<?xml-stylesheet type="text/xsl" href="content.xsl"?>
    23<object name="portal_workflow" meta_type="CPS Workflow Tool">
    34 <property name="title"></property>
  • WAeUP_SRP/trunk/skins/waeup_accommodation/book_reserved_bed.py

    r1447 r1449  
    1515logger = logging.getLogger('Accommodation.BookReservedBed')
    1616
    17 change = REQUEST.has_key("reserve_and_change")
     17#change = REQUEST.has_key("reserve_and_change")
     18change = False
    1819release = REQUEST.has_key("release")
    1920reserve = REQUEST.has_key("reserve")
     
    6162res = acco_cat(bed = bid)
    6263psm = ''
     64students = context.portal_url.getPortalObject().campus.students
     65student_obj = getattr(students,sid)
     66acco_id = "accommodation_%s" % context.getSessionId()
    6367while True:
    6468    if not res:
     
    8185            break
    8286    if release:
     87        if acco_id in student_obj.objectIds():
     88            acco_doc = getattr(student_obj, acco_id).getContent()
     89            if acco_doc.bed == bid:
     90                psm = "Student %s has not reserved bed" % (sid, bid)
     91                break
    8392        if not already:
    8493            psm = "Student %s already has no reserved beds" % (sid, already[0].bed)
     
    104113        acco_cat.modifyRecord(bed=bed.bed,student='')
    105114
    106 students = context.portal_url.getPortalObject().campus.students
    107 student_obj = getattr(students,sid)
    108 acco_id = "accommodation_%s" % context.getSessionId()
    109115if reserve or change:
    110116    acco_cat.modifyRecord(bed = bid, student = sid)
     
    115121    psm = "Bed reserved for %s %s" % (sid,student.name)
    116122elif release:
    117     acco_cat.modifyRecord(bed=bid,student='')
    118123    if acco_id in student_obj.objectIds():
    119124        acco_doc = getattr(student_obj, acco_id).getContent()
    120         if acco_doc.bed == bid:
    121             acco_doc.edit(mapping={'bed':bid + " (reservation cancelled by %s!)" % member})
     125        if acco_doc.bed != bid:
     126            acco_cat.modifyRecord(bed=bid,student='')
    122127    logger.info('"%s","cancelled reservation %s by","%s"' % (member,bid,sid))
    123128    psm = "%s removed from %s" % (student.name,bid)
    124 
    125129mode = 'view'
    126130return context.book_reserved_bed_form(rendered = "",
  • WAeUP_SRP/trunk/skins/waeup_accommodation/book_reserved_bed_form.pt

    r1444 r1449  
    2323                 tal:attributes="value options/button"
    2424                 tal:condition="not:creation" />
    25           <input type="submit" tal:condition="python:mode !='view'"
     25          <input type="submit" tal:condition="python:0 and mode !='view'"
    2626                 class="standalone"
    2727                 name="reserve_and_change"
  • WAeUP_SRP/trunk/skins/waeup_accommodation/change_bed.py

    r1206 r1449  
    5757        acco_doc.edit(mapping=d)
    5858        return redirect("%s/%s/%s" % (students.absolute_url(),student,info['acco_id']))
     59    student_obj = getattr(students,student_id)
     60    acco_id = "accommodation_%s" % context.getSessionId()
     61    if acco_id in student_obj.objectIds():
     62        acco_doc = getattr(student_obj, acco_id).getContent()
     63        if acco_doc.bed == bed:
     64            acco_doc.edit(mapping={'bed':bed + " (cancelled by change bed %s!)" % member})
    5965    logger.info('"%s", "new bed allocation failed","%s"' % (student_id,code))
     66    logger.info('"%s","cancelled booking of %s"' % (member,bed,sid))
    6067    redirect("%s/%s/%s" % (students.absolute_url(),student,info['acco_id']))
    6168
Note: See TracChangeset for help on using the changeset viewer.