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