1 | #-*- mode: python; mode: fold -*- |
---|
2 | # $Id: __init__.py 361 2006-07-30 06:12:00Z 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 StudentsFolder, addStudentsFolder |
---|
29 | from Products.WAeUP_SRP.Students import Student, addStudent |
---|
30 | from Products.WAeUP_SRP.Students import StudentPersonal, addStudentPersonal |
---|
31 | from Products.WAeUP_SRP.Students import StudentEligibility, addStudentEligibility |
---|
32 | from Products.WAeUP_SRP.Students import StudentDocuments, addStudentDocuments |
---|
33 | from Products.WAeUP_SRP.Students import Jamb, addJamb |
---|
34 | from Products.WAeUP_SRP.Students import StudyLevel, addStudyLevel |
---|
35 | from Products.WAeUP_SRP.Students import Semester, addSemester |
---|
36 | |
---|
37 | |
---|
38 | import Widgets |
---|
39 | |
---|
40 | contentClasses = ( |
---|
41 | University, |
---|
42 | AcademicsFolder, |
---|
43 | Certificate, |
---|
44 | CertificateCourse, |
---|
45 | Faculty, |
---|
46 | Department, |
---|
47 | Course, |
---|
48 | CourseTicket, |
---|
49 | CertificateCourse, |
---|
50 | AccoFolder, |
---|
51 | Accommodation, |
---|
52 | StudentsFolder, |
---|
53 | Student, |
---|
54 | StudentPersonal, |
---|
55 | StudentEligibility, |
---|
56 | StudentDocuments, |
---|
57 | Jamb, |
---|
58 | StudyLevel, |
---|
59 | Semester, |
---|
60 | ) |
---|
61 | |
---|
62 | contentConstructors = ( |
---|
63 | addUniversity, |
---|
64 | addAcademicsFolder, |
---|
65 | addCertificate, |
---|
66 | addCertificateCourse, |
---|
67 | addFaculty, |
---|
68 | addDepartment, |
---|
69 | addCourse, |
---|
70 | addCourseTicket, |
---|
71 | addCertificateCourse, |
---|
72 | addAccoFolder, |
---|
73 | addAccommodation, |
---|
74 | addStudentsFolder, |
---|
75 | addStudent, |
---|
76 | addStudentPersonal, |
---|
77 | addStudentEligibility, |
---|
78 | addStudentDocuments, |
---|
79 | addJamb, |
---|
80 | addStudyLevel, |
---|
81 | addSemester, |
---|
82 | ) |
---|
83 | |
---|
84 | fti = ( |
---|
85 | {}, # University |
---|
86 | {}, #AcademicsFolder |
---|
87 | {}, #Certificate |
---|
88 | {}, #CertificateCourse |
---|
89 | {}, # Faculty |
---|
90 | {}, # Department |
---|
91 | {}, # Course |
---|
92 | {}, # CourseTicket |
---|
93 | {}, # CertificateCourse |
---|
94 | {}, # AccoFolder |
---|
95 | {}, # Accommodation |
---|
96 | {}, # StudentsFolder, |
---|
97 | {}, # Student, |
---|
98 | {}, # StudentPersonal, |
---|
99 | {}, # StudentEligibility, |
---|
100 | {}, # StudentDocuments, |
---|
101 | {}, # Jamb, |
---|
102 | {}, # StudyLevel, |
---|
103 | {}, # Semester, |
---|
104 | ) |
---|
105 | |
---|
106 | registerDirectory('skins', globals()) |
---|
107 | |
---|
108 | def initialize(registrar): |
---|
109 | ContentInit('WAeUP Types', |
---|
110 | content_types = contentClasses, |
---|
111 | permission = AddPortalContent, |
---|
112 | extra_constructors = contentConstructors, |
---|
113 | fti = fti, |
---|
114 | ).initialize(registrar) |
---|
115 | |
---|
116 | # Extension profile registration |
---|
117 | profile_registry.registerProfile( |
---|
118 | 'default', |
---|
119 | 'WAeUP_SRP', |
---|
120 | "The WestAfrican e-University Project", |
---|
121 | 'profiles/default', |
---|
122 | 'WAeUP_SRP', |
---|
123 | EXTENSION, |
---|
124 | for_=ICPSSite) |
---|
125 | |
---|