Changeset 319
- Timestamp:
- 16 Jul 2006, 07:48:04 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 4 added
- 6 deleted
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Academics.py
r309 r319 6 6 from Products.CMFCore.permissions import View 7 7 from Products.CMFCore.permissions import ModifyPortalContent 8 from Products.CPSCore.CPSBase import CPSBase_adder, CPSBaseFolder 9 #from Products.CPSCore.CPSBase import CPSBaseDocument as BaseDocument 10 from Products.CPSDocument.CPSDocument import CPSDocument 11 #from Products.CPSCore.CPSBase import CPSBaseBTreeFolder as BaseBTreeFolder 12 #from Products.CPSCore.CPSBase import CPSBaseBTreeDocument as BaseBTreeDocument 8 from Products.CPSCore.CPSBase import CPSBase_adder, CPSBaseFolder 9 #from Products.CPSCore.CPSBase import CPSBaseDocument as BaseDocument 10 from Products.CPSDocument.CPSDocument import CPSDocument 11 #from Products.CPSCore.CPSBase import CPSBaseBTreeFolder as BaseBTreeFolder 12 #from Products.CPSCore.CPSBase import CPSBaseBTreeDocument as BaseBTreeDocument 13 13 #from Products.CMFCore.DirectoryView import registerDirectory 14 14 … … 25 25 class AcademicsFolder(CPSDocument): ###( 26 26 """ 27 WAeUP AcademicsFolder containing StudyCourses 27 WAeUP AcademicsFolder containing StudyCourses 28 28 """ 29 29 meta_type = 'AcademicsFolder' … … 37 37 38 38 security.declareProtected(View,"loadFacultiesFromCSV")###( 39 def loadFacultiesFromCSV(self): 39 def loadFacultiesFromCSV(self): 40 40 """install Universityspecific Faculies from CSV values""" 41 41 #return … … 75 75 76 76 security.declareProtected(ModifyPortalContent,"yamlDumpFaculties")###( 77 def yamlDumpFaculties(self): 77 def yamlDumpFaculties(self): 78 78 """dump Faculies to Yaml""" 79 79 #return … … 92 92 return self.academics.temporary_view_all() 93 93 return self.temporary_view_all() 94 94 95 95 ###) 96 96 … … 131 131 dict = {'Title': dep['Description']} 132 132 d.getContent().edit(mapping=dict) 133 d.invokeFactory('CoursesFolder',' Courses')133 d.invokeFactory('CoursesFolder','courses') 134 134 courses = getattr(d,'Courses') 135 135 dict = {'Title': 'Courses'} 136 136 courses.getContent().edit(mapping=dict) 137 d.invokeFactory('CertificatesFolder',' Certificates')137 d.invokeFactory('CertificatesFolder','certificates') 138 138 certificates = getattr(d,'Certificates') 139 139 dict = {'Title': 'Certificates'} … … 141 141 return self.academics.academics_contents() 142 142 ###) 143 143 144 144 security.declareProtected(ModifyPortalContent,"loadCoursesFromCSV")###( 145 145 def loadCoursesFromCSV(self): … … 212 212 dict = {'Title': course['Description']} 213 213 dict['code'] = course_id 214 dict['org_code'] = course.get('CourseCode') 214 dict['org_code'] = course.get('CourseCode') 215 215 dict['credits'] = course.get('Credits') 216 216 dict['semester'] = course.get('Semester') … … 288 288 dict = {'Title': certificate['Description']} 289 289 dict['code'] = code 290 dict['faculty'] = certificate.get('Faculty') 291 dict['department'] = certificate.get('Dept') 290 dict['faculty'] = certificate.get('Faculty') 291 dict['department'] = certificate.get('Dept') 292 292 dict['max_pass'] = certificate.get('MaxPass') 293 293 dict['max_load'] = certificate.get('MaxLoad') … … 297 297 dict['nr_years'] = int(certificate.get('Nyears')) 298 298 nc = certificate.get('Ncore','1') 299 try: 299 try: 300 300 dict['n_core'] = int(nc) 301 301 except: … … 402 402 dict['code'] = cert_course.get('CosCode') 403 403 dict['certificate_code'] = code 404 dict['certificate_code_org'] = cert_course.get('CertCode') 405 dict['department'] = cert_course.get('Dept') 404 dict['certificate_code_org'] = cert_course.get('CertCode') 405 dict['department'] = cert_course.get('Dept') 406 406 dict['admin_status'] = cert_course.get('Admstatus') 407 407 dict['session'] = cert_course.get('Session') … … 426 426 class Certificate(CPSDocument): ###( 427 427 """ 428 WAeUP Certificate 428 WAeUP Certificate 429 429 """ 430 430 meta_type = 'Certificate' 431 431 portal_type = meta_type 432 432 security = ClassSecurityInfo() 433 433 434 434 def __init__(self, id, **kw): 435 435 CPSDocument.__init__(self, id, **kw) … … 451 451 class CertificateCourse(CPSDocument): ###( 452 452 """ 453 WAeUP CertificateCourse 453 WAeUP CertificateCourse 454 454 """ 455 455 meta_type = 'CertificateCourse' 456 456 portal_type = meta_type 457 457 security = ClassSecurityInfo() 458 458 459 459 def getCourseEntry(self,cid): 460 460 res = self.portal_catalog({'meta_type': "Course", 461 461 'id': cid}) 462 462 if res: 463 return res[-1] 463 return res[-1] 464 464 else: 465 465 return None 466 466 467 467 security.declareProtected(View,"Title") 468 468 def Title(self): … … 480 480 return "%s" % ce.credits 481 481 return "0" 482 482 483 483 security.declareProtected(View,"passmark") 484 484 def passmark(self): … … 487 487 if ce is not None and hasattr(ce,"passmark"): 488 488 return ce.passmark 489 490 489 490 491 491 security.declareProtected(View,"coursepath") 492 492 def coursepath(self): … … 496 496 return ce.getPath() 497 497 return "?" 498 498 499 499 500 500 InitializeClass(CertificateCourse) … … 508 508 class Faculty(CPSDocument): ###( 509 509 """ 510 WAeUP Faculty containing Departments 510 WAeUP Faculty containing Departments 511 511 """ 512 512 meta_type = 'Faculty' 513 513 portal_type = meta_type 514 514 security = ClassSecurityInfo() 515 515 516 516 ## def __init__(self, id, **kw): 517 517 ## CPSDocument.__init__(self, id, **kw) … … 521 521 """compose title""" 522 522 return "%s" % (self.title) 523 523 524 524 security.declareProtected(View,"LongTitle") 525 525 def LongTitle(self): 526 526 """compose long_title""" 527 527 itype = self.portal_vocabularies.institution_types_voc.get(self.institution_type,default="Faculty of") 528 528 529 529 return "%s %s" % (itype,self.title) 530 530 … … 558 558 self.institution_type = "department" 559 559 itype = self.portal_vocabularies.institution_types_voc.get(self.institution_type,default="Department of") 560 560 561 561 return "%s %s" % (itype,self.title) 562 562 … … 567 567 object = Department(id, **kw) 568 568 id = object.getId() 569 container._setObject(id, object) 569 container._setObject(id, object) 570 570 ## dep = getattr(container,id).getEditableContent() #getContent() 571 571 ## dep.invokeFactory('CoursesFolder','Courses') … … 585 585 class Course(CPSDocument): ###( 586 586 """ 587 WAeUP Course 587 WAeUP Course 588 588 """ 589 589 meta_type = 'Course' … … 595 595 """compose title""" 596 596 return self.title 597 597 598 598 InitializeClass(Course) 599 599 … … 606 606 class CourseTicket(CPSDocument): ###( 607 607 """ 608 WAeUP CourseTicket 608 WAeUP CourseTicket 609 609 """ 610 610 meta_type = 'CourseTicket' 611 611 portal_type = meta_type 612 612 security = ClassSecurityInfo() 613 613 614 614 InitializeClass(CourseTicket) 615 615 -
WAeUP_SRP/trunk/profiles/default/cps_portlets/portlet_778397196.xml
r315 r319 24 24 <e v="view"/> 25 25 <e v="edit"/> 26 <e v=" delegate"/>26 <e v="localroles"/> 27 27 <e v="new_entry"/> 28 28 <e v="approve"/> -
WAeUP_SRP/trunk/profiles/default/layouts/course.xml
r256 r319 63 63 </widget> 64 64 <widget name="semester" meta_type="Int Widget"> 65 <property name="title">Nr of semesters</property>65 <property name="title">Nr of Semester</property> 66 66 <property name="fields"> 67 67 <element value="semester"/> 68 68 </property> 69 69 <property name="label">Nr of semesters</property> 70 <property name="label_edit">Nr of semesters</property>70 <property name="label_edit">Nr of Semester</property> 71 71 <property name="readonly_layout_modes"/> 72 72 <property name="hidden_layout_modes"/> -
WAeUP_SRP/trunk/profiles/default/types/AccoFolder.xml
r308 r319 54 54 <permission value="University Manage"/> 55 55 </action> 56 <action title=" delegate" action_id="localroles" category="object"56 <action title="Delegate" action_id="localroles" category="object" 57 57 condition_expr="" url_expr="string:${object_url}/folder_localrole_form" 58 58 visible="False"> -
WAeUP_SRP/trunk/profiles/default/types/Accommodation.xml
r308 r319 48 48 <permission value="Modify portal content"/> 49 49 </action> 50 <action title=" delegate" action_id="localroles" category="object"50 <action title="Delegate" action_id="localroles" category="object" 51 51 condition_expr="" url_expr="string:${object_url}/folder_localrole_form" 52 52 visible="False"> -
WAeUP_SRP/trunk/profiles/default/types/Certificate.xml
r313 r319 49 49 <permission value="Modify portal content"/> 50 50 </action> 51 <action title=" delegate" action_id="localroles" category="object"51 <action title="Delegate" action_id="localroles" category="object" 52 52 condition_expr="" url_expr="string:${object_url}/folder_localrole_form" 53 53 visible="True"> -
WAeUP_SRP/trunk/profiles/default/types/CertificateCourse.xml
r315 r319 44 44 condition_expr="" url_expr="string:${object_url}/cpsdocument_metadata" 45 45 visible="False"/> 46 <action title=" delegate" action_id="localroles" category="object"46 <action title="Delegate" action_id="localroles" category="object" 47 47 condition_expr="" url_expr="string:${object_url}/folder_localrole_form" 48 48 visible="True"/> -
WAeUP_SRP/trunk/profiles/default/types/CertificatesFolder.xml
r313 r319 39 39 <permission value="View"/> 40 40 </action> 41 <action title=" delegate" action_id="localroles" category="object"41 <action title="Delegate" action_id="localroles" category="object" 42 42 condition_expr="" url_expr="string:${object_url}/folder_localrole_form" 43 43 visible="True"> -
WAeUP_SRP/trunk/profiles/default/types/Course.xml
r316 r319 48 48 <permission value="Modify portal content"/> 49 49 </action> 50 <action title=" delegate" action_id="localroles" category="object"50 <action title="Delegate" action_id="localroles" category="object" 51 51 condition_expr="" url_expr="string:${object_url}/folder_localrole_form" 52 52 visible="False"> -
WAeUP_SRP/trunk/profiles/default/types/CourseTicket.xml
r308 r319 45 45 <permission value="University Manage"/> 46 46 </action> 47 <action title=" delegate" action_id="localroles" category="object"47 <action title="Delegate" action_id="localroles" category="object" 48 48 condition_expr="" url_expr="string:${object_url}/folder_localrole_form" 49 49 visible="False"> -
WAeUP_SRP/trunk/profiles/default/types/CoursesFolder.xml
r311 r319 30 30 <permission value="View archived revisions"/> 31 31 </action> 32 <action title=" delegate" action_id="localroles" category="object"32 <action title="Delegate" action_id="localroles" category="object" 33 33 condition_expr="" url_expr="string:${object_url}/folder_localrole_form" 34 34 visible="False"/> -
WAeUP_SRP/trunk/profiles/default/types/Jamb.xml
r308 r319 38 38 condition_expr="" url_expr="string:${object_url}/waeup_edit_form" 39 39 visible="True"/> 40 <action title=" delegate" action_id="localroles" category="object"40 <action title="Delegate" action_id="localroles" category="object" 41 41 condition_expr="" url_expr="string:${object_url}/folder_localrole_form" 42 42 visible="False"> -
WAeUP_SRP/trunk/profiles/default/types/Semester.xml
r316 r319 50 50 <permission value="University Manage"/> 51 51 </action> 52 <action title=" delegate" action_id="localroles" category="object"52 <action title="Delegate" action_id="localroles" category="object" 53 53 condition_expr="" url_expr="string:${object_url}/folder_localrole_form" 54 54 visible="False"> -
WAeUP_SRP/trunk/profiles/default/types/Student.xml
r308 r319 48 48 <permission value="University Manage"/> 49 49 </action> 50 <action title=" delegate" action_id="localroles" category="object"50 <action title="Delegate" action_id="localroles" category="object" 51 51 condition_expr="" url_expr="string:${object_url}/folder_localrole_form" 52 52 visible="False"> -
WAeUP_SRP/trunk/profiles/default/types/StudentsFolder.xml
r308 r319 61 61 <permission value="Modify portal content"/> 62 62 </action> 63 <action title=" delegate" action_id="localroles" category="object"63 <action title="Delegate" action_id="localroles" category="object" 64 64 condition_expr="" url_expr="string:${object_url}/folder_localrole_form" 65 65 visible="True"> -
WAeUP_SRP/trunk/profiles/default/types/StudyLevel.xml
r308 r319 44 44 condition_expr="python:member and 'Manager' in member.getRoles()" 45 45 url_expr="string:${object_url}/cpsdocument_metadata" visible="False"/> 46 <action title=" delegate" action_id="localroles" category="object"46 <action title="Delegate" action_id="localroles" category="object" 47 47 condition_expr="" url_expr="string:${object_url}/folder_localrole_form" 48 48 visible="False"/> -
WAeUP_SRP/trunk/profiles/default/types/University.xml
r315 r319 64 64 <permission value="Modify portal content"/> 65 65 </action> 66 <action title=" delegate" action_id="localroles" category="object"66 <action title="Delegate" action_id="localroles" category="object" 67 67 condition_expr="" url_expr="string:${object_url}/folder_localrole_form" 68 68 visible="True"> -
WAeUP_SRP/trunk/skins/waeup_academics/department_created.py
r310 r319 21 21 else: 22 22 dep = context.getContent() 23 dep.invokeFactory('CoursesFolder',' Courses')23 dep.invokeFactory('CoursesFolder','courses') 24 24 o = getattr(dep,'Courses') 25 25 dict = {'Title': 'Courses'} 26 26 o.getContent().edit(mapping=dict) 27 dep.invokeFactory('CertificatesFolder',' Certificates')27 dep.invokeFactory('CertificatesFolder','certificates') 28 28 o = getattr(dep,'Certificates') 29 29 dict = {'Title': 'Certificates'}
Note: See TracChangeset for help on using the changeset viewer.