Changeset 153 for waeup_product
- Timestamp:
- 4 Nov 2005, 17:29:06 (19 years ago)
- Location:
- waeup_product/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
waeup_product/trunk/Students.py
r152 r153 53 53 def Title(self): 54 54 """compose title""" 55 55 reg_nr = self.getId()[1:] 56 56 data = getattr(self,'PERSONAL',None) 57 57 if data is None: … … 61 61 return "%s %s" % (content.firstname,content.lastname) 62 62 return self.title 63 64 InitializeClass(Student) 65 66 def addStudent(container, id, REQUEST=None, **kw): 67 """Add a Student.""" 68 ob = Student(id, **kw) 69 return CPSBase_adder(container, ob, REQUEST=REQUEST) 70 71 ###) 72 73 studentpersonal_fti = { ###( 74 'title': 'WAeUP StudentPersonal', 75 'description': '', 76 'content_icon': 'student.gif', 77 'content_meta_type': 'StudentPersonal', 78 'factory': 'addStudent', 79 'immediate_view': 'student_personal_index_html', 80 'global_allow': True, 81 'filter_content_types': True, 82 'allowed_content_types': (), 83 'allow_discussion': False, 84 } 85 86 ###) 87 88 class StudentPersonal(CPSDocument): ###( 89 """ 90 WAeUP Student container for the various student data 91 """ 92 meta_type = 'StudentPersonal' 93 portal_type = meta_type 94 security = ClassSecurityInfo() 95 96 security.declareProtected(View,"Title") 97 def Title(self): 98 """compose title""" 99 content = self.getContent() 100 return "Personal Data for %s %s" % (content.firstname,content.lastname) 101 102 103 InitializeClass(StudentPersonal) 104 105 def addStudentPersonal(container, id, REQUEST=None, **kw): 106 """Add a Students personal data.""" 107 ob = StudentPersonal(id, **kw) 108 return CPSBase_adder(container, ob, REQUEST=REQUEST) 109 110 ###) 111 112 jamb_fti = { ###( 113 'title': 'WAeUP Jamb', 114 'description': '', 115 'content_icon': '', 116 'content_meta_type': 'Jamb', 117 'factory': 'addJamb', 118 'immediate_view': 'cpsdocument_view', 119 'global_allow': True, 120 'filter_content_types': True, 121 'allowed_content_types': ('Course',), 122 'allow_discussion': False, 123 } 124 ###) 125 126 class Jamb(CPSDocument): ###( 127 """ 128 WAeUP Jamb containing the courses and students 129 """ 130 meta_type = 'Jamb' 131 portal_type = meta_type 132 security = ClassSecurityInfo() 133 134 security.declareProtected(View,"Title") 135 def Title(self): 136 """compose title""" 137 content = self.getContent() 138 return "JAMB Data for %s %s" % (content.firstname,content.lastname) 63 139 64 140 security.declareProtected(View,"setOwnership") … … 68 144 member = pm.getMemberById(member_id) 69 145 self.changeOwnership(member) 70 71 InitializeClass(Student)72 73 def addStudent(container, id, REQUEST=None, **kw):74 """Add a Student."""75 ob = Student(id, **kw)76 return CPSBase_adder(container, ob, REQUEST=REQUEST)77 78 ###)79 80 studentpersonal_fti = { ###(81 'title': 'WAeUP StudentPersonal',82 'description': '',83 'content_icon': 'student.gif',84 'content_meta_type': 'StudentPersonal',85 'factory': 'addStudent',86 'immediate_view': 'student_personal_index_html',87 'global_allow': True,88 'filter_content_types': True,89 'allowed_content_types': (),90 'allow_discussion': False,91 }92 93 ###)94 95 class StudentPersonal(CPSDocument): ###(96 """97 WAeUP Student container for the various student data98 """99 meta_type = 'StudentPersonal'100 portal_type = meta_type101 security = ClassSecurityInfo()102 103 security.declareProtected(View,"Title")104 def Title(self):105 """compose title"""106 content = self.getContent()107 return "Personal Data for %s %s" % (content.firstname,content.lastname)108 109 110 InitializeClass(StudentPersonal)111 112 def addStudentPersonal(container, id, REQUEST=None, **kw):113 """Add a Students personal data."""114 ob = StudentPersonal(id, **kw)115 return CPSBase_adder(container, ob, REQUEST=REQUEST)116 117 ###)118 119 jamb_fti = { ###(120 'title': 'WAeUP Jamb',121 'description': '',122 'content_icon': '',123 'content_meta_type': 'Jamb',124 'factory': 'addJamb',125 'immediate_view': 'cpsdocument_view',126 'global_allow': True,127 'filter_content_types': True,128 'allowed_content_types': ('Course',),129 'allow_discussion': False,130 }131 ###)132 133 class Jamb(CPSDocument): ###(134 """135 WAeUP Jamb containing the courses and students136 """137 meta_type = 'Jamb'138 portal_type = meta_type139 security = ClassSecurityInfo()140 141 security.declareProtected(View,"Title")142 def Title(self):143 """compose title"""144 content = self.getContent()145 return "JAMB Data for %s %s" % (content.firstname,content.lastname)146 147 security.declareProtected(View,"setOwnership")148 def setOwnership(self,member_id):149 """set ownership"""150 pm = getattr(self,'portal_membership')151 member = pm.getMemberById(member_id)152 self.changeOwnership(member)153 146 154 147 InitializeClass(Jamb) -
waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py
r152 r153 221 221 'action': 'temporary_view_all', 222 222 'condition': '', 223 'permission': ( View,),223 'permission': (StudentManage,UniversityManage), 224 224 'category': 'object', 225 225 'visible': True,}, -
waeup_product/trunk/skins/waeup_default/getWAeUPVocabularies.py
r136 r153 1 #-*- mode: python; mode: fold -*- 1 2 ##parameters= 2 3 # $Id$ … … 12 13 vocabularies = {} 13 14 14 nigerian_states _voc = {15 nigerian_states = { ###( 15 16 'type': 'CPS Vocabulary', 16 17 'data': {'tuples': ( … … 54 55 )}, 55 56 } 56 vocabularies['nigerian_states'] = nigerian_states_voc 57 vocabularies['nigerian_states'] = nigerian_states 58 ###) 57 59 58 faculties _voc = {60 faculties = { ###( 59 61 'type': 'CPS Vocabulary', 60 62 'data': {'tuples': ( … … 72 74 )}, 73 75 } 74 vocabularies['faculties'] = faculties_voc 75 level_voc = { 76 vocabularies['faculties'] = faculties 77 ###) 78 79 level = { ###( 76 80 'type': 'CPS Vocabulary', 77 81 'data': {'tuples': ( … … 82 86 )}, 83 87 } 84 vocabularies['courselevel'] = level_voc 88 vocabularies['courselevel'] = level 89 90 ###) 85 91 86 92 vocabularies['range5'] = {'type': 'CPS Vocabulary',
Note: See TracChangeset for help on using the changeset viewer.