Changeset 1449 for WAeUP_SRP/trunk
- Timestamp:
- 20 Feb 2007, 20:23:34 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 2 added
- 79 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Accommodation.py
r1443 r1449 146 146 continue 147 147 sid = student.id 148 already = accommodation(student=sid)149 if already:150 bed['Error'] = "Student already reserved %s" % already[0].bed151 no_import.append( format_error % bed)152 continue153 148 names = bed.get('name').split() 154 149 n = 0 … … 197 192 no_import.append( format_error % bed) 198 193 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)) 199 204 accommodation.modifyRecord(bed = bid, student = sid) 200 205 imported.append( format % bed) … … 219 224 open("%s/import/%s_not_imported%s.csv" % (i_home,name,current),"a").write( 220 225 '\n'.join(no_import)) 226 logger.info('finished loading from %s.csv' % name) 221 227 return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1')) 222 228 -
WAeUP_SRP/trunk/Widgets.py
r1393 r1449 278 278 ###) 279 279 280 ##class StudentIdWidget(CPSStringWidget): ###(281 ## """ StudentId Widget"""282 ## meta_type = "StudentId Widget"283 ## digits = 8284 ## digits_str = "N"*digits285 ## letters = 2286 ## letters_str = "L"*letters287 ##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 0294 ## else:295 ## widget_id = self.getWidgetId()296 ## value = datastructure[widget_id]297 ## err = 0298 ## 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]] = value305 ##306 ## return not err307 ##308 ##InitializeClass(StudentIdWidget)309 ##widgetRegistry.register(StudentIdWidget)310 ##311 #####)312 313 280 class JambRegNoWidget(CPSStringWidget): ###( 314 281 """ JambRegNo Widget""" … … 478 445 err = 'Invalid StudentId String %s.' % value 479 446 logger.info('"%s","invalid StudentId String"' % value) 480 datastructure['student'] = res447 datastructure['student'] = None 481 448 else: 482 449 value = value.upper() -
WAeUP_SRP/trunk/doc/srp_documentation.mm
r1440 r1449 10 10 <node CREATED="1170079621592" ID="Freemind_Link_1297017754" MODIFIED="1170079640872" POSITION="right" TEXT="Campus"> 11 11 <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"> 13 13 <node CREATED="1171710577379" ID="Freemind_Link_1444831124" MODIFIED="1171710589887" TEXT="Id: academics"/> 14 14 <node CREATED="1170080366716" ID="Freemind_Link_415048819" MODIFIED="1171709591652" TEXT="{Faculties}"> … … 18 18 <node CREATED="1170080406892" ID="Freemind_Link_1983042340" MODIFIED="1171709620984" TEXT="{Departments}"> 19 19 <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="117 1125232838" TEXT="Schema: department"/>20 <node CREATED="1171125108968" ID="Freemind_Link_553285905" LINK="../profiles/default/schemas/department.xml" MODIFIED="1172001385770" TEXT="Schema: department"/> 21 21 <node CREATED="1171125727127" ID="Freemind_Link_481382280" LINK="../profiles/default/layouts/department.xml" MODIFIED="1171125762591" TEXT="Layout: department"/> 22 22 <node CREATED="1170080420252" ID="Freemind_Link_290613406" MODIFIED="1171710340659" TEXT="Courses"> … … 46 46 </node> 47 47 </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"> 49 49 <node CREATED="1171709784119" ID="_" MODIFIED="1171709937449" TEXT="Type: StudentsFolder" VSHIFT="104"/> 50 50 <node CREATED="1171710545564" ID="Freemind_Link_221165828" MODIFIED="1171710551332" TEXT="Id: students"/> … … 117 117 </node> 118 118 </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"> 120 120 <node CREATED="1171710631948" ID="Freemind_Link_161316738" MODIFIED="1171710638848" TEXT="Id: accommodation"/> 121 121 <node CREATED="1171114205479" ID="Freemind_Link_685193459" LINK="../profiles/default/types/AccoFolder.xml" MODIFIED="1171360542032" TEXT="Type: AccoFolder"/> … … 164 164 <node CREATED="1171712154817" ID="Freemind_Link_1307066201" MODIFIED="1171712169348" TEXT="PUME/PDE Resuts Table"/> 165 165 </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> 166 174 </node> 167 175 </map> -
WAeUP_SRP/trunk/profiles/default/directories.xml
r933 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="content.xsl"?> 2 3 <object name="portal_directories" meta_type="CPS Directory Tool"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/layouts.xml
r1415 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="content.xsl"?> 2 3 <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"/> 41 42 </object> -
WAeUP_SRP/trunk/profiles/default/layouts/academics_search.xml
r805 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="student_search" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/common.xml
r486 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="common" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/course.xml
r1375 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="course" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/department.xml
r1404 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href=" types.xsl"?>2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 3 3 <object name="department" meta_type="CPS Layout"> 4 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/faculty.xml
r1404 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href=" types.xsl"?>2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 3 3 <object name="faculty" meta_type="CPS Layout"> 4 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/members.xml
r953 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="members" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/members_search.xml
r930 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="members_search" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/payment.xml
r1247 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="payment" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/scratch_card_batch.xml
r877 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="scratch_card_batch" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/scratch_card_search.xml
r1064 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="scratch_card_search" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/student.xml
r486 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="student" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation.xml
r1146 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="student_accommodation" meta_type="CPS Layout"> 3 4 <property name="layout_create_method">layout_enter_access_code</property> -
WAeUP_SRP/trunk/profiles/default/layouts/student_accommodation_fe.xml
r1316 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="student_accommodation_fe" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/student_application_fe.xml
r1028 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="student_application_fe" meta_type="CPS Layout"> 3 4 <property name="layout_create_method">layout_enter_access_code</property> -
WAeUP_SRP/trunk/profiles/default/layouts/student_application_search.xml
r1280 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="student_application_search" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/student_clearance_fe.xml
r1114 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="student_clearance_fe" meta_type="CPS Layout"> 3 4 <property name="layout_create_method">layout_enter_access_code</property> -
WAeUP_SRP/trunk/profiles/default/layouts/student_course_result.xml
r853 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="course_results" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/student_password.xml
r486 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="student_password" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/student_personal.xml
r1232 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="student_personal" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/student_personal_fe.xml
r1232 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="student_personal_fe" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/student_pume.xml
r965 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="student_pume" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/student_pume_fe.xml
r965 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="student_pume" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/student_schoolfee.xml
r1376 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="student_schoolfee" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/student_search.xml
r874 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="student_search" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/student_session_results_search.xml
r1217 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="student_session_results_search" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/student_transfer.xml
r1327 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="student_transfer" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/study_level.xml
r556 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="study_level" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/university.xml
r853 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="university" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/layouts/waeup_common.xml
r853 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="layout.xsl"?> 2 3 <object name="waeup_common" meta_type="CPS Layout"> 3 4 <property name="layout_create_method"></property> -
WAeUP_SRP/trunk/profiles/default/schemas.xml
r1415 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="content.xsl"?> 2 3 <object name="portal_schemas" meta_type="CPS Schemas Tool"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/types.xml
r1224 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="content.xsl"?> 2 3 <object name="portal_types" meta_type="CMF Types Tool"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/types/AcademicsFolder.xml
r945 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="types.xsl"?> 2 3 <object name="AcademicsFolder" meta_type="CPS Flexible Type Information" 3 4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"> -
WAeUP_SRP/trunk/profiles/default/types/CertificatesFolder.xml
r538 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="types.xsl"?> 2 3 <object name="CertificatesFolder" meta_type="CPS Flexible Type Information" 3 4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"> -
WAeUP_SRP/trunk/profiles/default/types/CoursesFolder.xml
r538 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="types.xsl"?> 2 3 <object name="CoursesFolder" meta_type="CPS Flexible Type Information" 3 4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"> -
WAeUP_SRP/trunk/profiles/default/types/Payment.xml
r1237 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="types.xsl"?> 2 3 <object name="Payment" meta_type="CPS Flexible Type Information" 3 4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"> -
WAeUP_SRP/trunk/profiles/default/types/PaymentsFolder.xml
r1361 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="types.xsl"?> 2 3 <object name="PaymentsFolder" meta_type="CPS Flexible Type Information" 3 4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"> -
WAeUP_SRP/trunk/profiles/default/types/ScratchCardBatch.xml
r1027 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="types.xsl"?> 2 3 <object name="ScratchCardBatch" meta_type="CPS Flexible Type Information" 3 4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"> -
WAeUP_SRP/trunk/profiles/default/types/ScratchCardBatchesFolder.xml
r1062 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="types.xsl"?> 2 3 <object name="ScratchCardBatchesFolder" 3 4 meta_type="CPS Flexible Type Information" -
WAeUP_SRP/trunk/profiles/default/types/StudentAccommodation.xml
r1440 r1449 44 44 <permission value="Modify portal content"/> 45 45 </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> 46 52 </object> -
WAeUP_SRP/trunk/profiles/default/types/StudentCourseResult.xml
r873 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="types.xsl"?> 2 3 <object name="StudentCourseResult" meta_type="CPS Flexible Type Information" 3 4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"> -
WAeUP_SRP/trunk/profiles/default/types/StudentPume.xml
r873 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="types.xsl"?> 2 3 <object name="StudentPume" meta_type="CPS Flexible Type Information" 3 4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"> -
WAeUP_SRP/trunk/profiles/default/types/StudentsFolder.xml
r1221 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="types.xsl"?> 2 3 <object name="StudentsFolder" meta_type="CPS Flexible Type Information" 3 4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"> -
WAeUP_SRP/trunk/profiles/default/types/StudyLevel.xml
r731 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="types.xsl"?> 2 3 <object name="StudyLevel" meta_type="CPS Flexible Type Information" 3 4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"> -
WAeUP_SRP/trunk/profiles/default/types/University.xml
r942 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="types.xsl"?> 2 3 <object name="University" meta_type="CPS Flexible Type Information" 3 4 xmlns:i18n="http://xml.zope.org/namespaces/i18n"> -
WAeUP_SRP/trunk/profiles/default/vocabularies.xml
r1417 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="content.xsl"?> 2 3 <object name="portal_vocabularies" meta_type="CPS Vocabularies Tool"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/academics_search_mode.xml
r805 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="search_mode_voc" meta_type="CPS Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/acco_special_handling.xml
r1118 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="acco_special_handling" meta_type="CPS Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/courselevel.xml
r486 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="courselevel" meta_type="CPS Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/exam_grades.xml
r846 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="high_grade" meta_type="CPS Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/exam_subjects.xml
r1091 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="high_grade" meta_type="CPS Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/exam_types.xml
r1009 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="exam_types" meta_type="CPS Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/get_departments_voc.xml
r486 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="get_departments_voc" meta_type="CPS Method Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/get_faculties_voc.xml
r486 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="get_faculties_voc" meta_type="CPS Method Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/get_searchable_student_states.xml
r874 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="get_searchable_student_states" meta_type="CPS Method Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/global_roles.xml
r486 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="global_roles" meta_type="CPS Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/high_grade.xml
r833 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="high_grade" meta_type="CPS Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/high_qual.xml
r833 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="high_qual" meta_type="CPS Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/institution_types_voc.xml
r1063 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="institute_types_voc" meta_type="CPS Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/local_gov_areas.xml
r1074 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="local_gov_areas" meta_type="CPS Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/nigerian_states.xml
r486 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="nigerian_states" meta_type="CPS Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/pin_prefixes.xml
r925 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="pin_prefixes" meta_type="CPS Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/religion.xml
r486 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="religion" meta_type="CPS Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/scratch_card_search_mode.xml
r1061 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="search_mode_voc" meta_type="CPS Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/searchable_academics_states.xml
r805 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="searchable_review_states_voc" meta_type="CPS Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/searchable_student_states.xml
r1368 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="searchable_student_states_voc" meta_type="CPS Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/semester_voc.xml
r556 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="courselevel" meta_type="CPS Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/states.xml
r486 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="states" meta_type="CPS Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/student_search_mode.xml
r1082 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="search_mode_voc" meta_type="CPS Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/waeup_bed_letters.xml
r486 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="waeup_bed_letters" meta_type="CPS Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/vocabularies/waeup_block_letters.xml
r933 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="vocabulary.xsl"?> 2 3 <object name="waeup_bed_letters" meta_type="CPS Vocabulary"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/profiles/default/workflows.xml
r1225 r1449 1 1 <?xml version="1.0"?> 2 <?xml-stylesheet type="text/xsl" href="content.xsl"?> 2 3 <object name="portal_workflow" meta_type="CPS Workflow Tool"> 3 4 <property name="title"></property> -
WAeUP_SRP/trunk/skins/waeup_accommodation/book_reserved_bed.py
r1447 r1449 15 15 logger = logging.getLogger('Accommodation.BookReservedBed') 16 16 17 change = REQUEST.has_key("reserve_and_change") 17 #change = REQUEST.has_key("reserve_and_change") 18 change = False 18 19 release = REQUEST.has_key("release") 19 20 reserve = REQUEST.has_key("reserve") … … 61 62 res = acco_cat(bed = bid) 62 63 psm = '' 64 students = context.portal_url.getPortalObject().campus.students 65 student_obj = getattr(students,sid) 66 acco_id = "accommodation_%s" % context.getSessionId() 63 67 while True: 64 68 if not res: … … 81 85 break 82 86 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 83 92 if not already: 84 93 psm = "Student %s already has no reserved beds" % (sid, already[0].bed) … … 104 113 acco_cat.modifyRecord(bed=bed.bed,student='') 105 114 106 students = context.portal_url.getPortalObject().campus.students107 student_obj = getattr(students,sid)108 acco_id = "accommodation_%s" % context.getSessionId()109 115 if reserve or change: 110 116 acco_cat.modifyRecord(bed = bid, student = sid) … … 115 121 psm = "Bed reserved for %s %s" % (sid,student.name) 116 122 elif release: 117 acco_cat.modifyRecord(bed=bid,student='')118 123 if acco_id in student_obj.objectIds(): 119 124 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='') 122 127 logger.info('"%s","cancelled reservation %s by","%s"' % (member,bid,sid)) 123 128 psm = "%s removed from %s" % (student.name,bid) 124 125 129 mode = 'view' 126 130 return context.book_reserved_bed_form(rendered = "", -
WAeUP_SRP/trunk/skins/waeup_accommodation/book_reserved_bed_form.pt
r1444 r1449 23 23 tal:attributes="value options/button" 24 24 tal:condition="not:creation" /> 25 <input type="submit" tal:condition="python: mode !='view'"25 <input type="submit" tal:condition="python:0 and mode !='view'" 26 26 class="standalone" 27 27 name="reserve_and_change" -
WAeUP_SRP/trunk/skins/waeup_accommodation/change_bed.py
r1206 r1449 57 57 acco_doc.edit(mapping=d) 58 58 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}) 59 65 logger.info('"%s", "new bed allocation failed","%s"' % (student_id,code)) 66 logger.info('"%s","cancelled booking of %s"' % (member,bed,sid)) 60 67 redirect("%s/%s/%s" % (students.absolute_url(),student,info['acco_id'])) 61 68
Note: See TracChangeset for help on using the changeset viewer.