| 1 | #-*- mode: python; mode: fold -*- |
|---|
| 2 | # $Id: __init__.py 279 2006-06-29 06:38:51Z joachim $ |
|---|
| 3 | from Products.CMFCore.utils import ContentInit, ToolInit |
|---|
| 4 | from Products.CMFCore.DirectoryView import registerDirectory |
|---|
| 5 | from Products.CMFCore import utils as cmfutils |
|---|
| 6 | from Products.CMFCore.CMFCorePermissions import AddPortalContent |
|---|
| 7 | |
|---|
| 8 | from Products.GenericSetup import profile_registry |
|---|
| 9 | from Products.GenericSetup import EXTENSION |
|---|
| 10 | |
|---|
| 11 | from Products.CPSCore.interfaces import ICPSSite |
|---|
| 12 | |
|---|
| 13 | # Only for CPS 3.4.1. In 3.4.2 and later this should be fixed. |
|---|
| 14 | import PatchCPSDefaultImportExport |
|---|
| 15 | |
|---|
| 16 | import Products.WAeUP_SRP.WAeUPPermissions |
|---|
| 17 | from Products.WAeUP_SRP.Academics import AcademicsFolder, addAcademicsFolder |
|---|
| 18 | from Products.WAeUP_SRP.University import University, addUniversity |
|---|
| 19 | from Products.WAeUP_SRP.Accommodation import AccoFolder, addAccoFolder |
|---|
| 20 | from Products.WAeUP_SRP.Accommodation import Accommodation, addAccommodation |
|---|
| 21 | from Products.WAeUP_SRP.Academics import Certificate, addCertificate |
|---|
| 22 | from Products.WAeUP_SRP.Academics import CertificateCourse, addCertificateCourse |
|---|
| 23 | from Products.WAeUP_SRP.Academics import Faculty, addFaculty |
|---|
| 24 | from Products.WAeUP_SRP.Academics import Department, addDepartment |
|---|
| 25 | from Products.WAeUP_SRP.Academics import Course, addCourse |
|---|
| 26 | from Products.WAeUP_SRP.Academics import CourseTicket, addCourseTicket |
|---|
| 27 | from Products.WAeUP_SRP.Academics import CertificateCourse, addCertificateCourse |
|---|
| 28 | from Products.WAeUP_SRP.Students import Student, addStudent |
|---|
| 29 | from Products.WAeUP_SRP.Students import StudentPersonal, addStudentPersonal |
|---|
| 30 | from Products.WAeUP_SRP.Students import StudentEligibility, addStudentEligibility |
|---|
| 31 | from Products.WAeUP_SRP.Students import StudentDocuments, addStudentDocuments |
|---|
| 32 | from Products.WAeUP_SRP.Students import Jamb, addJamb |
|---|
| 33 | from Products.WAeUP_SRP.Students import StudyLevel, addStudyLevel |
|---|
| 34 | from Products.WAeUP_SRP.Students import Semester, addSemester |
|---|
| 35 | |
|---|
| 36 | |
|---|
| 37 | import Widgets |
|---|
| 38 | |
|---|
| 39 | contentClasses = ( |
|---|
| 40 | University, |
|---|
| 41 | AcademicsFolder, |
|---|
| 42 | Certificate, |
|---|
| 43 | CertificateCourse, |
|---|
| 44 | Faculty, |
|---|
| 45 | Department, |
|---|
| 46 | Course, |
|---|
| 47 | CourseTicket, |
|---|
| 48 | CertificateCourse, |
|---|
| 49 | AccoFolder, |
|---|
| 50 | Accommodation, |
|---|
| 51 | Student, |
|---|
| 52 | StudentPersonal, |
|---|
| 53 | StudentEligibility, |
|---|
| 54 | StudentDocuments, |
|---|
| 55 | Jamb, |
|---|
| 56 | StudyLevel, |
|---|
| 57 | Semester, |
|---|
| 58 | ) |
|---|
| 59 | |
|---|
| 60 | contentConstructors = ( |
|---|
| 61 | addUniversity, |
|---|
| 62 | addAcademicsFolder, |
|---|
| 63 | addCertificate, |
|---|
| 64 | addCertificateCourse, |
|---|
| 65 | addFaculty, |
|---|
| 66 | addDepartment, |
|---|
| 67 | addCourse, |
|---|
| 68 | addCourseTicket, |
|---|
| 69 | addCertificateCourse, |
|---|
| 70 | addAccoFolder, |
|---|
| 71 | addAccommodation, |
|---|
| 72 | addStudent, |
|---|
| 73 | addStudentPersonal, |
|---|
| 74 | addStudentEligibility, |
|---|
| 75 | addStudentDocuments, |
|---|
| 76 | addJamb, |
|---|
| 77 | addStudyLevel, |
|---|
| 78 | addSemester, |
|---|
| 79 | ) |
|---|
| 80 | |
|---|
| 81 | fti = ( |
|---|
| 82 | {}, # University |
|---|
| 83 | {}, #AcademicsFolder |
|---|
| 84 | {}, #Certificate |
|---|
| 85 | {}, #CertificateCourse |
|---|
| 86 | {}, # Faculty |
|---|
| 87 | {}, # Department |
|---|
| 88 | {}, # Course |
|---|
| 89 | {}, # CourseTicket |
|---|
| 90 | {}, # CertificateCourse |
|---|
| 91 | {}, # AccoFolder |
|---|
| 92 | {}, # Accommodation |
|---|
| 93 | {}, # Student, |
|---|
| 94 | {}, # StudentPersonal, |
|---|
| 95 | {}, # StudentEligibility, |
|---|
| 96 | {}, # StudentDocuments, |
|---|
| 97 | {}, # Jamb, |
|---|
| 98 | {}, # StudyLevel, |
|---|
| 99 | {}, # Semester, |
|---|
| 100 | ) |
|---|
| 101 | |
|---|
| 102 | registerDirectory('skins', globals()) |
|---|
| 103 | |
|---|
| 104 | def initialize(registrar): |
|---|
| 105 | ContentInit('WAeUP Types', |
|---|
| 106 | content_types = contentClasses, |
|---|
| 107 | permission = AddPortalContent, |
|---|
| 108 | extra_constructors = contentConstructors, |
|---|
| 109 | fti = fti, |
|---|
| 110 | ).initialize(registrar) |
|---|
| 111 | |
|---|
| 112 | # Extension profile registration |
|---|
| 113 | profile_registry.registerProfile( |
|---|
| 114 | 'default', |
|---|
| 115 | 'WAeUP_SRP', |
|---|
| 116 | "The WestAfrican e-University Project", |
|---|
| 117 | 'profiles/default', |
|---|
| 118 | 'WAeUP_SRP', |
|---|
| 119 | EXTENSION, |
|---|
| 120 | for_=ICPSSite) |
|---|
| 121 | |
|---|