1 | #-*- mode: python; mode: fold -*- |
---|
2 | # $Id: __init__.py 445 2006-08-29 16:50:07Z 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 | import PatchCatalogToolXMLAdapter |
---|
16 | |
---|
17 | import Products.WAeUP_SRP.WAeUPPermissions |
---|
18 | from Products.WAeUP_SRP.Academics import AcademicsFolder, addAcademicsFolder |
---|
19 | from Products.WAeUP_SRP.University import University, addUniversity |
---|
20 | from Products.WAeUP_SRP.Accommodation import AccoFolder, addAccoFolder |
---|
21 | from Products.WAeUP_SRP.Accommodation import Accommodation, addAccommodation |
---|
22 | from Products.WAeUP_SRP.Academics import Certificate, addCertificate |
---|
23 | from Products.WAeUP_SRP.Academics import CertificateCourse, addCertificateCourse |
---|
24 | from Products.WAeUP_SRP.Academics import Faculty, addFaculty |
---|
25 | from Products.WAeUP_SRP.Academics import Department, addDepartment |
---|
26 | from Products.WAeUP_SRP.Academics import Course, addCourse |
---|
27 | from Products.WAeUP_SRP.Academics import CourseTicket, addCourseTicket |
---|
28 | from Products.WAeUP_SRP.Academics import CertificateCourse, addCertificateCourse |
---|
29 | from Products.WAeUP_SRP.Students import StudentsFolder, addStudentsFolder |
---|
30 | from Products.WAeUP_SRP.Students import Student, addStudent |
---|
31 | from Products.WAeUP_SRP.Students import StudentStudyCourse, addStudentStudyCourse |
---|
32 | from Products.WAeUP_SRP.Students import StudentAdmission, addStudentAdmission |
---|
33 | from Products.WAeUP_SRP.Students import StudentClearance, addStudentClearance |
---|
34 | from Products.WAeUP_SRP.Students import StudentPersonal, addStudentPersonal |
---|
35 | from Products.WAeUP_SRP.Students import ScratchCardBatch, addScratchCardBatch |
---|
36 | from Products.WAeUP_SRP.Students import ScratchCardBatchesFolder, addScratchCardBatchesFolder |
---|
37 | from Products.WAeUP_SRP.Students import StudyLevel, addStudyLevel |
---|
38 | from Products.WAeUP_SRP.Students import Semester, addSemester |
---|
39 | |
---|
40 | |
---|
41 | import Widgets |
---|
42 | |
---|
43 | contentClasses = ( |
---|
44 | University, |
---|
45 | AcademicsFolder, |
---|
46 | Certificate, |
---|
47 | CertificateCourse, |
---|
48 | Faculty, |
---|
49 | Department, |
---|
50 | Course, |
---|
51 | CourseTicket, |
---|
52 | CertificateCourse, |
---|
53 | AccoFolder, |
---|
54 | Accommodation, |
---|
55 | StudentsFolder, |
---|
56 | Student, |
---|
57 | StudentStudyCourse, |
---|
58 | StudentAdmission, |
---|
59 | StudentClearance, |
---|
60 | StudentPersonal, |
---|
61 | ScratchCardBatch, |
---|
62 | ScratchCardBatchesFolder, |
---|
63 | StudyLevel, |
---|
64 | Semester, |
---|
65 | ) |
---|
66 | |
---|
67 | contentConstructors = ( |
---|
68 | addUniversity, |
---|
69 | addAcademicsFolder, |
---|
70 | addCertificate, |
---|
71 | addCertificateCourse, |
---|
72 | addFaculty, |
---|
73 | addDepartment, |
---|
74 | addCourse, |
---|
75 | addCourseTicket, |
---|
76 | addCertificateCourse, |
---|
77 | addAccoFolder, |
---|
78 | addAccommodation, |
---|
79 | addStudentsFolder, |
---|
80 | addStudent, |
---|
81 | addStudentStudyCourse, |
---|
82 | addStudentAdmission, |
---|
83 | addStudentClearance, |
---|
84 | addStudentPersonal, |
---|
85 | addScratchCardBatch, |
---|
86 | addScratchCardBatchesFolder, |
---|
87 | addStudyLevel, |
---|
88 | addSemester, |
---|
89 | ) |
---|
90 | |
---|
91 | fti = [{} for t in range(len(contentConstructors))] |
---|
92 | ##fti = ( |
---|
93 | ## {}, # University |
---|
94 | ## {}, #AcademicsFolder |
---|
95 | ## {}, #Certificate |
---|
96 | ## {}, #CertificateCourse |
---|
97 | ## {}, # Faculty |
---|
98 | ## {}, # Department |
---|
99 | ## {}, # Course |
---|
100 | ## {}, # CourseTicket |
---|
101 | ## {}, # CertificateCourse |
---|
102 | ## {}, # AccoFolder |
---|
103 | ## {}, # Accommodation |
---|
104 | ## {}, # StudentsFolder, |
---|
105 | ## {}, # Student, |
---|
106 | ## {}, # StudentStudyCourse, |
---|
107 | ## {}, # StudentAdmission, |
---|
108 | ## {}, # StudentClearance, |
---|
109 | ## {}, # StudentAdmission, |
---|
110 | ## {}, # StudentClearance, |
---|
111 | ## {}, # StudentPersonal, |
---|
112 | ## {}, # ScratchCardBatch, |
---|
113 | ## {}, # ScratchCardBatchesFolder, |
---|
114 | ## {}, # StudyLevel, |
---|
115 | ## {}, # Semester, |
---|
116 | ## ) |
---|
117 | |
---|
118 | registerDirectory('skins', globals()) |
---|
119 | |
---|
120 | def initialize(registrar): |
---|
121 | ContentInit('WAeUP Types', |
---|
122 | content_types = contentClasses, |
---|
123 | permission = AddPortalContent, |
---|
124 | extra_constructors = contentConstructors, |
---|
125 | fti = fti, |
---|
126 | ).initialize(registrar) |
---|
127 | |
---|
128 | # Extension profile registration |
---|
129 | profile_registry.registerProfile( |
---|
130 | 'default', |
---|
131 | 'WAeUP_SRP', |
---|
132 | "The WestAfrican e-University Project", |
---|
133 | 'profiles/default', |
---|
134 | 'WAeUP_SRP', |
---|
135 | EXTENSION, |
---|
136 | for_=ICPSSite) |
---|
137 | |
---|