Changeset 7819 for main/waeup.kofa/trunk/src/waeup/kofa/university
- Timestamp:
- 8 Mar 2012, 22:28:46 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/university
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/university/certificate.py
r7811 r7819 16 16 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 17 ## 18 """K OFAcertificates18 """Kofa certificates 19 19 """ 20 20 import grok -
main/waeup.kofa/trunk/src/waeup/kofa/university/certificate.txt
r7811 r7819 1 :mod:`waeup.kofa.university.certificate` -- Certificates for K OFA1 :mod:`waeup.kofa.university.certificate` -- Certificates for Kofa 2 2 ****************************************************************** 3 3 … … 7 7 8 8 .. :doctest: 9 .. :layer: waeup.kofa.testing.K OFAUnitTestLayer9 .. :layer: waeup.kofa.testing.KofaUnitTestLayer 10 10 11 11 -
main/waeup.kofa/trunk/src/waeup/kofa/university/certificatescontainer.txt
r7811 r7819 7 7 8 8 .. :doctest: 9 .. :layer: waeup.kofa.testing.K OFAUnitTestLayer9 .. :layer: waeup.kofa.testing.KofaUnitTestLayer 10 10 11 11 -
main/waeup.kofa/trunk/src/waeup/kofa/university/course.txt
r7811 r7819 7 7 8 8 .. :doctest: 9 .. :layer: waeup.kofa.testing.K OFAUnitTestLayer9 .. :layer: waeup.kofa.testing.KofaUnitTestLayer 10 10 11 11 Content Classes (models and containers) -
main/waeup.kofa/trunk/src/waeup/kofa/university/coursescontainer.txt
r7811 r7819 7 7 8 8 .. :doctest: 9 .. :layer: waeup.kofa.testing.K OFAUnitTestLayer9 .. :layer: waeup.kofa.testing.KofaUnitTestLayer 10 10 11 11 -
main/waeup.kofa/trunk/src/waeup/kofa/university/department.py
r7811 r7819 24 24 from waeup.kofa.university.coursescontainer import CoursesContainer 25 25 from waeup.kofa.university.certificatescontainer import CertificatesContainer 26 from waeup.kofa.interfaces import IK OFAUtils26 from waeup.kofa.interfaces import IKofaUtils 27 27 from waeup.kofa.university.interfaces import IDepartment, IDepartmentAdd 28 28 … … 73 73 74 74 def longtitle(self): 75 insttypes_dict = getUtility(IK OFAUtils).getInstTypeDict()75 insttypes_dict = getUtility(IKofaUtils).getInstTypeDict() 76 76 return "%s %s (%s)" % ( 77 77 insttypes_dict[self.title_prefix], -
main/waeup.kofa/trunk/src/waeup/kofa/university/department.txt
r7811 r7819 7 7 8 8 .. :doctest: 9 .. :layer: waeup.kofa.testing.K OFAUnitTestLayer9 .. :layer: waeup.kofa.testing.KofaUnitTestLayer 10 10 11 11 Content Classes (models and containers) -
main/waeup.kofa/trunk/src/waeup/kofa/university/facultiescontainer.py
r7811 r7819 19 19 from zope.component.interfaces import IFactory 20 20 from zope.interface import implementedBy 21 from waeup.kofa.interfaces import IK OFAPluggable21 from waeup.kofa.interfaces import IKofaPluggable 22 22 from waeup.kofa.university.interfaces import IFacultiesContainer, IFaculty 23 23 … … 52 52 """A plugin that creates container for faculties inside a university. 53 53 """ 54 grok.implements(IK OFAPluggable)54 grok.implements(IKofaPluggable) 55 55 grok.name('faculties') 56 56 57 57 def setup(self, site, name, logger): 58 58 if 'faculties' in site.keys(): 59 logger.warn('Could not create container for faculties in K OFA.')59 logger.warn('Could not create container for faculties in Kofa.') 60 60 return 61 61 site['faculties'] = FacultiesContainer() -
main/waeup.kofa/trunk/src/waeup/kofa/university/facultiescontainer.txt
r7811 r7819 7 7 8 8 .. :doctest: 9 .. :layer: waeup.kofa.testing.K OFAUnitTestLayer9 .. :layer: waeup.kofa.testing.KofaUnitTestLayer 10 10 11 11 … … 77 77 .. class:: AcademicsPlugin() 78 78 79 .. attribute:: grok.implements(IK OFAPluggable)79 .. attribute:: grok.implements(IKofaPluggable) 80 80 81 81 This plugin component tells under which name (``faculties``) an 82 instance of academics stuff should be created in plain K OFA82 instance of academics stuff should be created in plain Kofa 83 83 instances. It also tells the factory name for FacultiesContainer 84 instances, which serve as root object for academics stuff in K OFAapps.84 instances, which serve as root object for academics stuff in Kofa apps. 85 85 86 86 -
main/waeup.kofa/trunk/src/waeup/kofa/university/faculty.py
r7811 r7819 23 23 from zope.interface import implementedBy 24 24 from zope.component import getUtility 25 from waeup.kofa.interfaces import IK OFAUtils25 from waeup.kofa.interfaces import IKofaUtils 26 26 from waeup.kofa.university.interfaces import ( 27 27 IFaculty, IFacultyAdd, IDepartment) … … 61 61 62 62 def longtitle(self): 63 insttypes_dict = getUtility(IK OFAUtils).getInstTypeDict()63 insttypes_dict = getUtility(IKofaUtils).getInstTypeDict() 64 64 result = "%s %s (%s)" % ( 65 65 insttypes_dict[self.title_prefix], -
main/waeup.kofa/trunk/src/waeup/kofa/university/faculty.txt
r7811 r7819 7 7 8 8 .. :doctest: 9 .. :layer: waeup.kofa.testing.K OFAUnitTestLayer9 .. :layer: waeup.kofa.testing.KofaUnitTestLayer 10 10 11 11 -
main/waeup.kofa/trunk/src/waeup/kofa/university/interfaces.py
r7811 r7819 21 21 from zope import schema 22 22 from zope.interface import Attribute 23 from waeup.kofa.interfaces import (IK OFAObject, IKOFAContainer)23 from waeup.kofa.interfaces import (IKofaObject, IKofaContainer) 24 24 from waeup.kofa.interfaces import MessageFactory as _ 25 25 from waeup.kofa.university.vocabularies import ( … … 32 32 ) 33 33 34 class IFaculty(IK OFAContainer):34 class IFaculty(IKofaContainer): 35 35 """Representation of a university faculty. 36 36 """ … … 73 73 IFacultyAdd['code'].order = IFaculty['code'].order 74 74 75 class IFacultiesContainer(IK OFAContainer):75 class IFacultiesContainer(IKofaContainer): 76 76 """A container for faculties. 77 77 """ … … 80 80 81 81 """ 82 class IDepartment(IK OFAObject):82 class IDepartment(IKofaObject): 83 83 """Representation of a department. 84 84 """ … … 124 124 IDepartmentAdd['code'].order = IDepartment['code'].order 125 125 126 class ICoursesContainer(IK OFAContainer):126 class ICoursesContainer(IKofaContainer): 127 127 """A container for faculties. 128 128 """ … … 133 133 """ 134 134 135 class ICourse(IK OFAObject):135 class ICourse(IKofaObject): 136 136 """Representation of a course. 137 137 """ … … 186 186 ICourseAdd['code'].order = ICourse['code'].order 187 187 188 class ICertificate(IK OFAObject):188 class ICertificate(IKofaObject): 189 189 """Representation of a certificate. 190 190 """ … … 248 248 ICertificateAdd['code'].order = ICertificate['code'].order 249 249 250 class ICertificatesContainer(IK OFAContainer):250 class ICertificatesContainer(IKofaContainer): 251 251 """A container for certificates. 252 252 """ … … 257 257 """ 258 258 259 class ICertificateCourse(IK OFAObject):259 class ICertificateCourse(IKofaObject): 260 260 """A certificatecourse is referring a course and provides some own 261 261 attributes. -
main/waeup.kofa/trunk/src/waeup/kofa/university/tests/test_export.py
r7811 r7819 23 23 from zope.interface.verify import verifyObject, verifyClass 24 24 from waeup.kofa.interfaces import ICSVExporter 25 from waeup.kofa.testing import K OFAUnitTestLayer25 from waeup.kofa.testing import KofaUnitTestLayer 26 26 from waeup.kofa.university import ( 27 27 FacultiesContainer, Faculty, Department, Course, Certificate, … … 34 34 class FacultyExporterTest(unittest.TestCase): 35 35 36 layer = K OFAUnitTestLayer36 layer = KofaUnitTestLayer 37 37 38 38 def setUp(self): … … 123 123 # Tests for DepartmentExporter 124 124 125 layer = K OFAUnitTestLayer125 layer = KofaUnitTestLayer 126 126 127 127 def setUp(self): … … 214 214 # Tests for CourseExporter 215 215 216 layer = K OFAUnitTestLayer216 layer = KofaUnitTestLayer 217 217 218 218 def setUp(self): … … 307 307 # Tests for CertificateExporter 308 308 309 layer = K OFAUnitTestLayer309 layer = KofaUnitTestLayer 310 310 311 311 def setUp(self): … … 412 412 # Tests for CertificateCourseExporter 413 413 414 layer = K OFAUnitTestLayer414 layer = KofaUnitTestLayer 415 415 416 416 def setUp(self): -
main/waeup.kofa/trunk/src/waeup/kofa/university/tests/test_facultiescontainer.py
r7811 r7819 90 90 self.assertEqual( 91 91 self._logger_factory.get_messages(), 92 'Could not create container for faculties in K OFA.\n'92 'Could not create container for faculties in Kofa.\n' 93 93 ) 94 94 -
main/waeup.kofa/trunk/src/waeup/kofa/university/vocabularies.py
r7811 r7819 22 22 from zope.catalog.interfaces import ICatalog 23 23 from zope.component import getUtility 24 from waeup.kofa.interfaces import SimpleK OFAVocabulary, IKOFAUtils24 from waeup.kofa.interfaces import SimpleKofaVocabulary, IKofaUtils 25 25 from waeup.kofa.interfaces import MessageFactory as _ 26 26 27 course_levels = SimpleK OFAVocabulary(27 course_levels = SimpleKofaVocabulary( 28 28 (_('Pre-Studies'),10), 29 29 (_('100 (Year 1)'),100), … … 41 41 """ 42 42 def getValues(self, context): 43 semesters_dict = getUtility(IK OFAUtils).getSemesterDict()43 semesters_dict = getUtility(IKofaUtils).getSemesterDict() 44 44 return semesters_dict.keys() 45 45 … … 48 48 49 49 def getTitle(self, context, value): 50 semesters_dict = getUtility(IK OFAUtils).getSemesterDict()50 semesters_dict = getUtility(IKofaUtils).getSemesterDict() 51 51 return semesters_dict[value] 52 52 … … 56 56 """ 57 57 def getValues(self, context): 58 insttypes_dict = getUtility(IK OFAUtils).getInstTypeDict()58 insttypes_dict = getUtility(IKofaUtils).getInstTypeDict() 59 59 return sorted(insttypes_dict.keys()) 60 60 … … 63 63 64 64 def getTitle(self, context, value): 65 insttypes_dict = getUtility(IK OFAUtils).getInstTypeDict()65 insttypes_dict = getUtility(IKofaUtils).getInstTypeDict() 66 66 return insttypes_dict[value] 67 67 … … 71 71 """ 72 72 def getValues(self, context): 73 appcats_dict = getUtility(IK OFAUtils).getAppCatDict()73 appcats_dict = getUtility(IKofaUtils).getAppCatDict() 74 74 return sorted(appcats_dict.keys()) 75 75 … … 78 78 79 79 def getTitle(self, context, value): 80 appcats_dict = getUtility(IK OFAUtils).getAppCatDict()80 appcats_dict = getUtility(IKofaUtils).getAppCatDict() 81 81 return appcats_dict[value] 82 82 … … 86 86 """ 87 87 def getValues(self, context): 88 studymodes_dict = getUtility(IK OFAUtils).getStudyModesDict()88 studymodes_dict = getUtility(IKofaUtils).getStudyModesDict() 89 89 return sorted(studymodes_dict.keys()) 90 90 … … 93 93 94 94 def getTitle(self, context, value): 95 studymodes_dict = getUtility(IK OFAUtils).getStudyModesDict()95 studymodes_dict = getUtility(IKofaUtils).getStudyModesDict() 96 96 return studymodes_dict[value] 97 97
Note: See TracChangeset for help on using the changeset viewer.