Changeset 89 for waeup_product/trunk
- Timestamp:
- 26 Oct 2005, 11:54:25 (19 years ago)
- Location:
- waeup_product/trunk
- Files:
-
- 1 added
- 17 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
waeup_product/trunk/Extensions/install.py
r87 r89 371 371 }, 372 372 ) 373 installer.verifyPortletContainer( self.portal.sections.waeup)374 installer.verifyPortlets(portlets, self.portal.sections.waeup)373 installer.verifyPortletContainer(waeup) 374 installer.verifyPortlets(portlets,waeup) 375 375 376 376 ###) -
waeup_product/trunk/Faculty.py
r68 r89 40 40 'allowed_content_types': ('Department',), 41 41 'allow_discussion': False, 42 'actions': (43 {'id': 'view',44 'name': 'action_view',45 'action': 'string:${object_url}/faculty_index_html',46 #'action': 'string:${object_url}/cpsdocument_view',47 'condition': '',48 'permission': ('View',),49 'category': 'object',50 'visible': True,},51 {'id': 'new_content',52 'name': 'Add Data',53 'action': 'string:${object_url}/folder_factories',54 'condition': "python:1 or len(object.contentItems()) == 0 ",55 'permission': ('Modify portal content',),56 'category': 'object',57 'visible': True,},58 {'id': 'contents',59 'name': 'action_folder_contents',60 'action': 'string:${object_url}/folder_contents',61 'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'",62 'permission': ('Modify portal content',),63 'category': 'object',64 'visible': True,},65 {'id': 'edit',66 'name': 'action_edit',67 'action': 'string:${object_url}/cpsdocument_edit_form',68 'condition': '',69 'permission': ('Modify portal content',),70 'category': 'object',71 'visible': True,},72 )42 ## 'actions': ( 43 ## {'id': 'view', 44 ## 'name': 'action_view', 45 ## 'action': 'string:${object_url}/faculty_index_html', 46 ## #'action': 'string:${object_url}/cpsdocument_view', 47 ## 'condition': '', 48 ## 'permission': ('View',), 49 ## 'category': 'object', 50 ## 'visible': True,}, 51 ## {'id': 'new_content', 52 ## 'name': 'Add Data', 53 ## 'action': 'string:${object_url}/folder_factories', 54 ## 'condition': "python:1 or len(object.contentItems()) == 0 ", 55 ## 'permission': ('Modify portal content',), 56 ## 'category': 'object', 57 ## 'visible': True,}, 58 ## {'id': 'contents', 59 ## 'name': 'action_folder_contents', 60 ## 'action': 'string:${object_url}/folder_contents', 61 ## 'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'", 62 ## 'permission': ('Modify portal content',), 63 ## 'category': 'object', 64 ## 'visible': True,}, 65 ## {'id': 'edit', 66 ## 'name': 'action_edit', 67 ## 'action': 'string:${object_url}/cpsdocument_edit_form', 68 ## 'condition': '', 69 ## 'permission': ('Modify portal content',), 70 ## 'category': 'object', 71 ## 'visible': True,}, 72 ## ) 73 73 } 74 74 ###) … … 101 101 'allowed_content_types': ('Course',), 102 102 'allow_discussion': False, 103 'actions': (104 {'id': 'view',105 'name': 'action_view',106 'action': 'string:${object_url}/department_index_html',107 'condition': '',108 'permission': ('View',),109 'category': 'object',110 'visible': True,},111 {'id': 'new_content',112 'name': 'Add Data',113 'action': 'string:${object_url}/folder_factories',114 'condition': "python:1 or len(object.contentItems()) == 0 ",115 'permission': ('Modify portal content',),116 'category': 'object',117 'visible': True,},118 {'id': 'contents',119 'name': 'action_folder_contents',120 'action': 'string:${object_url}/folder_contents',121 'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'",122 'permission': ('Modify portal content',),123 'category': 'object',124 'visible': True,},125 {'id': 'edit',126 'name': 'action_edit',127 'action': 'string:${object_url}/cpsdocument_edit_form',128 'condition': '',129 'permission': ('Modify portal content',),130 'category': 'object',131 'visible': True,},132 )103 ## 'actions': ( 104 ## {'id': 'view', 105 ## 'name': 'action_view', 106 ## 'action': 'string:${object_url}/department_index_html', 107 ## 'condition': '', 108 ## 'permission': ('View',), 109 ## 'category': 'object', 110 ## 'visible': True,}, 111 ## {'id': 'new_content', 112 ## 'name': 'Add Data', 113 ## 'action': 'string:${object_url}/folder_factories', 114 ## 'condition': "python:1 or len(object.contentItems()) == 0 ", 115 ## 'permission': ('Modify portal content',), 116 ## 'category': 'object', 117 ## 'visible': True,}, 118 ## {'id': 'contents', 119 ## 'name': 'action_folder_contents', 120 ## 'action': 'string:${object_url}/folder_contents', 121 ## 'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'", 122 ## 'permission': ('Modify portal content',), 123 ## 'category': 'object', 124 ## 'visible': True,}, 125 ## {'id': 'edit', 126 ## 'name': 'action_edit', 127 ## 'action': 'string:${object_url}/cpsdocument_edit_form', 128 ## 'condition': '', 129 ## 'permission': ('Modify portal content',), 130 ## 'category': 'object', 131 ## 'visible': True,}, 132 ## ) 133 133 } 134 134 ###) … … 161 161 'allowed_content_types': (), 162 162 'allow_discussion': False, 163 'actions': (164 {'id': 'view',165 'name': 'action_view',166 'action': 'string:${object_url}/course_index_html',167 'condition': '',168 'permission': ('View',),169 'category': 'object',170 'visible': True,},171 {'id': 'new_content',172 'name': 'Add Data',173 'action': 'string:${object_url}/folder_factories',174 'condition': "python:1 or len(object.contentItems()) == 0 ",175 'permission': ('Modify portal content',),176 'category': 'object',177 'visible': True,},178 {'id': 'contents',179 'name': 'action_folder_contents',180 'action': 'string:${object_url}/folder_contents',181 'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'",182 'permission': ('Modify portal content',),183 'category': 'object',184 'visible': True,},185 {'id': 'edit',186 'name': 'action_edit',187 'action': 'string:${object_url}/cpsdocument_edit_form',188 'condition': '',189 'permission': ('Modify portal content',),190 'category': 'object',191 'visible': True,},192 )163 ## 'actions': ( 164 ## {'id': 'view', 165 ## 'name': 'action_view', 166 ## 'action': 'string:${object_url}/course_index_html', 167 ## 'condition': '', 168 ## 'permission': ('View',), 169 ## 'category': 'object', 170 ## 'visible': True,}, 171 ## {'id': 'new_content', 172 ## 'name': 'Add Data', 173 ## 'action': 'string:${object_url}/folder_factories', 174 ## 'condition': "python:1 or len(object.contentItems()) == 0 ", 175 ## 'permission': ('Modify portal content',), 176 ## 'category': 'object', 177 ## 'visible': True,}, 178 ## {'id': 'contents', 179 ## 'name': 'action_folder_contents', 180 ## 'action': 'string:${object_url}/folder_contents', 181 ## 'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'", 182 ## 'permission': ('Modify portal content',), 183 ## 'category': 'object', 184 ## 'visible': True,}, 185 ## {'id': 'edit', 186 ## 'name': 'action_edit', 187 ## 'action': 'string:${object_url}/cpsdocument_edit_form', 188 ## 'condition': '', 189 ## 'permission': ('Modify portal content',), 190 ## 'category': 'object', 191 ## 'visible': True,}, 192 ## ) 193 193 } 194 194 ###) -
waeup_product/trunk/Students.py
r87 r89 39 39 'allowed_content_types': ('Jamb','StudentPersonal'), 40 40 'allow_discussion': False, 41 'actions': (42 {'id': 'view',43 'name': 'action_view',44 'action': 'string:${object_url}/student_index_html',45 #'action': 'string:${object_url}/cpsdocument_view',46 'condition': '',47 'permission': ('View',),48 'category': 'object',49 'visible': True,},50 {'id': 'new_content',51 'name': 'Add Data',52 'action': 'string:${object_url}/folder_factories',53 'condition': "python:1 or len(object.contentItems()) == 0 ",54 'permission': ('Modify portal content',),55 'category': 'object',56 'visible': True,},57 {'id': 'contents',58 'name': 'action_folder_contents',59 'action': 'string:${object_url}/folder_contents',60 'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'",61 'permission': ('Modify portal content',),62 'category': 'object',63 'visible': True,},64 {'id': 'edit',65 'name': 'action_edit',66 'action': 'string:${object_url}/cpsdocument_edit_form',67 'condition': '',68 'permission': ('Modify portal content',),69 'category': 'object',70 'visible': True,},71 )41 ## 'actions': ( 42 ## {'id': 'view', 43 ## 'name': 'action_view', 44 ## 'action': 'string:${object_url}/student_index_html', 45 ## #'action': 'string:${object_url}/cpsdocument_view', 46 ## 'condition': '', 47 ## 'permission': ('View',), 48 ## 'category': 'object', 49 ## 'visible': True,}, 50 ## {'id': 'new_content', 51 ## 'name': 'Add Data', 52 ## 'action': 'string:${object_url}/folder_factories', 53 ## 'condition': "python:1 or len(object.contentItems()) == 0 ", 54 ## 'permission': ('Modify portal content',), 55 ## 'category': 'object', 56 ## 'visible': True,}, 57 ## {'id': 'contents', 58 ## 'name': 'action_folder_contents', 59 ## 'action': 'string:${object_url}/folder_contents', 60 ## 'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'", 61 ## 'permission': ('Modify portal content',), 62 ## 'category': 'object', 63 ## 'visible': True,}, 64 ## {'id': 'edit', 65 ## 'name': 'action_edit', 66 ## 'action': 'string:${object_url}/cpsdocument_edit_form', 67 ## 'condition': '', 68 ## 'permission': ('Modify portal content',), 69 ## 'category': 'object', 70 ## 'visible': True,}, 71 ## ) 72 72 } 73 73 … … 81 81 portal_type = meta_type 82 82 security = ClassSecurityInfo() 83 84 security.declarePublic("test")85 def test(self):86 """test"""87 return self.REQUEST88 83 89 84 InitializeClass(Student) … … 95 90 96 91 ###) 92 studentpersonal_fti = { ###( 93 'title': 'WAeUP StudentPersonal', 94 'description': '', 95 'content_icon': 'student.gif', 96 'content_meta_type': 'StudentPersonal', 97 'factory': 'addStudent', 98 'immediate_view': 'student_personal_index_html', 99 'global_allow': True, 100 'filter_content_types': True, 101 'allowed_content_types': (), 102 'allow_discussion': False, 103 ## 'actions': ( 104 ## {'id': 'view', 105 ## 'name': 'action_view', 106 ## 'action': 'string:${object_url}/student_index_html', 107 ## #'action': 'string:${object_url}/cpsdocument_view', 108 ## 'condition': '', 109 ## 'permission': ('View',), 110 ## 'category': 'object', 111 ## 'visible': True,}, 112 ## {'id': 'new_content', 113 ## 'name': 'Add Data', 114 ## 'action': 'string:${object_url}/folder_factories', 115 ## 'condition': "python:1 or len(object.contentItems()) == 0 ", 116 ## 'permission': ('Modify portal content',), 117 ## 'category': 'object', 118 ## 'visible': True,}, 119 ## {'id': 'contents', 120 ## 'name': 'action_folder_contents', 121 ## 'action': 'string:${object_url}/folder_contents', 122 ## 'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'", 123 ## 'permission': ('Modify portal content',), 124 ## 'category': 'object', 125 ## 'visible': True,}, 126 ## {'id': 'edit', 127 ## 'name': 'action_edit', 128 ## 'action': 'string:${object_url}/cpsdocument_edit_form', 129 ## 'condition': '', 130 ## 'permission': ('Modify portal content',), 131 ## 'category': 'object', 132 ## 'visible': True,}, 133 ## ) 134 } 135 136 ###) 137 138 class StudentPersonal(CPSDocument): ###( 139 """ 140 WAeUP Student container for the various student data 141 """ 142 meta_type = 'StudentPersonal' 143 portal_type = meta_type 144 security = ClassSecurityInfo() 145 146 InitializeClass(StudentPersonal) 147 148 def addStudentPersonal(container, id, REQUEST=None, **kw): 149 """Add a Students personal data.""" 150 ob = StudentPersonal(id, **kw) 151 return CPSBase_adder(container, ob, REQUEST=REQUEST) 152 153 ###) 154 155 jamb_fti = { ###( 156 'title': 'WAeUP Jamb', 157 'description': '', 158 'content_icon': '', 159 'content_meta_type': 'Jamb', 160 'factory': 'addJamb', 161 'immediate_view': 'cpsdocument_view', 162 'global_allow': True, 163 'filter_content_types': True, 164 'allowed_content_types': ('Course',), 165 'allow_discussion': False, 166 ## 'actions': ( 167 ## {'id': 'view', 168 ## 'name': 'action_view', 169 ## 'action': 'string:${object_url}/jamb_index_html', 170 ## 'condition': '', 171 ## 'permission': ('View',), 172 ## 'category': 'object', 173 ## 'visible': True,}, 174 ## {'id': 'new_content', 175 ## 'name': 'Add Data', 176 ## 'action': 'string:${object_url}/folder_factories', 177 ## 'condition': "python:1 or len(object.contentItems()) == 0 ", 178 ## 'permission': ('Modify portal content',), 179 ## 'category': 'object', 180 ## 'visible': True,}, 181 ## {'id': 'contents', 182 ## 'name': 'action_folder_contents', 183 ## 'action': 'string:${object_url}/folder_contents', 184 ## 'condition': "python:1 or object.getTypeInfo().cps_proxy_type != 'document'", 185 ## 'permission': ('Modify portal content',), 186 ## 'category': 'object', 187 ## 'visible': True,}, 188 ## {'id': 'edit', 189 ## 'name': 'action_edit', 190 ## 'action': 'string:${object_url}/cpsdocument_edit_form', 191 ## 'condition': '', 192 ## 'permission': ('Modify portal content',), 193 ## 'category': 'object', 194 ## 'visible': True,}, 195 ## ) 196 } 197 ###) 198 199 class Jamb(CPSDocument): ###( 200 """ 201 WAeUP Jamb containing the courses and students 202 """ 203 meta_type = 'Jamb' 204 portal_type = meta_type 205 security = ClassSecurityInfo() 206 207 InitializeClass(Jamb) 208 209 def addJamb(container, id, REQUEST=None, **kw): 210 """Add a Jamb.""" 211 ob = Jamb(id, **kw) 212 return CPSBase_adder(container, ob, REQUEST=REQUEST) 213 ###) 214 -
waeup_product/trunk/Workflows/WAeUPWorkflow.py
r27 r89 41 41 for p in (View, 42 42 ModifyPortalContent, 43 43 44 ): 44 45 wf.addManagedPermission(p) … … 116 117 actbox_name='', actbox_category='workflow', actbox_url='', 117 118 props={'guard_permissions':'', 118 'guard_roles':'Manager; S ectionManager',119 'guard_roles':'Manager; StudentManager', 119 120 'guard_expr':''},) 120 121 … … 134 135 actbox_url='', 135 136 props={'guard_permissions':'', 136 'guard_roles':'Manager; S ectionManager; SectionReviewer; SectionReader',137 'guard_roles':'Manager; StudentManager', 137 138 'guard_expr':''},) 138 139 … … 153 154 actbox_url='', 154 155 props={'guard_permissions':'', 155 'guard_roles':'Manager; S ectionManager',156 'guard_roles':'Manager; StudentManager', 156 157 'guard_expr':''},) 157 158 -
waeup_product/trunk/__init__.py
r84 r89 12 12 13 13 fti = (Students.student_fti, 14 Students.studentpersonal_fti, 15 Students.jamb_fti, 14 16 Faculty.faculty_fti, 15 17 Faculty.department_fti, … … 20 22 Students.StudentsFolder, 21 23 Students.Student, 24 Students.StudentPersonal, 25 Students.Jamb, 22 26 Faculty.Faculty, 23 27 Faculty.Department, … … 28 32 Students.addStudentsFolder, 29 33 Students.addStudent, 34 Students.addStudentPersonal, 35 Students.addJamb, 30 36 Faculty.addFaculty, 31 37 Faculty.addDepartment, -
waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py
r87 r89 32 32 'name': 'action_view', 33 33 'action': 'university_view', 34 'condition': "python:'Manager' in member.getRoles()", 34 35 'permissions': (View,)}, 35 36 {'id': 'addFaculty', … … 40 41 'name': 'action_folder_contents', 41 42 'action': 'folder_contents', 43 'condition': "python:'Manager' in member.getRoles()", 42 44 'permissions': (ModifyPortalContent,UniversityManage,)}, 43 45 {'id': 'edit', … … 45 47 'action': 'cpsdocument_edit_form', 46 48 #'action': 'cpsdocument_edit_form', 49 'condition': "python:'Manager' in member.getRoles()", 47 50 'permissions': (ModifyPortalContent,UniversityManage,)}, 48 51 {'id': 'metadata', 49 52 'name': 'action_metadata', 50 53 'action': 'cpsdocument_metadata', 51 'condition': 'not:portal/portal_membership/isAnonymousUser',54 'condition': "python:'Manager' in member.getRoles()", 52 55 'permissions': (ModifyPortalContent,)}, 53 56 {'id': 'localroles', 54 57 'name': 'action_local_roles', 55 58 'action': 'folder_localrole_form', 59 'condition': 'not:portal/portal_membership/isAnonymousUser', 56 60 'permissions': (ChangePermissions,)}, 57 61 ) … … 82 86 'name': 'Students', 83 87 'action': 'students_folder_view', 88 'condition': "python:'Manager' in member.getRoles()", 84 89 'permissions': (View,)}, 85 90 { … … 87 92 'name' : 'Add Content', 88 93 'action' : 'string:${object/absolute_url}/folder_factories', 94 'condition': "python:'Manager' in member.getRoles()", 89 95 'permissions': (StudentManage,)}, 90 96 { … … 134 140 'cps_section_wf': 'waeup_section_wf', 135 141 'use_content_status_history': 0, 136 'actions _add': (142 'actions': ( 137 143 {'id': 'view', 138 144 'name': 'action_view', … … 143 149 'category': 'object', 144 150 'visible': True,}, 151 {'id': 'metadata', 152 'name': 'action_metadata', 153 'action': 'cpsdocument_metadata', 154 'condition': "python:'Manager' in member.getRoles()", 155 'permissions': (UniversityManage,)}, 145 156 ) 146 157 } … … 223 234 'cps_workspace_wf': 'workspace_content_wf', 224 235 'cps_section_wf': 'section_content_wf', 225 'actions _add': (236 'actions': ( 226 237 {'id': 'view', 227 238 'name': 'action_view', 228 239 'action': 'string:${object_url}/jamb_index_html', 229 #'action': 'string:${object_url}/cpsdocument_view', 230 'condition': '', 231 'permission': ('View',), 232 'category': 'object', 233 'visible': True,}, 240 'condition': '', 241 'permission': (View,), 242 'visible': True,}, 243 {'id': 'edit', 244 'name': 'action_edit', 245 'action': 'string:${object_url}/waeup_edit_form', 246 'condition': '', 247 'permission': (ModifyPortalContent,StudentManage), 248 }, 249 { 250 'id' : 'add_content', 251 'name' : 'Add Content', 252 'action' : 'string:${object/absolute_url}/folder_factories', 253 'condition': "python:'Manager' in member.getRoles()", 254 'permissions': (StudentManage,)}, 255 {'id': 'metadata', 256 'name': 'action_metadata', 257 'action': 'cpsdocument_metadata', 258 'condition': "python:'Manager' in member.getRoles()", 259 'permissions': (UniversityManage,)}, 234 260 ) 235 261 } … … 241 267 'content_icon': '', 242 268 'content_meta_type': 'CPS Document', 243 'product': ' CPSDocument',244 'factory': 'add CPSDocument',245 'immediate_view': ' cpsdocument_view',269 'product': 'WAeUP', 270 'factory': 'addStudentPersonal', 271 'immediate_view': 'student_personal_index_html', 246 272 'global_allow': True, 247 273 'filter_content_types': True, … … 259 285 'cps_workspace_wf': 'workspace_content_wf', 260 286 'cps_section_wf': 'section_content_wf', 261 'actions _add': (287 'actions': ( 262 288 {'id': 'view', 263 289 'name': 'action_view', … … 275 301 'category': 'object', 276 302 'visible': True,}, 303 {'id': 'metadata', 304 'name': 'action_metadata', 305 'action': 'cpsdocument_metadata', 306 'condition': "python:'Manager' in member.getRoles()", 307 'permissions': (UniversityManage,)}, 277 308 ) 278 309 } … … 300 331 'cps_section_wf': 'waeup_section_wf', 301 332 'use_content_status_history': 0, 302 'actions _add': (333 'actions': ( 303 334 {'id': 'view', 304 335 'name': 'action_view', … … 340 371 'cps_section_wf': 'waeup_section_wf', 341 372 'use_content_status_history': 0, 342 'actions _add': (373 'actions': ( 343 374 {'id': 'view', 344 375 'name': 'action_view', … … 380 411 'cps_section_wf': 'waeup_section_wf', 381 412 'use_content_status_history': 0, 382 'actions _add': (413 'actions': ( 383 414 {'id': 'view', 384 415 'name': 'action_view', -
waeup_product/trunk/skins/waeup_default/portlet_main_navigation.pt
r84 r89 4 4 folder_id python:str(user)" 5 5 > 6 <tal:block condition="python: 'Students' in user.getGroups()">6 <tal:block condition="python: 0 and 'Students' in user.getGroups()"> 7 7 <a href="" i18n:translate="" 8 8 tal:attributes="href string:${here/portal_url}/sections/waeup/students/${folder_id}" 9 9 tal:content="string: Personal area for JAMB Registration ${folder_id}"></a> 10 10 </tal:block> 11 <tal:block condition="python: 'StudentManager' in user.getGroups()">11 <tal:block condition="python: 1"> 12 12 <a href="" i18n:translate="" 13 13 tal:attributes="href string:${here/portal_url}/sections/waeup/students" -
waeup_product/trunk/skins/waeup_default/university_view.py
r87 r89 6 6 7 7 member = context.portal_membership.getAuthenticatedMember() 8 #return context.folder_view() 8 9 9 if member: 10 10 if 'Manager' in member.getRoles(): 11 11 return context.folder_view() 12 elif 'Students' in member.getGroups(): 13 return context.students.students_folder_view_student(psm=psm,groups=groups) 14 elif 'StudentManager' in member.getGroups(): 15 return context.waeup_view_manager(psm=psm,groups=groups) 16 return context.students.students_folder_view_anon(psm=psm,groups=groups) 12 return context.university_view_all(psm=psm) -
waeup_product/trunk/skins/waeup_faculty/course_index_html.py
r80 r89 5 5 """Default view for the Student.""" 6 6 member = context.portal_membership.getAuthenticatedMember() 7 if member: 8 roles = member.getRoles() 9 if 'Manager' in roles: 10 return context.cpsdocument_view() 11 elif 'StudentManager' in roles: 12 return context.course_view_manager() 13 return context.course_view_student() 7 14 8 #return context.student_view_manager()9 if member:10 if 'Manager' in member.getRoles():11 return context.cpsdocument_view()12 elif 'StudentManager' in member.getGroups():13 return context.course_view_manager()14 elif 'Students' in member.getGroups():15 return context.course_view_student() -
waeup_product/trunk/skins/waeup_faculty/department_index_html.py
r84 r89 5 5 """Default view for a Faculty.""" 6 6 member = context.portal_membership.getAuthenticatedMember() 7 8 #return context.student_view_manager()9 7 if member: 10 if 'StudentManager' in member.getGroups(): 11 #if 'Manager' in member.getRoles(): 8 roles = member.getRoles() 9 if 'Manager' in roles: 10 return context.folder_view() 11 elif 'StudentManager' in roles: 12 12 return context.department_view_manager() 13 elif 'Students' in member.getGroups(): 14 return context.department_view_student() 13 return context.department_view_student() -
waeup_product/trunk/skins/waeup_faculty/department_index_html.py~
r84 r89 1 1 ##parameters=post_id=None, REQUEST=None 2 2 3 # $Id: department_index_html.py 8 0 2005-10-22 13:43:45Z joachim $3 # $Id: department_index_html.py 84 2005-10-25 16:18:40Z joachim $ 4 4 5 5 """Default view for a Faculty.""" … … 8 8 #return context.student_view_manager() 9 9 if member: 10 if 'Manager' in member.getRoles(): 10 if 'StudentManager' in member.getGroups(): 11 #if 'Manager' in member.getRoles(): 11 12 return context.department_view_manager() 12 13 elif 'Students' in member.getGroups(): -
waeup_product/trunk/skins/waeup_faculty/faculty_index_html.py
r84 r89 6 6 member = context.portal_membership.getAuthenticatedMember() 7 7 8 #return context.student_view_manager() 9 #if 'Manager' in member.getRoles(): 10 if 'StudentManager' in member.getGroups(): 11 return context.faculty_view_manager() 12 elif 'Students' in member.getGroups(): 13 return context.faculty_view_student() 8 member = context.portal_membership.getAuthenticatedMember() 9 if member: 10 roles = member.getRoles() 11 if 'Manager' in roles: 12 return context.folder_view() 13 elif 'StudentManager' in roles: 14 return context.faculty_view_manager() 15 return context.faculty_view_student() -
waeup_product/trunk/skins/waeup_student/create_jamb.py
r57 r89 52 52 noCPSMember = False 53 53 try: 54 pr.addMember(s_id, 'UnSeT',roles=('Member','CPSMember' ))54 pr.addMember(s_id, 'UnSeT',roles=('Member','CPSMember','Student')) 55 55 except: 56 56 noCPSMember = True 57 57 if noCPSMember: 58 58 pr.addMember(s_id, 'UnSeT',roles=('Member',)) 59 groups = context.portal_directories.groups60 gm = list(groups.getEntry('Students')['members'])61 gm.extend((s_id,))62 groups.editEntry({'group': 'Students',63 'members': gm})59 ## groups = context.portal_directories.groups 60 ## gm = list(groups.getEntry('Students')['members']) 61 ## gm.extend((s_id,)) 62 ## groups.editEntry({'group': 'Students', 63 ## 'members': gm}) 64 64 return context.students_folder_view_manager(psm=psm) 65 65 ## return context.create_jamb_form(rendered = res, -
waeup_product/trunk/skins/waeup_student/jamb_index_html.py
r66 r89 7 7 8 8 #return context.student_view_manager() 9 if 'StudentManager' in member.getGroups(): 10 return context.jamb_view_manager() 11 elif 'Students' in member.getGroups(): 12 return context.jamb_view_student() 9 if member: 10 roles = member.getRoles() 11 if 'Manager' in roles: 12 return context.cpsdocument_view() 13 elif 'StudentManager' in roles: 14 return context.jamb_view_manager() 15 return context.jamb_view_student() -
waeup_product/trunk/skins/waeup_student/student_index_html.py
r79 r89 8 8 #return context.student_view_manager() 9 9 if member: 10 if 'Manager' in member.getRoles(): 10 roles = member.getRoles() 11 if 'Manager' in roles: 11 12 return context.folder_view() 12 elif 'StudentManager' in member.getGroups():13 elif 'StudentManager' in roles: 13 14 return context.student_view_manager() 14 elif 'Students' in member.getGroups(): 15 return context.student_view_student() 15 return context.student_view_student() -
waeup_product/trunk/skins/waeup_student/student_personal_index_html.py
r67 r89 7 7 8 8 #return context.student_view_manager() 9 if 'StudentManager' in member.getGroups(): 10 return context.student_personal_view_manager() 11 elif 'Students' in member.getGroups(): 12 return context.student_personal_view_student() 9 if member: 10 roles = member.getRoles() 11 if 'Manager' in roles: 12 return context.cpsdocument_view() 13 elif 'StudentManager' in roles: 14 return context.student_personal_view_manager() 15 return context.student_personal_view_student() -
waeup_product/trunk/skins/waeup_student/students_folder_view.py
r88 r89 9 9 member = context.portal_membership.getAuthenticatedMember() 10 10 if member: 11 if 'Manager' in member.getRoles(): 11 roles = member.getRoles() 12 if 'Manager' in roles: 12 13 return context.folder_view() 14 elif 'StudentManager' in roles: 15 return context.students_folder_view_manager(psm=psm) 16 elif 'Student' in roles: 17 return context.students_folder_view_student(psm=psm) 13 18 return context.students_folder_view_all(psm=psm)
Note: See TracChangeset for help on using the changeset viewer.