Changeset 279
- Timestamp:
- 29 Jun 2006, 06:38:51 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Academics.py
r278 r279 17 17 #registerDirectory('skins/waeup_faculty', globals()) 18 18 19 import csv,re 20 import logging 21 import Globals 22 p_home = Globals.package_home(globals()) 23 i_home = Globals.INSTANCE_HOME 24 19 25 class AcademicsFolder(CPSDocument): ###( 20 26 """ … … 30 36 ## return "AcademicsFolder of %s" % (self.title) 31 37 32 security.declareProtected( ModifyPortalContent,"loadFacultiesFromCSV")###(38 security.declareProtected(View,"loadFacultiesFromCSV")###( 33 39 def loadFacultiesFromCSV(self): 34 40 """install Universityspecific Faculies from CSV values""" … … 76 82 77 83 ###) 78 79 84 80 85 security.declareProtected(ModifyPortalContent,"loadDepartmentsFromCSV")###( … … 340 345 security = ClassSecurityInfo() 341 346 347 def getCourseEntry(self,cid): 348 res = self.portal_catalog({'meta_type': "Course", 349 'id': cid}) 350 if res: 351 return res[-1] 352 else: 353 return None 354 342 355 security.declareProtected(View,"Title") 343 356 def Title(self): 344 357 """compose title""" 345 res = self.portal_catalog({'meta_type': "Course", 346 'id': self.id}) 347 if res: 348 course = res[-1].getObject() 349 else: 350 return "No course for %s" % self.id 351 return "%s" % (course.title) 358 ce = self.getCourseEntry(self.id) 359 if ce: 360 return "%s" % ce.Title 361 return "No such course" 362 363 security.declareProtected(View,"credits") 364 def credits(self): 365 """credits from course""" 366 ce = self.getCourseEntry(self.id) 367 if ce: 368 return "%s" % ce.credits 369 return 0 370 371 security.declareProtected(View,"passmark") 372 def passmark(self): 373 """passmark from course""" 374 ce = self.getCourseEntry(self.id) 375 if ce: 376 return "%s" % ce.passmark 377 return "No such course" 378 352 379 353 380 InitializeClass(CertificateCourse) -
WAeUP_SRP/trunk/__init__.py
r278 r279 19 19 from Products.WAeUP_SRP.Accommodation import AccoFolder, addAccoFolder 20 20 from Products.WAeUP_SRP.Accommodation import Accommodation, addAccommodation 21 #from Products.WAeUP_SRP.Academics import SCFolder, addSCFolder22 21 from Products.WAeUP_SRP.Academics import Certificate, addCertificate 23 22 from Products.WAeUP_SRP.Academics import CertificateCourse, addCertificateCourse -
WAeUP_SRP/trunk/profiles/default/types/AcademicsFolder.xml
r278 r279 6 6 <property name="content_icon"></property> 7 7 <property name="content_meta_type">AcademicsFolder</property> 8 <property name="product"> CPSDefault</property>9 <property name="factory">add Folder</property>8 <property name="product">WAeUP_SRP</property> 9 <property name="factory">addAcademicsFolder</property> 10 10 <property name="immediate_view">folder_view</property> 11 11 <property name="global_allow">True</property> … … 44 44 condition_expr="python:True or member and 'UniversityManager'in member.getRoles()" 45 45 url_expr="string:${object/absolute_url}/create_common?type_name=Faculty" 46 visible="True"> 47 <permission value="University Manage"/> 48 </action> 46 visible="True"/> 49 47 <action title="action_folder_contents" action_id="contents" category="object" 50 48 condition_expr="" url_expr="string:${object/absolute_url}/folder_contents" 51 visible="True"> 52 <permission value="University Manage"/> 53 </action> 49 visible="True"/> 54 50 <action title="delegate" action_id="localroles" category="object" 55 51 condition_expr="" url_expr="string:${object_url}/folder_localrole_form" 56 visible="False"> 57 <permission value="University Manage"/> 58 </action> 52 visible="False"/> 59 53 <action title="IMPORT: Faculties" action_id="import_faculties" 60 54 category="object" condition_expr="" 61 url_expr="string:${object_url}/loadFacultiesFromCSV" visible="True"> 62 <permission value="Modify portal content"/> 63 </action> 55 url_expr="string:${object_url}/loadFacultiesFromCSV" visible="True"/> 64 56 <action title="Departments" action_id="import_departments" category="object" 65 57 condition_expr="" url_expr="string:${object_url}/loadDepartmentsFromCSV" -
WAeUP_SRP/trunk/profiles/default/types/StudyLevel.xml
r274 r279 31 31 <property name="storage_methods"/> 32 32 <property name="cps_is_portlet">False</property> 33 <alias from="(Default)" to=" temporary_view_all"/>34 <alias from="view" to=" temporary_view_all"/>33 <alias from="(Default)" to="level_view"/> 34 <alias from="view" to="level_view"/> 35 35 <action title="Standard View" action_id="view" category="object" 36 36 condition_expr="" url_expr="string:${object_url}/level_view" -
WAeUP_SRP/trunk/skins/waeup_faculty/level_view_form.pt
r256 r279 31 31 <td tal:content="course/id"> 32 32 </td> 33 <td tal:content="course/Title"> 34 </td> 33 <td tal:content="course/Title"></td> 34 <td tal:content="course/credits"></td> 35 <td tal:content="course/passmark"></td> 35 36 </tr> 36 37 <tr> <td></td></tr>
Note: See TracChangeset for help on using the changeset viewer.