Changeset 440
- Timestamp:
- 29 Aug 2006, 11:56:53 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 6 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Academics.py
r398 r440 39 39 portal_type = meta_type 40 40 security = ClassSecurityInfo() 41 use_catalog_for_folder_contents = True 41 42 42 43 security.declareProtected(View,"Title") -
WAeUP_SRP/trunk/Students.py
r435 r440 33 33 portal_type = meta_type 34 34 security = ClassSecurityInfo() 35 use_catalog_for_folder_contents = True36 35 37 36 security.declareProtected(ModifyPortalContent,"loadFullTimeStudentsFromCSV")###( … … 470 469 ###) 471 470 472 class StudentDocuments(CPSDocument): ###(473 """474 WAeUP Student container for the various student data475 """476 meta_type = 'StudentDocuments'477 portal_type = meta_type478 security = ClassSecurityInfo()479 480 security.declareProtected(View,"Title")481 def Title(self):482 """compose title"""483 content = self.getContent()484 return "Scanned Documents"485 486 487 InitializeClass(StudentDocuments)488 489 def addStudentDocuments(container, id, REQUEST=None, **kw):490 """Add a Students documents"""491 ob = StudentDocuments(id, **kw)492 return CPSBase_adder(container, ob, REQUEST=REQUEST)493 494 ###)495 496 class Jamb(CPSDocument): ###(497 """498 WAeUP Jamb containing the courses and students499 """500 meta_type = 'Jamb'501 portal_type = meta_type502 security = ClassSecurityInfo()503 504 security.declareProtected(View,"Title")505 def Title(self):506 """compose title"""507 content = self.getContent()508 return "JAMB Data for %s %s" % (content.firstname,content.lastname)509 510 security.declareProtected(View,"setOwnership")511 def setOwnership(self,member_id):512 """set ownership"""513 pm = getattr(self,'portal_membership')514 member = pm.getMemberById(member_id)515 self.changeOwnership(member)516 517 InitializeClass(Jamb)518 519 def addJamb(container, id, REQUEST=None, **kw):520 """Add a Jamb."""521 ob = Jamb(id, **kw)522 return CPSBase_adder(container, ob, REQUEST=REQUEST)523 524 ###)525 526 471 class StudyLevel(CPSDocument): ###( 527 472 """ … … 531 476 portal_type = meta_type 532 477 security = ClassSecurityInfo() 478 479 security.declareProtected(View,"Title") 480 def Title(self): 481 """compose title""" 482 return "Level %s" % self.aq_parent.getId() 483 533 484 534 485 InitializeClass(StudyLevel) … … 558 509 ###) 559 510 511 class ScratchCardBatchesFolder(CPSDocument): ###( 512 """ 513 WAeUP Student container for the various student data 514 """ 515 meta_type = 'ScratchCardBatchesFolder' 516 portal_type = meta_type 517 security = ClassSecurityInfo() 518 519 security.declareProtected(View,"Title") 520 def Title(self): 521 """compose title""" 522 return "Pin Batches" 523 524 525 InitializeClass(ScratchCardBatchesFolder) 526 527 def addScratchCardBatchesFolder(container, id, REQUEST=None, **kw): 528 """Add a Students personal data.""" 529 ob = ScratchCardBatchesFolder(id, **kw) 530 return CPSBase_adder(container, ob, REQUEST=REQUEST) 531 532 ###) 533 534 from Products.WAeUP_SRP.WAeUPTables import PinTable 535 536 class ScratchCardBatch(CPSDocument): ###( 537 """ 538 WAeUP Student container for the various student data 539 """ 540 meta_type = 'ScratchCardBatch' 541 portal_type = meta_type 542 security = ClassSecurityInfo() 543 544 security.declareProtected(View,"Title") 545 def Title(self): 546 """compose title""" 547 doc = self.getContent() 548 return "Pin Batch %s BatchNo %d" % (doc.prefix, doc.batch_no) 549 550 551 InitializeClass(ScratchCardBatch) 552 553 def addScratchCardBatch(container, id, REQUEST=None, **kw): 554 """Add a Students personal data.""" 555 ob = ScratchCardBatch(id, **kw) 556 return CPSBase_adder(container, ob, REQUEST=REQUEST) 557 558 ###) -
WAeUP_SRP/trunk/WAeUPTables.py
r414 r440 77 77 InitializeClass(AccommodationTable) 78 78 79 class PinTable(WAeUPTable): 80 81 meta_type = 'WAeUP Pin Tool' 82 83 def __init__(self): 84 WAeUPTable.__init__(self, 'portal_pins') 85 86 def addRecord(self, **data): 87 # The uid is the same as "bed". 88 uid = data['bed'] 89 self.catalog_object(dict2ob(data), uid=uid) 90 return uid 91 92 93 InitializeClass(PinTable) 94 79 95 # BBB: 80 96 AccomodationTable = AccommodationTable -
WAeUP_SRP/trunk/Widgets.py
r422 r440 159 159 value = datastructure[widget_id].upper() 160 160 err = 0 161 if value.split() > 1:161 if len(value.split()) > 1: 162 162 err = 'Invalid Id (Id contains space(s)' 163 163 elif hasattr(self.aq_parent,value): -
WAeUP_SRP/trunk/__init__.py
r423 r440 32 32 from Products.WAeUP_SRP.Students import StudentClearance, addStudentClearance 33 33 from Products.WAeUP_SRP.Students import StudentPersonal, addStudentPersonal 34 from Products.WAeUP_SRP.Students import S tudentDocuments, addStudentDocuments35 from Products.WAeUP_SRP.Students import Jamb, addJamb34 from Products.WAeUP_SRP.Students import ScratchCardBatch, addScratchCardBatch 35 from Products.WAeUP_SRP.Students import ScratchCardBatchesFolder, addScratchCardBatchesFolder 36 36 from Products.WAeUP_SRP.Students import StudyLevel, addStudyLevel 37 37 from Products.WAeUP_SRP.Students import Semester, addSemester … … 58 58 StudentClearance, 59 59 StudentPersonal, 60 S tudentDocuments,61 Jamb,60 ScratchCardBatch, 61 ScratchCardBatchesFolder, 62 62 StudyLevel, 63 63 Semester, … … 82 82 addStudentClearance, 83 83 addStudentPersonal, 84 addS tudentDocuments,85 add Jamb,84 addScratchCardBatch, 85 addScratchCardBatchesFolder, 86 86 addStudyLevel, 87 87 addSemester, 88 88 ) 89 89 90 fti = ( 91 {}, # University 92 {}, #AcademicsFolder 93 {}, #Certificate 94 {}, #CertificateCourse 95 {}, # Faculty 96 {}, # Department 97 {}, # Course 98 {}, # CourseTicket 99 {}, # CertificateCourse 100 {}, # AccoFolder 101 {}, # Accommodation 102 {}, # StudentsFolder, 103 {}, # Student, 104 {}, # StudentStudyCourse, 105 {}, # StudentAdmission, 106 {}, # StudentClearance, 107 {}, # StudentAdmission, 108 {}, # StudentClearance, 109 {}, # StudentPersonal, 110 {}, # StudentDocuments, 111 {}, # Jamb, 112 {}, # StudyLevel, 113 {}, # Semester, 114 ) 90 fti = [{} for t in range(len(contentConstructors))] 91 ##fti = ( 92 ## {}, # University 93 ## {}, #AcademicsFolder 94 ## {}, #Certificate 95 ## {}, #CertificateCourse 96 ## {}, # Faculty 97 ## {}, # Department 98 ## {}, # Course 99 ## {}, # CourseTicket 100 ## {}, # CertificateCourse 101 ## {}, # AccoFolder 102 ## {}, # Accommodation 103 ## {}, # StudentsFolder, 104 ## {}, # Student, 105 ## {}, # StudentStudyCourse, 106 ## {}, # StudentAdmission, 107 ## {}, # StudentClearance, 108 ## {}, # StudentAdmission, 109 ## {}, # StudentClearance, 110 ## {}, # StudentPersonal, 111 ## {}, # ScratchCardBatch, 112 ## {}, # ScratchCardBatchesFolder, 113 ## {}, # StudyLevel, 114 ## {}, # Semester, 115 ## ) 115 116 116 117 registerDirectory('skins', globals()) -
WAeUP_SRP/trunk/profiles/catalog.xml
r368 r440 1 1 <?xml version="1.0"?> 2 2 <object name="portal_catalog" meta_type="CMF Catalog"> 3 <column value="credits"/> 4 <column value="passmark"/> 3 <property name="title"></property> 4 <index name="jamb_reg_no" meta_type="FieldIndex"> 5 <indexed_attr value="jamb_reg_no"/> 6 </index> 7 <index name="matric_no" meta_type="FieldIndex"> 8 <indexed_attr value="matric_no"/> 9 </index> 5 10 </object> -
WAeUP_SRP/trunk/profiles/default/layouts/study_level.xml
r370 r440 7 7 <property name="flexible_widgets"/> 8 8 <property name="validate_values_expr"></property> 9 <widget name=" Title" meta_type="String Widget">10 <property name="title"> Title</property>9 <widget name="code" meta_type="String Widget"> 10 <property name="title">Level No</property> 11 11 <property name="fields"> 12 <element value="Title"/> 13 </property> 14 <property name="label">Level Nr</property> 15 <property name="label_edit">Level Nr</property> 16 <property name="readonly_layout_modes"/> 17 <property name="hidden_layout_modes"/> 18 <property name="hidden_readonly_layout_modes"/> 19 <property name="display_width">40</property> 20 </widget> 21 <widget name="sc_id" meta_type="String Widget"> 22 <property name="title">SC ID</property> 23 <property name="fields"> 24 <element value="sc_id"/> 25 </property> 26 <property name="label">Card Serial Number </property> 27 <property name="label_edit">Card Serial Number</property> 28 <property name="description">Card Serial Number </property> 29 <property 30 name="help">This can be found on the bottom right of the reverse side of your Scratch Card</property> 31 <property name="readonly_layout_modes"/> 32 <property name="hidden_layout_modes"/> 33 <property name="hidden_readonly_layout_modes"/> 34 <property name="hidden_if_expr">python:1</property> 35 <property name="display_width">10</property> 36 </widget> 37 <widget name="sc_pin" meta_type="Scratchcard Pin Widget"> 38 <property name="title">SC PIN</property> 39 <property name="fields"> 40 <element value="sc_pin"/> 12 <element value="code"/> 41 13 </property> 42 14 <property name="is_required">True</property> 43 <property name="label">Enter PIN</property> 44 <property 45 name="label_edit">Enter Scratchcard Pin with the value above</property> 46 <property 47 name="help">Please enter a Scratchcard Pin valid for Registration of Next Level</property> 15 <property name="label">Level No</property> 16 <property name="label_edit">Level No</property> 48 17 <property name="readonly_layout_modes"/> 49 <property name="hidden_layout_modes"/>50 <property name="hidden_readonly_layout_modes"/>51 <property name="display_width">10</property>52 <property name="size_max">10</property>53 </widget>54 <widget name="sc_value" meta_type="Float Widget">55 <property name="title">Scratch card value</property>56 <property name="fields">57 <element value="sc_value"/>58 </property>59 <property name="label">Scratcard Value</property>60 <property name="label_edit">Scratcard Value</property>61 <property name="readonly_layout_modes">62 <element value="create"/>63 </property>64 18 <property name="hidden_layout_modes"/> 65 19 <property name="hidden_readonly_layout_modes"/> … … 67 21 <table> 68 22 <row> 69 <cell name=" Title"/>23 <cell name="code"/> 70 24 </row> 71 25 </table> -
WAeUP_SRP/trunk/profiles/default/roots/campus.xml
r326 r440 6 6 <object name="accommodation" portal_type="AccoFolder" /> 7 7 <object name="students" portal_type="StudentsFolder" /> 8 <object name="pins" portal_type="ScratchCardBatchesFolder" /> 8 9 </object> -
WAeUP_SRP/trunk/profiles/default/schemas/study_level.xml
r199 r440 1 1 <?xml version="1.0"?> 2 2 <object name="study_level" meta_type="CPS Schema"> 3 <field name="sc_id" meta_type="CPS String Field"> 4 <property name="is_searchabletext">True</property> 5 <property name="acl_write_roles">SectionReader</property> 6 </field> 7 <field name="sc_pin" meta_type="CPS String Field"> 8 <property name="is_searchabletext">True</property> 9 <property name="acl_write_roles">SectionReader</property> 10 </field> 11 <field name="sc_value" meta_type="CPS Float Field"> 12 <property name="default_expr">python:1000.</property> 13 <property name="is_searchabletext">True</property> 14 </field> 3 <field name="code" meta_type="CPS String Field"/> 15 4 </object> 5 -
WAeUP_SRP/trunk/profiles/default/toolset.xml
r404 r440 3 3 <required tool_id="portal_accommodation" 4 4 class="Products.WAeUP_SRP.WAeUPTables.AccommodationTable"/> 5 <required tool_id="portal_pins" 6 class="Products.WAeUP_SRP.WAeUPTables.PinTable"/> 5 7 </tool-setup> -
WAeUP_SRP/trunk/profiles/default/types/Semester.xml
r435 r440 21 21 <property name="cps_display_as_document_in_listing">True</property> 22 22 <property name="schemas"> 23 </property> 23 <element value="metadata"/> 24 </property> 24 25 <property name="layouts"/> 25 26 <property name="layout_clusters"> … … 35 36 <permission value="View"/> 36 37 </action> 37 <action title="Book Semester Courses" action_id="book_semester_courses"38 category="object" condition_expr=""39 url_expr="string:${object_url}/book_semester_courses" visible="False">40 <permission value="Take ownership"/>41 </action>42 <action title="action_metadata" action_id="metadata" category="object"43 condition_expr=""44 url_expr="string:${object_url}/cpsdocument_metadata" visible="False">45 <permission value="Modify portal content"/>46 </action>47 <action title="Delegate" action_id="localroles" category="object"48 condition_expr="" url_expr="string:${object_url}/folder_localrole_form"49 visible="False">50 <permission value="Modify portal content"/>51 </action>52 38 <action title="Add Course" action_id="new_entry" category="object" 53 39 condition_expr="" -
WAeUP_SRP/trunk/profiles/default/types/StudentPersonal.xml
r435 r440 13 13 <property name="allowed_content_types"/> 14 14 <property name="allow_discussion">False</property> 15 <property name="cps_is_searchable"> True</property>15 <property name="cps_is_searchable">False</property> 16 16 <property name="cps_proxy_type">document</property> 17 17 <property name="cps_display_as_document_in_listing">True</property> -
WAeUP_SRP/trunk/profiles/default/types/StudyLevel.xml
r435 r440 8 8 <property name="product">WAeUP_SRP</property> 9 9 <property name="factory">addStudyLevel</property> 10 <property name="immediate_view"> folder_view</property>10 <property name="immediate_view">academics_contents</property> 11 11 <property name="global_allow">True</property> 12 12 <property name="filter_content_types">True</property> … … 24 24 <element value="study_level"/> 25 25 </property> 26 <property name="layout_clusters"> 27 <element value=""/> 28 </property> 26 <property name="layout_clusters"/> 29 27 <property name="flexible_layouts"/> 30 28 <property name="storage_methods"/> 31 29 <property name="cps_is_portlet">False</property> 32 30 <alias from="(Default)" to="academics_contents"/> 31 <alias from="create_do" to="waeup_document_create_do"/> 33 32 <alias from="created" to="level_created"/> 34 33 <alias from="view" to="academics_contents"/> -
WAeUP_SRP/trunk/profiles/default/workflows.xml
r427 r440 87 87 <bound-workflow workflow_id="section_folder_wf"/> 88 88 </type> 89 <type type_id="Workspace"> 90 <bound-workflow workflow_id="workspace_folder_wf"/> 89 <type type_id="ScratchCardBatchesFolder"> 90 <bound-workflow workflow_id="section_folder_wf"/> 91 </type> 92 <type type_id="ScratchCardBatch"> 93 <bound-workflow workflow_id="section_folder_wf"/> 91 94 </type> 92 95 </bindings> -
WAeUP_SRP/trunk/skins/waeup_custom/getContentInfo.py
r430 r440 187 187 info['url'] = utool.getUrlFromRpath(info['rpath']) 188 188 189 info['title_or_id'] = proxy. title_or_id()189 info['title_or_id'] = proxy.id 190 190 info['id'] = proxy.getId() 191 191 try: … … 193 193 except AttributeError: 194 194 raise AttributeError, 'invalid object: %s in %s' % (info['title_or_id'], 195 info['rpath']) 195 info['rpath']) 196 except TypeError: 197 info['title'] = proxy.getContent().id 198 196 199 info['icon'] = proxy.getIcon(relative_to_portal=1) 197 200 info['type'] = proxy.getPortalTypeName() … … 227 230 core = 'core' 228 231 if not doc.core_or_elective: 229 core = elective232 core = 'elective' 230 233 info['core_or_elective'] = core 231 234 info['time'] = doc.modified() -
WAeUP_SRP/trunk/skins/waeup_default/waeup_document_create_do.py
r373 r440 10 10 from Products.CMFCore.utils import getToolByName 11 11 12 id = datamodel.get('code').upper() 13 datamodel.set('code',id) 12 if type_name == "StudyLevel": 13 id = datamodel.get('code') 14 else: 15 id = datamodel.get('code').upper() 16 datamodel.set('code',id) 14 17 ##if not id: 15 18 ## id = 'my ' + type_name
Note: See TracChangeset for help on using the changeset viewer.