Changeset 758 for WAeUP_SRP/trunk
- Timestamp:
- 27 Oct 2006, 07:24:22 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Students.py
r757 r758 556 556 while hasattr(students, sid): 557 557 sid = "%c%d" % (letter,r.randint(99999,1000000)) 558 return sid 558 return sid 559 559 #return "%c%d" % (r.choice('ABCDEFGHKLMNPQRSTUVWXY'),r.randint(99999,1000000)) 560 560 ###) … … 607 607 ###) 608 608 609 security.declareProtected(View,'createSubObjects') ###(610 611 """make the student a member"""612 dp = {'Title': 'Personal Data'}613 app_doc = self.application.getContent()614 names = app_doc.jamb_lastname.split()615 if len(names) == 3:616 dp['firstname'] = names[0].capitalize()617 dp['middlename'] = names[1].capitalize()618 dp['lastname'] = names[2].capitalize()619 elif len(names) == 2:620 dp['firstname'] = names[0].capitalize()621 dp['lastname'] = names[1].capitalize()622 else:623 dp['lastname'] = app_doc.jamb_lastname624 dp['sex'] = app_doc.jamb_sex == 'F'625 dp['lga'] = "%s/%s" % (app_doc.jamb_state,app_doc.jamb_lga )626 proxy = self.aq_parent627 proxy.invokeFactory('StudentPersonal','personal')628 per = proxy.personal629 per_doc = per.getContent()630 per_doc.edit(mapping = dp)631 per.manage_setLocalRoles(self.getId(), ['Owner',])632 #self.portal_workflow.doActionFor(per,'open',dest_container=per)609 ## security.declareProtected(View,'createSubObjects') ###( 610 ## def createSubObjects(self): 611 ## """make the student a member""" 612 ## dp = {'Title': 'Personal Data'} 613 ## app_doc = self.application.getContent() 614 ## names = app_doc.jamb_lastname.split() 615 ## if len(names) == 3: 616 ## dp['firstname'] = names[0].capitalize() 617 ## dp['middlename'] = names[1].capitalize() 618 ## dp['lastname'] = names[2].capitalize() 619 ## elif len(names) == 2: 620 ## dp['firstname'] = names[0].capitalize() 621 ## dp['lastname'] = names[1].capitalize() 622 ## else: 623 ## dp['lastname'] = app_doc.jamb_lastname 624 ## dp['sex'] = app_doc.jamb_sex == 'F' 625 ## dp['lga'] = "%s/%s" % (app_doc.jamb_state,app_doc.jamb_lga ) 626 ## proxy = self.aq_parent 627 ## proxy.invokeFactory('StudentPersonal','personal') 628 ## per = proxy.personal 629 ## per_doc = per.getContent() 630 ## per_doc.edit(mapping = dp) 631 ## per.manage_setLocalRoles(self.getId(), ['Owner',]) 632 ## #self.portal_workflow.doActionFor(per,'open',dest_container=per) 633 633 634 634 ###) … … 805 805 return CPSBase_adder(container, ob, REQUEST=REQUEST) 806 806 807 808 class StudentPume(CPSDocument): ###( 809 """ 810 WAeUP Student container for the various student data 811 """ 812 meta_type = 'StudentPume' 813 portal_type = meta_type 814 security = ClassSecurityInfo() 815 816 security.declareProtected(View,"Title") 817 def Title(self): 818 """compose title""" 819 return "PUME Results" 820 821 822 InitializeClass(StudentPume) 823 824 def addStudentPume(container, id, REQUEST=None, **kw): 825 """Add a Students PUME data.""" 826 ob = StudentPume(id, **kw) 827 return CPSBase_adder(container, ob, REQUEST=REQUEST) 828 807 829 ###) 808 830 … … 824 846 #####) 825 847 826 class Semester(CPSDocument): ###(827 """828 WAeUP Semester containing the courses and students829 """830 meta_type = 'Semester'831 portal_type = meta_type832 security = ClassSecurityInfo()833 834 InitializeClass(Semester)835 836 def addSemester(container, id, REQUEST=None, **kw):837 """Add a Semester."""838 ob = Semester(id, **kw)839 return CPSBase_adder(container, ob, REQUEST=REQUEST)840 841 ### )848 ##class Semester(CPSDocument): ###( 849 ## """ 850 ## WAeUP Semester containing the courses and students 851 ## """ 852 ## meta_type = 'Semester' 853 ## portal_type = meta_type 854 ## security = ClassSecurityInfo() 855 ## 856 ##InitializeClass(Semester) 857 ## 858 ##def addSemester(container, id, REQUEST=None, **kw): 859 ## """Add a Semester.""" 860 ## ob = Semester(id, **kw) 861 ## return CPSBase_adder(container, ob, REQUEST=REQUEST) 862 ## 863 #####) 842 864 843 865 class StudentCourseResult(CPSDocument): ###( -
WAeUP_SRP/trunk/Widgets.py
r747 r758 363 363 datastructure[widget_id+'_b'] = b 364 364 datastructure[widget_id+'_n'] = n 365 365 366 366 ###) 367 367 … … 386 386 while 1: 387 387 if ok == -2: 388 err = 'You have already applied with a different Pin, please login '388 err = 'You have already applied with a different Pin, please login.' 389 389 break 390 390 elif ok == -1: … … 453 453 datastructure[widget_id+'_b'] = b 454 454 datastructure[widget_id+'_n'] = n 455 return meth(mode=mode, 456 datastructure=datastructure, 455 return meth(mode=mode, 456 datastructure=datastructure, 457 457 ) 458 458 ###) -
WAeUP_SRP/trunk/__init__.py
r639 r758 46 46 "StudentCourseResult", 47 47 "StudentApplication", 48 "StudentPume", 48 49 "StudentClearance", 49 50 "StudentPersonal", -
WAeUP_SRP/trunk/profiles/default/types/Student.xml
r659 r758 13 13 <property name="allowed_content_types"> 14 14 <element value="StudentAccommodation"/> 15 <element value="StudentDocuments"/> 15 <element value="StudentApplication"/> 16 <element value="StudentPume"/> 16 17 <element value="StudentPersonal"/> 17 18 <element value="StudentStudyCourse"/>
Note: See TracChangeset for help on using the changeset viewer.