Changeset 926 for WAeUP_SRP/trunk
- Timestamp:
- 23 Nov 2006, 11:54:49 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Accommodation.py
r714 r926 49 49 hall_gen['name'] = hall.Title 50 50 count = 0 51 reserved = [( int(r.split('/')[0]),int(r.split('/')[1])) for r in re.split(',|\.| ',h.reserved_rooms)51 reserved = [(r.split('/')[0],int(r.split('/')[1])) for r in re.split(',|\.| ',h.reserved_rooms) 52 52 if r] 53 53 sex = 'male' 54 54 if h.which_sex: 55 55 sex = 'female' 56 for block in range(1,int(h.nr_of_blocks)+1): 56 #for block in range(1,int(h.nr_of_blocks)+1): 57 for block in 'ABCDEFGHIJ'[:int(h.nr_of_blocks)]: 57 58 for floor in range(1,int(h.nr_of_floors)+1): 58 59 for room in range(1,int(h.rooms_per_floor)+1): … … 62 63 if (block,room_nr) in reserved: 63 64 bt = "reserved" 65 elif h.special_handling != "no": 66 bt = h.special_handling 64 67 elif bed in h.beds_for_fresh: 65 68 bt = 'fr' … … 69 72 bt = 'fi' 70 73 bt = "%(sex)s_%(bt)s" % vars() 71 uid = '%s_% d_%d_%s' % (hall.getId(),block,room_nr,bed)74 uid = '%s_%s_%d_%s' % (hall.getId(),block,room_nr,bed) 72 75 try: 73 76 freelist.addRecord(bed = uid, bed_type = bt,hall = hall.getId()) -
WAeUP_SRP/trunk/Widgets.py
r912 r926 189 189 err = 0 190 190 try: 191 reserved = [( int(r.split('/')[0]),int(r.split('/')[1])) for r in re.split(',|\.| ',value)191 reserved = [(r.split('/')[0],int(r.split('/')[1])) for r in re.split(',|\.| ',value) 192 192 if r] 193 193 except ValueError,msg: -
WAeUP_SRP/trunk/exportimport.py
r924 r926 75 75 pm = site.portal_membership 76 76 campus = site.portal_url.getPortalObject().campus 77 campus.academics.manage_setLocalGroupRoles(groupid='Authenticated', 78 roles=('SectionReader',)) 77 79 pm.setLocalGroupRoles(campus.students,['group:ClearanceOfficers', 78 80 'role:Student',],'SectionReader') 79 pm.setLocalGroupRoles(campus.academics,['role:Authenticated',80 ],'SectionReader')81 ## pm.setLocalGroupRoles(campus.academics,['role:Authenticated', 82 ## ],'SectionReader') 81 83 importWAeUPTable(site.portal_accommodation, '', context,'accommodation') 82 84 importWAeUPTable(site.portal_pins, '', context,'pins') -
WAeUP_SRP/trunk/profiles/default/layouts/acco_hall.xml
r853 r926 124 124 <property name="label_true">female</property> 125 125 </widget> 126 <widget name="special_handling" meta_type="Select Widget"> 127 <property name="title">Maintenance Fee Prefix</property> 128 <property name="fields"> 129 <element value="special_handling"/> 130 </property> 131 <property name="is_required">False</property> 132 <property name="label">Special Handling Code</property> 133 <property name="label_edit">Special Handling Code</property> 134 <property name="readonly_layout_modes"/> 135 <property name="hidden_layout_modes"/> 136 <property name="hidden_readonly_layout_modes"/> 137 <property name="vocabulary">acco_special_handling</property> 138 </widget> 126 139 <widget name="maintenance_code" meta_type="Select Widget"> 127 140 <property name="title">Maintenance Fee Prefix</property> … … 143 156 <row> 144 157 <cell name="maintenance_code"/> 158 </row> 159 <row> 160 <cell name="special_handling"/> 145 161 </row> 146 162 <row> -
WAeUP_SRP/trunk/profiles/default/schemas/acco_hall.xml
r744 r926 14 14 </field> 15 15 <field name="reserved_rooms" meta_type="CPS String List Field"> 16 <property name="default_expr">string: 1/101,2/102</property>16 <property name="default_expr">string:A/101,C/102</property> 17 17 </field> 18 18 <field name="rooms_per_floor" meta_type="CPS Int Field"> 19 19 <property name="default_expr">python:20</property> 20 20 </field> 21 <field name="s tudy_courses" meta_type="CPS String ListField"/>21 <field name="special_handling" meta_type="CPS String Field"/> 22 22 <field name="text" meta_type="CPS String Field"> 23 23 <property name="is_searchabletext">False</property> -
WAeUP_SRP/trunk/profiles/default/vocabularies.xml
r874 r926 23 23 <object name="searchable_student_states" meta_type="CPS Vocabulary"/> 24 24 <object name="get_searchable_student_states" meta_type="CPS Method Vocabulary"/> 25 <object name="acco_special_handling" meta_type="CPS Vocabulary"/> 25 26 <object name="academics_search_mode" meta_type="CPS Vocabulary"/> 26 27 <object name="searchable_academics_states" meta_type="CPS Vocabulary"/> -
WAeUP_SRP/trunk/skins/waeup_accommodation/getBedTypeNames.py
r805 r926 10 10 # $Id$ 11 11 12 return {'female_fr': 'Female New Student', 13 'female_fi': 'Female Final Student', 14 'female_re': 'Female Returning Student', 15 'female_reserved': 'Female Reserved', 16 'female_xx': 'Female Other', 17 'male_fr': 'Male New Student', 18 'male_fi': 'Male Final Student', 19 'male_re': 'Male Returning Student', 20 'male_reserved': 'Male Reserved', 21 'male_xx': 'Male Other' 22 } 12 type_suffixes = [('fr','New Student'), 13 ('fi','Final Student'), 14 ('re','Returning Student'), 15 ('reserved','Reserved'), 16 ] 17 special = [item for item in context.portal_vocabularies.acco_special_handling.items() 18 if item[0] != 'no'] 19 type_suffixes.extend(special) 20 dict = {} 21 for gender in ('female','male'): 22 for suffix,desc in type_suffixes: 23 dict['%s_%s' % (gender,suffix)] = '%s %s' % (gender.capitalize(),desc) 24 return dict 25 ##return {'female_fr': 'Female New Student', 26 ## 'female_fi': 'Female Final Student', 27 ## 'female_re': 'Female Returning Student', 28 ## 'female_reserved': 'Female Reserved', 29 ## 'female_xx': 'Female Other', 30 ## 'male_fr': 'Male New Student', 31 ## 'male_fi': 'Male Final Student', 32 ## 'male_re': 'Male Returning Student', 33 ## 'male_reserved': 'Male Reserved', 34 ## 'male_xx': 'Male Other' 35 ## }
Note: See TracChangeset for help on using the changeset viewer.