Changeset 464
- Timestamp:
- 1 Sep 2006, 17:16:18 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 4 added
- 1 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Students.py
r459 r464 158 158 logger.info('Level %(level)s not in %(certcode)s' % vars()) 159 159 l.getContent().edit(mapping={'Title': "Level %s" % level}) 160 l.invokeFactory('S emester','first')161 l.invokeFactory('S emester','second')160 l.invokeFactory('StudentSemester','first') 161 l.invokeFactory('StudentSemester','second') 162 162 first_s = getattr(l,'first') 163 163 first_s.getContent().edit(mapping={'Title': 'First Semester'}) … … 237 237 sc.invokeFactory('StudentStudyLevel', level) 238 238 l = getattr(sc, level) 239 l.invokeFactory('S emester','first')240 l.invokeFactory('S emester','second')239 l.invokeFactory('StudentSemester','first') 240 l.invokeFactory('StudentSemester','second') 241 241 first_s = getattr(l,'first') 242 242 first_s.getContent().edit(mapping={'Title': 'First Semester'}) … … 247 247 if snr == "2": 248 248 semester = getattr(l,'second') 249 logger.info('Creating CourseTicket %(CosCode)s in Level %(Level)s for %(StudentId)s %(Matnumber)s' % result)250 semester.invokeFactory(' CourseTicket',course)249 logger.info('Creating StudentCourseResult %(CosCode)s in Level %(Level)s for %(StudentId)s %(Matnumber)s' % result) 250 semester.invokeFactory('StudentCourseResult',course) 251 251 ct = getattr(semester,course) 252 252 d = {} … … 316 316 s.invokeFactory('StudentAdmission','admission') 317 317 da = {'Title': 'Admission Data'} 318 s.invokeFactory('StudentPersonal','personal')319 sp = s.personal320 d = {'Title': 'Personal Data'}321 s.invokeFactory('StudentClearance','clearance')322 sc = s.clearance323 dc = {'Title': 'Clearance Data'}318 ## s.invokeFactory('StudentPersonal','personal') 319 ## sp = s.personal 320 ## d = {'Title': 'Personal Data'} 321 ## s.invokeFactory('StudentClearance','clearance') 322 ## sc = s.clearance 323 ## dc = {'Title': 'Clearance Data'} 324 324 da["jamb_reg_no"] = jamb.get("REG-NO") 325 325 da["jamb_lastname"] = jamb.get("NAME") 326 d["lastname"] = jamb.get("NAME")326 ## d["lastname"] = jamb.get("NAME") 327 327 da["jamb_sex"] = jamb.get("SEX") 328 328 d["sex"] = jamb.get("SEX") … … 334 334 da["jamb_first_uni"] = jamb.get("UNIV1") 335 335 da["jamb_second_uni"] = jamb.get("UNIV2") 336 s.personal.getContent().edit(mapping=d)336 ## s.personal.getContent().edit(mapping=d) 337 337 s.admission.getContent().edit(mapping=da) 338 338 return self.REQUEST.RESPONSE.redirect("%s" % self.REQUEST.get('URL1')) … … 370 370 content = data.getContent() 371 371 return "%s %s" % (content.firstname,content.lastname) 372 data = getattr(self,'admission',None) 373 if data: 374 content = data.getContent() 375 return "%s" % (content.jamb_lastname) 372 376 return self.title 373 377 … … 543 547 ###) 544 548 549 class StudentSemester(CPSDocument): ###( 550 """ 551 WAeUP StudentSemester containing the courses and students 552 """ 553 meta_type = 'StudentSemester' 554 portal_type = meta_type 555 security = ClassSecurityInfo() 556 557 InitializeClass(StudentSemester) 558 559 def addStudentSemester(container, id, REQUEST=None, **kw): 560 """Add a StudentSemester.""" 561 ob = StudentSemester(id, **kw) 562 return CPSBase_adder(container, ob, REQUEST=REQUEST) 563 564 ###) 565 545 566 class Semester(CPSDocument): ###( 546 567 """ … … 560 581 ###) 561 582 562 class CourseTicket(CPSDocument): ###( 563 """ 564 WAeUP CourseTicket 565 """ 566 meta_type = 'CourseTicket' 567 portal_type = meta_type 568 security = ClassSecurityInfo() 583 class StudentCourseResult(CPSDocument): ###( 584 """ 585 WAeUP StudentCourseResult 586 """ 587 meta_type = 'StudentCourseResult' 588 portal_type = meta_type 589 security = ClassSecurityInfo() 590 569 591 def getCourseEntry(self,cid): 570 res = self.portal_catalog({'meta_type': " Course",592 res = self.portal_catalog({'meta_type': "StudentCourse", 571 593 'id': cid}) 572 594 if res: … … 584 606 return "No course with id %s" % cid 585 607 586 InitializeClass( CourseTicket)587 588 def add CourseTicket(container, id, REQUEST=None, **kw):589 """Add a CourseTicket."""590 ob = CourseTicket(id, **kw)608 InitializeClass(StudentCourseResult) 609 610 def addStudentCourseResult(container, id, REQUEST=None, **kw): 611 """Add a StudentCourseResult.""" 612 ob = StudentCourseResult(id, **kw) 591 613 return CPSBase_adder(container, ob, REQUEST=REQUEST) 592 614 ###) -
WAeUP_SRP/trunk/__init__.py
r458 r464 40 40 "Student", 41 41 "StudentStudyCourse", 42 " CourseTicket",42 "StudentCourseResult", 43 43 "StudentAdmission", 44 44 "StudentClearance", … … 46 46 "ScratchCardBatch", 47 47 "ScratchCardBatchesFolder", 48 "StudentStudyLevel", 49 "StudentSemester", 50 # move to Academics later 48 51 "StudyLevel", 49 "StudentStudyLevel",50 52 "Semester", 51 53 ) -
WAeUP_SRP/trunk/profiles/default/actionicons.xml
r459 r464 2 2 <action-icons> 3 3 <action-icon category="object" action_id="view" 4 title="View" priority=" 0"4 title="View" priority="10" 5 5 icon_expr="actionicon_view.png"/> 6 6 <action-icon category="object" action_id="new_content" 7 title="New" priority=" 1"7 title="New" priority="0" 8 8 icon_expr="actionicon_add.png"/> 9 9 <action-icon category="object" action_id="contents" 10 title="Contents" priority="2 "10 title="Contents" priority="20" 11 11 icon_expr="actionicon_manage_content.png"/> 12 12 <action-icon category="object" action_id="preview" 13 title="Preview" priority="3 "13 title="Preview" priority="30" 14 14 icon_expr="actionicon_preview_icon.png"/> 15 15 <action-icon category="object" action_id="edit" 16 title="Edit" priority=" 4"16 title="Edit" priority="100" 17 17 icon_expr="actionicon_modify.png"/> 18 18 <action-icon category="object" action_id="metadata" 19 title="Metadata" priority=" 5"19 title="Metadata" priority="110" 20 20 icon_expr="actionicon_metadata.png"/> 21 21 <action-icon category="object" action_id="localroles" 22 title="Local Roles" priority=" 6"22 title="Local Roles" priority="250" 23 23 icon_expr="actionicon_user_roles.png"/> 24 24 <action-icon category="object" 25 25 action_id="activate_comments" 26 title="Authorize comments" priority=" 8"26 title="Authorize comments" priority="130" 27 27 icon_expr="actionicon_comments.png"/> 28 28 <action-icon category="object" action_id="comment" 29 title="Add comment" priority=" 9"29 title="Add comment" priority="140" 30 30 icon_expr="actionicon_addcomment.png"/> 31 31 <action-icon category="object" action_id="search_entry" 32 title="Search entry" priority=" 10"32 title="Search entry" priority="0" 33 33 icon_expr="actionicon_search.png"/> 34 34 <action-icon category="object" action_id="new_entry" … … 36 36 icon_expr="actionicon_add.png"/> 37 37 <action-icon category="object" action_id="view_entry" 38 title="View entry" priority=" 10"38 title="View entry" priority="0" 39 39 icon_expr="actionicon_view.png"/> 40 40 <action-icon category="object" action_id="edit_entry" 41 title="Edit entry" priority="10 "41 title="Edit entry" priority="100" 42 42 icon_expr="actionicon_modify.png"/> 43 43 <action-icon category="object" action_id="delete_entry" 44 title="Delete entry" priority="1 0"44 title="Delete entry" priority="120" 45 45 icon_expr="actionicon_reject.png"/> 46 46 <action-icon category="object" action_id="edit_online" 47 title="Edit online" priority="1 1"47 title="Edit online" priority="100" 48 48 icon_expr="actionicon_edit_online.png"/> 49 49 <action-icon category="folder" action_id="portlets" 50 title="Manage portlets" priority=" 0"50 title="Manage portlets" priority="270" 51 51 icon_expr="actionicon_manage_portlets.png"/> 52 52 <action-icon category="workflow" action_id="copy_submit" 53 title="Submit" priority=" 0"53 title="Submit" priority="70" 54 54 icon_expr="actionicon_submit.png"/> 55 55 <action-icon category="workflow" action_id="checkout_draft" 56 title="Version" priority="1 "56 title="Version" priority="150" 57 57 icon_expr="actionicon_version.png"/> 58 58 <action-icon category="workflow" action_id="status_history" 59 title="History" priority="2 "59 title="History" priority="260" 60 60 icon_expr="actionicon_history.png"/> 61 61 <action-icon category="workflow" action_id="retract" 62 title="Submit" priority=" 3"62 title="Submit" priority="90" 63 63 icon_expr="actionicon_retract.png"/> 64 64 <action-icon category="workflow" action_id="approve" 65 title="Approve" priority=" 2"65 title="Approve" priority="50" 66 66 icon_expr="actionicon_validate.png"/> 67 67 <action-icon category="workflow" action_id="reject" 68 title="Reject" priority=" 4"68 title="Reject" priority="60" 69 69 icon_expr="actionicon_reject.png"/> 70 70 <action-icon category="workflow" action_id="expire" 71 title="Expire" priority=" 5"71 title="Expire" priority="80" 72 72 icon_expr="actionicon_expire.png"/> 73 73 <action-icon category="workflow" 74 74 action_id="delete_translation" 75 title="Delete translation" priority=" 6"75 title="Delete translation" priority="190" 76 76 icon_expr="actionicon_del_translation.png"/> 77 77 <action-icon category="workflow" action_id="translate" 78 title="Translate" priority=" 6"78 title="Translate" priority="180" 79 79 icon_expr="actionicon_add_translation.png"/> 80 80 <action-icon category="workflow" action_id="accept" 81 title="Accept" priority=" 7"81 title="Accept" priority="50" 82 82 icon_expr="actionicon_publish.png"/> 83 83 <action-icon category="workflow" action_id="unpublish" 84 title="Unpublish" priority="7 "84 title="Unpublish" priority="70" 85 85 icon_expr="actionicon_unpublish.png"/> 86 86 <action-icon category="workflow" action_id="abandon_draft" 87 title="Give up revision" priority=" 8"87 title="Give up revision" priority="170" 88 88 icon_expr="actionicon_version_reject.png"/> 89 89 <action-icon category="workflow" action_id="checkin_draft" 90 title="Checkin revision" priority="1 0"90 title="Checkin revision" priority="160" 91 91 icon_expr="actionicon_version_validate.png"/> 92 92 <action-icon category="global" action_id="configThemes" … … 118 118 icon_expr="actionicon_advanced_search.png"/> 119 119 <action-icon category="global_header" action_id="contact" 120 title="Contact" priority="3"121 120 icon_expr="actionicon_email.png"/> 122 121 <action-icon category="user" action_id="login" … … 185 184 action_id="import_fulltime_students_results" 186 185 title="Import Fulltime Students Results" 187 priority="2" icon_expr="actionicon_submit.png"/> 186 priority="2" 187 icon_expr="actionicon_submit.png"/> 188 188 <action-icon category="import" 189 189 action_id="import_jamb_data" -
WAeUP_SRP/trunk/profiles/default/types.xml
r454 r464 10 10 <object name="Course" meta_type="CPS Flexible Type Information"/> 11 11 <object name="CertificateCourse" meta_type="CPS Flexible Type Information"/> 12 <object name="CourseTicket" meta_type="CPS Flexible Type Information"/>13 12 <object name="Department" meta_type="CPS Flexible Type Information"/> 14 13 <object name="Faculty" meta_type="CPS Flexible Type Information"/> … … 20 19 <object name="StudentStudyCourse" meta_type="CPS Flexible Type Information"/> 21 20 <object name="StudentClearance" meta_type="CPS Flexible Type Information"/> 21 <object name="StudentCourseResult" meta_type="CPS Flexible Type Information"/> 22 22 <object name="StudentPersonal" meta_type="CPS Flexible Type Information"/> 23 23 <object name="StudentAdmission" meta_type="CPS Flexible Type Information"/> 24 <object name="StudentSemester" meta_type="CPS Flexible Type Information"/> 24 25 <object name="StudentsFolder" meta_type="CPS Flexible Type Information"/> 25 26 <object name="ScratchCardBatchesFolder" meta_type="CPS Flexible Type Information"/> -
WAeUP_SRP/trunk/profiles/default/types/StudentsFolder.xml
r459 r464 65 65 </action> 66 66 <action title="FT Student Results" 67 action_id="import_full time_students_results" category="import"67 action_id="import_full_time_students_results" category="import" 68 68 condition_expr="" 69 69 url_expr="string:${object_url}/loadFullTimeStudentsResultsFromCSV" -
WAeUP_SRP/trunk/profiles/default/workflows.xml
r455 r464 41 41 <bound-workflow workflow_id="waeup_base_wf"/> 42 42 </type> 43 <type type_id="CourseTicket">44 <bound-workflow workflow_id="waeup_base_wf"/>45 </type>46 43 <type type_id="CoursesFolder"> 47 44 <bound-workflow workflow_id="section_folder_wf"/> … … 80 77 <bound-workflow workflow_id="waeup_student_wf"/> 81 78 </type> 82 <type type_id="StudentDocuments">83 <bound-workflow workflow_id="waeup_base_wf"/>84 </type>85 <type type_id="StudentElegibility">86 <bound-workflow workflow_id="waeup_base_wf"/>87 </type>88 <type type_id="StudentEligibility">89 <bound-workflow workflow_id="waeup_base_wf"/>90 </type>91 79 <type type_id="StudentPersonal"> 92 80 <bound-workflow workflow_id="waeup_student_wf"/> … … 94 82 <type type_id="StudentStudyCourse"> 95 83 <bound-workflow workflow_id="section_folder_wf"/> 84 </type> 85 <type type_id="StudentCourseResult"> 86 <bound-workflow workflow_id="waeup_base_wf"/> 96 87 </type> 97 88 <type type_id="StudentsFolder"> … … 104 95 <bound-workflow workflow_id="section_folder_wf"/> 105 96 </type> 97 <type type_id="StudentSemester"> 98 <bound-workflow workflow_id="section_folder_wf"/> 99 </type> 106 100 <type type_id="University"> 107 101 <bound-workflow workflow_id="section_folder_wf"/> -
WAeUP_SRP/trunk/skins/waeup_academics/academics_content_lib_info_detail_tab.pt
r454 r464 131 131 </span> 132 132 <span tal:define="docu python: info['doc']" 133 tal:condition="python: docu.portal_type == ' CourseTicket'">133 tal:condition="python: docu.portal_type == 'StudentCourseResult'"> 134 134 <td> 135 135 <span tal:content="docu/grade">ID</span> … … 140 140 </span> 141 141 <span tal:define="docu python: info['doc']" 142 tal:condition="python: docu.portal_type == 'Student'">142 tal:condition="python: False and docu.portal_type == 'Student'"> 143 143 <td> 144 144 <span tal:content="info/clearance/matric_no">ID</span> -
WAeUP_SRP/trunk/skins/waeup_custom/getContentInfo.py
r458 r464 233 233 info['core_or_elective'] = core 234 234 elif doc.portal_type == 'Student': 235 info['clearance'] = proxy.clearance.getContent() 235 try: 236 info['clearance'] = proxy.clearance.getContent() 237 except AttributeError: 238 info['clearance'] = None 236 239 info['time'] = doc.modified() 237 240 info['doc'] = doc
Note: See TracChangeset for help on using the changeset viewer.