Changeset 8920 for main/waeup.kofa/trunk/src/waeup/kofa/students
- Timestamp:
- 5 Jul 2012, 14:48:51 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r8903 r8920 932 932 ticket.automatic = False 933 933 ticket.carry_over = False 934 ticket.code = course.code935 ticket.title = course.title936 ticket.fcode = course.__parent__.__parent__.__parent__.code937 ticket.dcode = course.__parent__.__parent__.code938 ticket.credits = course.credits939 ticket.passmark = course.passmark940 ticket.semester = course.semester941 934 try: 942 self.context.addCourseTicket(ticket )935 self.context.addCourseTicket(ticket, course) 943 936 except KeyError: 944 937 self.flash(_('The ticket exists.')) … … 1784 1777 level_title = translate(self.context.level_title, 'waeup.kofa', 1785 1778 target_language=lang) 1786 return _(' Add and remove course tickets of study level${a}',1779 return _('Edit course list of ${a}', 1787 1780 mapping = {'a':level_title}) 1788 1781 … … 1855 1848 ticket = createObject(u'waeup.CourseTicket') 1856 1849 course = data['course'] 1857 for name in ['code', 'title', 'credits', 'passmark', 'semester']:1858 setattr(ticket, name, getattr(course, name))1859 1850 ticket.automatic = False 1851 ticket.carry_over = False 1860 1852 try: 1861 self.context.addCourseTicket(ticket )1853 self.context.addCourseTicket(ticket, course) 1862 1854 except KeyError: 1863 1855 self.flash(_('The ticket exists.')) -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/studylevelpage.pt
r8141 r8920 34 34 <th i18n:translate="">Code</th> 35 35 <th i18n:translate="">Title</th> 36 <th i18n:translate="">Dep t.</th>37 <th i18n:translate="">Fac t.</th>36 <th i18n:translate="">Dep.</th> 37 <th i18n:translate="">Fac.</th> 38 38 <th i18n:translate="">Cred.</th> 39 39 <th i18n:translate="">Mand.</th> -
main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py
r8854 r8920 402 402 ) 403 403 404 def addCourseTicket( courseticket):404 def addCourseTicket(ticket, course): 405 405 """Add a course ticket object. 406 406 """ -
main/waeup.kofa/trunk/src/waeup/kofa/students/studylevel.py
r8736 r8920 56 56 return studylevelsource.factory.getTitle(self.__parent__, self.level) 57 57 58 def addCourseTicket(self, courseticket):58 def addCourseTicket(self, ticket, course): 59 59 """Add a course ticket object. 60 60 """ 61 if not ICourseTicket.providedBy( courseticket):61 if not ICourseTicket.providedBy(ticket): 62 62 raise TypeError( 63 63 'StudentStudyLeves contain only ICourseTicket instances') 64 self[courseticket.code] = courseticket 64 ticket.code = course.code 65 ticket.title = course.title 66 ticket.fcode = course.__parent__.__parent__.__parent__.code 67 ticket.dcode = course.__parent__.__parent__.code 68 ticket.credits = course.credits 69 ticket.passmark = course.passmark 70 ticket.semester = course.semester 71 self[ticket.code] = ticket 65 72 return 66 73 … … 87 94 88 95 A course ticket contains a copy of the original course and 89 course referrer data. If the courses and/or their referrers are removed, the 90 corresponding tickets remain unchanged. So we do not need any event 96 certificate course data. If the courses and/or the referrin certificate 97 courses are removed, the corresponding tickets remain unchanged. 98 So we do not need any event 91 99 triggered actions on course tickets. 92 100 """ -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_batching.py
r8888 r8920 218 218 ticket.passmark = 100 219 219 ticket.semester = 2 220 study_level .addCourseTicket(ticket)220 study_level[ticket.code] = ticket 221 221 self.add_payment(student) 222 222 return student … … 688 688 shutil.rmtree(os.path.dirname(fin_file)) 689 689 690 # Add course and c ourse referrer690 # Add course and certificate course 691 691 self.course = createObject('waeup.Course') 692 692 self.course.code = 'COURSE1' … … 696 696 self.app['faculties']['fac1']['dep1'].courses.addCourse( 697 697 self.course) 698 self.app['faculties']['fac1']['dep1'].certificates['CERT1'].addC ourseRef(698 self.app['faculties']['fac1']['dep1'].certificates['CERT1'].addCertCourse( 699 699 self.course, level=100) 700 700 -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r8903 r8920 171 171 self.app['faculties']['fac1']['dep1'].courses.addCourse( 172 172 self.course) 173 self.app['faculties']['fac1']['dep1'].certificates['CERT1'].addC ourseRef(173 self.app['faculties']['fac1']['dep1'].certificates['CERT1'].addCertCourse( 174 174 self.course, level=100) 175 175 … … 1240 1240 self.browser.getControl("Create course list now").click() 1241 1241 self.browser.getLink("100").click() 1242 self.browser.getLink(" Add and remove courses").click()1242 self.browser.getLink("Edit course list").click() 1243 1243 self.browser.getControl("Add course ticket").click() 1244 1244 self.browser.getControl(name="form.course").value = ['COURSE1'] … … 1253 1253 self.browser.getControl("Create course list now").click() 1254 1254 self.browser.getLink("200").click() 1255 self.browser.getLink(" Add and remove courses").click()1255 self.browser.getLink("Edit course list").click() 1256 1256 self.browser.getControl("Add course ticket").click() 1257 1257 self.browser.getControl(name="form.course").value = ['COURSE1'] … … 1521 1521 # The new SFE-0 pin can be used for starting new session 1522 1522 self.browser.open(self.studycourse_path) 1523 self.browser.getLink('Start session').click()1523 self.browser.getLink('Start new session').click() 1524 1524 pin = self.app['accesscodes']['SFE-0'].keys()[0] 1525 1525 parts = pin.split('-')[1:] … … 1570 1570 # The new SFE-0 pin can be used for starting session 1571 1571 self.browser.open(self.studycourse_path) 1572 self.browser.getLink('Start session').click()1572 self.browser.getLink('Start new session').click() 1573 1573 pin = self.app['accesscodes']['SFE-0'].keys()[0] 1574 1574 parts = pin.split('-')[1:] … … 1610 1610 # The new SFE-1 pin can be used for starting new session 1611 1611 self.browser.open(self.studycourse_path) 1612 self.browser.getLink('Start session').click()1612 self.browser.getLink('Start new session').click() 1613 1613 self.browser.getControl(name="ac_series").value = sfeseries 1614 1614 self.browser.getControl(name="ac_number").value = sfenumber -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_student.py
r8735 r8920 129 129 studylevel = StudentStudyLevel() 130 130 self.assertRaises( 131 TypeError, studylevel.addCourseTicket, department )131 TypeError, studylevel.addCourseTicket, department, department) 132 132 133 133 def test_booking_date(self): -
main/waeup.kofa/trunk/src/waeup/kofa/students/viewlets.py
r8903 r8920 445 445 grok.require('waeup.handleStudent') 446 446 icon = 'actionicon_start.gif' 447 text = _('Start session')447 text = _('Start new session') 448 448 target = 'start_session' 449 449 … … 477 477 grok.view(StudyLevelDisplayFormPage) 478 478 grok.require('waeup.handleStudent') 479 text = _(' Add and remove courses')479 text = _('Edit course list') 480 480 target = 'edit' 481 481
Note: See TracChangeset for help on using the changeset viewer.