Changeset 565
- Timestamp:
- 27 Sep 2006, 07:48:32 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 1 added
- 2 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/Students.py
r539 r565 505 505 ###) 506 506 507 class StudyLevel(CPSDocument): ###(508 """509 WAeUP StudyLevel containing the courses and students510 """511 meta_type = 'StudyLevel'512 portal_type = meta_type513 security = ClassSecurityInfo()514 515 security.declareProtected(View,"Title")516 def Title(self):517 """compose title"""518 return "Level %s" % self.aq_parent.getId()519 520 521 InitializeClass(StudyLevel)522 523 def addStudyLevel(container, id, REQUEST=None, **kw):524 """Add a StudyLevel."""525 ob = StudyLevel(id, **kw)526 return CPSBase_adder(container, ob, REQUEST=REQUEST)527 528 ###)529 530 507 class StudentStudyLevel(CPSDocument): ###( 531 508 """ … … 617 594 ###) 618 595 619 class StudentSemester(CPSDocument): ###( 620 """ 621 WAeUP StudentSemester containing the courses and students 622 """ 623 meta_type = 'StudentSemester' 624 portal_type = meta_type 625 security = ClassSecurityInfo() 626 627 InitializeClass(StudentSemester) 628 629 def addStudentSemester(container, id, REQUEST=None, **kw): 630 """Add a StudentSemester.""" 631 ob = StudentSemester(id, **kw) 632 return CPSBase_adder(container, ob, REQUEST=REQUEST) 633 634 ###) 635 636 class Semester(CPSDocument): ###( 637 """ 638 WAeUP Semester containing the courses and students 639 """ 640 meta_type = 'Semester' 641 portal_type = meta_type 642 security = ClassSecurityInfo() 643 644 InitializeClass(Semester) 645 646 def addSemester(container, id, REQUEST=None, **kw): 647 """Add a Semester.""" 648 ob = Semester(id, **kw) 649 return CPSBase_adder(container, ob, REQUEST=REQUEST) 650 651 ###) 596 ##class StudentSemester(CPSDocument): ###( 597 ## """ 598 ## WAeUP StudentSemester containing the courses and students 599 ## """ 600 ## meta_type = 'StudentSemester' 601 ## portal_type = meta_type 602 ## security = ClassSecurityInfo() 603 ## 604 ##InitializeClass(StudentSemester) 605 ## 606 ##def addStudentSemester(container, id, REQUEST=None, **kw): 607 ## """Add a StudentSemester.""" 608 ## ob = StudentSemester(id, **kw) 609 ## return CPSBase_adder(container, ob, REQUEST=REQUEST) 610 ## 611 #####) 612 613 ##class Semester(CPSDocument): ###( 614 ## """ 615 ## WAeUP Semester containing the courses and students 616 ## """ 617 ## meta_type = 'Semester' 618 ## portal_type = meta_type 619 ## security = ClassSecurityInfo() 620 ## 621 ##InitializeClass(Semester) 622 ## 623 ##def addSemester(container, id, REQUEST=None, **kw): 624 ## """Add a Semester.""" 625 ## ob = Semester(id, **kw) 626 ## return CPSBase_adder(container, ob, REQUEST=REQUEST) 627 ## 628 #####) 629 ## 652 630 653 631 class StudentCourseResult(CPSDocument): ###( -
WAeUP_SRP/trunk/__init__.py
r537 r565 31 31 "Course", 32 32 "CertificateCourse", 33 "StudyLevel", 33 34 ) 34 35 ), … … 47 48 "StudentPersonal", 48 49 "StudentStudyLevel", 49 "StudentSemester",50 #"StudentSemester", 50 51 "StudentCourseResult", 51 52 # move to Academics later 52 "StudyLevel", 53 "Semester", 53 #"Semester", 54 54 ) 55 55 ), -
WAeUP_SRP/trunk/skins/waeup_academics/getLevelInfo.py
r556 r565 37 37 info['cert_id'] = cert_id 38 38 39 for sem in ('first','second'): 40 res = context.portal_catalog(container_path="%s/%s/%s" % (cp,level_id,sem)) 41 items = [] 42 for r in res: 43 row = {} 44 ro = r.getObject() 45 rd = ro.getContent() 46 row['id'] = r.getId 47 row['title'] = rd.Title() 48 row['core'] = rd.core_or_elective 49 row['semester'] = sem 50 row['url'] = ro.absolute_url() 51 items.append(row) 52 info[sem] = items 39 res = context.portal_catalog(container_path="%s/%s" % (cp,level_id)) 40 first = [] 41 second = [] 42 for r in res: 43 row = {} 44 ro = r.getObject() 45 rd = ro.getContent() 46 row['id'] = r.getId 47 row['title'] = rd.Title() 48 row['core'] = rd.core_or_elective 49 row['semester'] = rd.semester 50 row['url'] = ro.absolute_url() 51 if rd.semester == 'first': 52 first.append(row) 53 else: 54 second.append(row) 55 info['first'] = first 56 info['second'] = second 53 57 return info
Note: See TracChangeset for help on using the changeset viewer.