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