Changeset 166 for waeup_product/trunk/Students.py
- Timestamp:
- 12 Nov 2005, 14:45:08 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup_product/trunk/Students.py
r164 r166 78 78 '%s_sc_id' % ident : ds.get('sc_id'), 79 79 '%s_sc_value' % ident : ds.get('sc_value'), 80 '%s_date' % ident : ds.get('sc_date'), 80 81 } 81 tmp_user = CPSUnrestrictedUser('pseudo', '', 82 83 if self.portal_membership.isAnonymousUser(): 84 tmp_user = CPSUnrestrictedUser('s%(jamb_id)s' % ds, '', 82 85 ['StudentManager'], '') 83 tmp_user = tmp_user.__of__(self.acl_users) 84 newSecurityManager(None, tmp_user) 86 tmp_user = tmp_user.__of__(self.acl_users) 87 newSecurityManager(None, tmp_user) 88 #print str(dict) 85 89 self.edit(mapping=dict) 86 90 … … 94 98 return False 95 99 100 security.declareProtected(View,"accommodationIsBooked") 101 def accommodationIsBooked(self): 102 """is the accommodation booked""" 103 if self.accommodation_sc_pin != '': 104 return True 105 return False 106 107 security.declareProtected(View,"accommodationIsPayed") 108 def accommodationIsPayed(self): 109 """is the accommodation payed""" 110 if self.accommodation_sc_pin != '': 111 return True 112 return False 113 114 security.declareProtected(View,"isRegisteredForCurrentLevel") 115 def isRegisteredForCurrentLevel(self): 116 """is the student registered for the current level""" 117 for l in self.aq_parent.objectValues(): 118 if l.portal_type == 'StudyLevel': 119 return True 120 return False 121 96 122 InitializeClass(Student) 97 123 … … 138 164 """Add a Students personal data.""" 139 165 ob = StudentPersonal(id, **kw) 166 return CPSBase_adder(container, ob, REQUEST=REQUEST) 167 168 ###) 169 170 studentdocuments_fti = { ###( 171 'title': 'WAeUP StudentDocuments', 172 'description': '', 173 'content_icon': 'student.gif', 174 'content_meta_type': 'StudentDocuments', 175 'factory': 'addStudent', 176 'immediate_view': 'temporary_view_all', 177 'global_allow': True, 178 'filter_content_types': True, 179 'allowed_content_types': (), 180 'allow_discussion': False, 181 } 182 183 ###) 184 185 class StudentDocuments(CPSDocument): ###( 186 """ 187 WAeUP Student container for the various student data 188 """ 189 meta_type = 'StudentDocuments' 190 portal_type = meta_type 191 security = ClassSecurityInfo() 192 193 security.declareProtected(View,"Title") 194 def Title(self): 195 """compose title""" 196 content = self.getContent() 197 return "Scanned Documents" 198 199 200 InitializeClass(StudentDocuments) 201 202 def addStudentDocuments(container, id, REQUEST=None, **kw): 203 """Add a Students documents""" 204 ob = StudentDocuments(id, **kw) 140 205 return CPSBase_adder(container, ob, REQUEST=REQUEST) 141 206
Note: See TracChangeset for help on using the changeset viewer.