[45] | 1 | from Globals import InitializeClass |
---|
| 2 | from AccessControl import ClassSecurityInfo |
---|
| 3 | |
---|
| 4 | from Products.CMFCore.utils import getToolByName |
---|
| 5 | from Products.CMFCore.permissions import View |
---|
| 6 | from Products.CMFCore.permissions import ModifyPortalContent |
---|
| 7 | from Products.CPSCore.CPSBase import CPSBase_adder, CPSBaseFolder |
---|
| 8 | from Products.CPSCore.CPSBase import CPSBaseDocument as BaseDocument |
---|
| 9 | from Products.CPSCore.CPSBase import CPSBaseBTreeFolder as BaseBTreeFolder |
---|
| 10 | |
---|
| 11 | # |
---|
| 12 | # The StudentsFolder |
---|
| 13 | # |
---|
| 14 | class StudentsFolder(BaseBTreeFolder): |
---|
| 15 | """ |
---|
| 16 | WAeUP container for the various WAeUP containers data |
---|
| 17 | """ |
---|
| 18 | meta_type = 'Students Folder' |
---|
| 19 | portal_type = meta_type |
---|
| 20 | security = ClassSecurityInfo() |
---|
| 21 | |
---|
| 22 | InitializeClass(StudentsFolder) |
---|
| 23 | |
---|
| 24 | def addStudentsFolder(container, id, REQUEST=None, **kw): |
---|
| 25 | """Add a Student.""" |
---|
| 26 | print id |
---|
| 27 | ob = StudentsFolder(id, **kw) |
---|
| 28 | return CPSBase_adder(container, ob, REQUEST=REQUEST) |
---|
| 29 | ### |
---|
| 30 | ### The Student |
---|
| 31 | ### |
---|
| 32 | ##class Student(BaseDocument): |
---|
| 33 | ## """ |
---|
| 34 | ## WAeUP Student container for the various student data |
---|
| 35 | ## """ |
---|
| 36 | ## meta_type = 'Student' |
---|
| 37 | ## portal_type = meta_type |
---|
| 38 | ## security = ClassSecurityInfo() |
---|
| 39 | ## |
---|
| 40 | ##InitializeClass(Student) |
---|
| 41 | ## |
---|
| 42 | ##def addStudent(container, id, REQUEST=None, **kw): |
---|
| 43 | ## """Add a Student.""" |
---|
| 44 | ## print id |
---|
| 45 | ## ob = Student(id, **kw) |
---|
| 46 | ## return CPSBase_adder(container, ob, REQUEST=REQUEST) |
---|