atapi.LinesField('categories', storage=atapi.AnnotationStorage(), widget=atapi.LinesWidget(label=_(u"Categories"), description=_(u"One category on each line. Used for grouping courses. <br /> " u"CAUTION: ONCE YOU ADD A NEW CATEGORY, YOU DON'T MODIFY OR DELETE THIS, ONLY YOU CAN ADD NEW CATEGORY"), rows=6, ), ), )) CourseFolderSchema['title'].storage = atapi.AnnotationStorage() CourseFolderSchema['description'].storage = atapi.AnnotationStorage() finalizeATCTSchema(CourseFolderSchema, folderish=True, moveDiscussion=False) hideMetadataSchema(CourseFolderSchema, excludeFromNav=True) class CourseFolder(folder.ATBTreeFolder): """Contains multiple courses. """ implements(ICourseFolder) portal_type = "Course Folder" _at_rename_after_creation = True schema = CourseFolderSchema title = atapi.ATFieldProperty('title') description = atapi.ATFieldProperty('description') categories = atapi.ATFieldProperty('categories') atapi.registerType(CourseFolder, PROJECTNAME)
from Products.ATContentTypes.content import folder from Products.ATContentTypes.content.schemata import finalizeATCTSchema from eduintelligent.courses.interfaces import ILessons from eduintelligent.courses.config import PROJECTNAME from eduintelligent.courses.utility import hideMetadataSchema from eduintelligent.courses import coursesMessageFactory as _ LessonsSchema = folder.ATBTreeFolderSchema.copy() LessonsSchema['title'].storage = atapi.AnnotationStorage() LessonsSchema['description'].storage = atapi.AnnotationStorage() finalizeATCTSchema(LessonsSchema, folderish=True, moveDiscussion=False) hideMetadataSchema(LessonsSchema, excludeFromNav=True) class Lessons(folder.ATBTreeFolder): """Contains multiple lessons. """ implements(ILessons) portal_type = "Lessons" _at_rename_after_creation = True schema = LessonsSchema title = atapi.ATFieldProperty('title') description = atapi.ATFieldProperty('description') atapi.registerType(Lessons, PROJECTNAME)
from Products.ATContentTypes.content import folder from Products.ATContentTypes.content.schemata import finalizeATCTSchema from eduintelligent.courses.interfaces import IResources from eduintelligent.courses.config import PROJECTNAME from eduintelligent.courses.utility import hideMetadataSchema from eduintelligent.courses import coursesMessageFactory as _ CourseContentSchema = folder.ATFolderSchema.copy() CourseContentSchema['title'].storage = atapi.AnnotationStorage() CourseContentSchema['description'].storage = atapi.AnnotationStorage() finalizeATCTSchema(CourseContentSchema, folderish=True, moveDiscussion=False) hideMetadataSchema(CourseContentSchema, excludeFromNav=True) class Resources(folder.ATFolder): """Contains multiple lessons. """ implements(IResources) portal_type = "CourseContent" _at_rename_after_creation = True schema = CourseContentSchema title = atapi.ATFieldProperty('title') description = atapi.ATFieldProperty('description') atapi.registerType(Resources, PROJECTNAME)
from Products.ATContentTypes.content import folder from Products.ATContentTypes.content.schemata import finalizeATCTSchema from eduintelligent.courses.interfaces import ICourseContent from eduintelligent.courses.config import PROJECTNAME from eduintelligent.courses.utility import hideMetadataSchema from eduintelligent.courses import coursesMessageFactory as _ CourseContentSchema = folder.ATFolderSchema.copy() CourseContentSchema['title'].storage = atapi.AnnotationStorage() CourseContentSchema['description'].storage = atapi.AnnotationStorage() finalizeATCTSchema(CourseContentSchema, folderish=True, moveDiscussion=False) hideMetadataSchema(CourseContentSchema, excludeFromNav=True) class CourseContent(folder.ATFolder): """Contains multiple lessons. """ implements(ICourseContent) portal_type = "CourseContent" _at_rename_after_creation = True schema = CourseContentSchema title = atapi.ATFieldProperty('title') description = atapi.ATFieldProperty('description')
storage=atapi.AnnotationStorage(), widget=atapi.LinesWidget( label=_(u"Categories"), description=_( u"One category on each line. Used for grouping courses. <br /> " u"CAUTION: ONCE YOU ADD A NEW CATEGORY, YOU DON'T MODIFY OR DELETE THIS, ONLY YOU CAN ADD NEW CATEGORY" ), rows=6, ), ), )) CourseFolderSchema['title'].storage = atapi.AnnotationStorage() CourseFolderSchema['description'].storage = atapi.AnnotationStorage() finalizeATCTSchema(CourseFolderSchema, folderish=True, moveDiscussion=False) hideMetadataSchema(CourseFolderSchema, excludeFromNav=True) class CourseFolder(folder.ATBTreeFolder): """Contains multiple courses. """ implements(ICourseFolder) portal_type = "Course Folder" _at_rename_after_creation = True schema = CourseFolderSchema title = atapi.ATFieldProperty('title') description = atapi.ATFieldProperty('description') categories = atapi.ATFieldProperty('categories')