Changeset 9139 for main/waeup.kofa/trunk
- Timestamp:
- 1 Sep 2012, 05:34:11 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r9138 r9139 714 714 715 715 def update(self): 716 if not self.context.is_current: 717 emit_lock_message(self) 718 return 716 719 super(StudyCourseManageFormPage, self).update() 717 720 tabs.need() … … 916 919 917 920 def update(self): 921 if not self.context.__parent__.is_current: 922 emit_lock_message(self) 923 return 918 924 super(StudyLevelManageFormPage, self).update() 919 925 tabs.need() … … 978 984 979 985 def update(self): 986 if not self.context.__parent__.is_current: 987 emit_lock_message(self) 988 return 980 989 if str(self.context.__parent__.current_level) != self.context.__name__: 981 990 self.flash(_('This level does not correspond current level.')) … … 1000 1009 1001 1010 def update(self): 1011 if not self.context.__parent__.is_current: 1012 emit_lock_message(self) 1013 return 1002 1014 if str(self.context.__parent__.current_level) != self.context.__name__: 1003 1015 self.flash(_('This level does not correspond current level.')) … … 1034 1046 'score', 'automatic', 'carry_over') 1035 1047 pnav = 4 1048 1049 def update(self): 1050 if not self.context.__parent__.is_current: 1051 emit_lock_message(self) 1052 return 1053 super(CourseTicketAddFormPage, self).update() 1054 return 1036 1055 1037 1056 @action(_('Add course ticket')) … … 1798 1817 1799 1818 def update(self, SUBMIT=None): 1819 if not self.context.is_current: 1820 emit_lock_message(self) 1821 return 1822 super(StartSessionPage, self).update() 1800 1823 if not self.context.next_session_allowed: 1801 1824 self.flash(_("You are not entitled to start session.")) … … 1855 1878 1856 1879 def update(self): 1880 if not self.context.is_current: 1881 emit_lock_message(self) 1882 return 1857 1883 if self.context.student.state != PAID: 1858 1884 emit_lock_message(self) … … 1887 1913 1888 1914 def update(self): 1915 if not self.context.__parent__.is_current: 1916 emit_lock_message(self) 1917 return 1889 1918 if self.context.student.state != PAID: 1890 1919 emit_lock_message(self) -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r9138 r9139 1958 1958 self.certificate2) 1959 1959 1960 # Add study level to old study course 1961 studylevel = createObject(u'waeup.StudentStudyLevel') 1962 studylevel.level = 200 1963 self.student['studycourse'].addStudentStudyLevel( 1964 self.certificate, studylevel) 1965 1960 1966 self.browser.addHeader('Authorization', 'Basic mgr:mgrpw') 1961 1967 self.browser.open(self.student_path) … … 1971 1977 self.browser.getControl("Transfer").click() 1972 1978 self.assertTrue('Successfully transferred' in self.browser.contents) 1979 1980 # Add study level to new study course 1981 studylevel = createObject(u'waeup.StudentStudyLevel') 1982 studylevel.level = 200 1983 self.student['studycourse'].addStudentStudyLevel( 1984 self.certificate, studylevel) 1985 1986 # Edit and add pages are locked for old study courses 1987 self.browser.open(self.student_path + '/studycourse/manage') 1988 self.assertFalse('The requested form is locked' in self.browser.contents) 1989 self.browser.open(self.student_path + '/studycourse_1/manage') 1990 self.assertTrue('The requested form is locked' in self.browser.contents) 1991 1992 self.browser.open(self.student_path + '/studycourse/start_session') 1993 self.assertFalse('The requested form is locked' in self.browser.contents) 1994 self.browser.open(self.student_path + '/studycourse_1/start_session') 1995 self.assertTrue('The requested form is locked' in self.browser.contents) 1996 1997 IWorkflowState(self.student).setState('school fee paid') 1998 self.browser.open(self.student_path + '/studycourse/add') 1999 self.assertFalse('The requested form is locked' in self.browser.contents) 2000 self.browser.open(self.student_path + '/studycourse_1/add') 2001 self.assertTrue('The requested form is locked' in self.browser.contents) 2002 2003 self.browser.open(self.student_path + '/studycourse/200/manage') 2004 self.assertFalse('The requested form is locked' in self.browser.contents) 2005 self.browser.open(self.student_path + '/studycourse_1/200/manage') 2006 self.assertTrue('The requested form is locked' in self.browser.contents) 2007 2008 self.browser.open(self.student_path + '/studycourse/200/validate_courses') 2009 self.assertFalse('The requested form is locked' in self.browser.contents) 2010 self.browser.open(self.student_path + '/studycourse_1/200/validate_courses') 2011 self.assertTrue('The requested form is locked' in self.browser.contents) 2012 2013 self.browser.open(self.student_path + '/studycourse/200/reject_courses') 2014 self.assertFalse('The requested form is locked' in self.browser.contents) 2015 self.browser.open(self.student_path + '/studycourse_1/200/reject_courses') 2016 self.assertTrue('The requested form is locked' in self.browser.contents) 2017 2018 self.browser.open(self.student_path + '/studycourse/200/add') 2019 self.assertFalse('The requested form is locked' in self.browser.contents) 2020 self.browser.open(self.student_path + '/studycourse_1/200/add') 2021 self.assertTrue('The requested form is locked' in self.browser.contents) 2022 2023 self.browser.open(self.student_path + '/studycourse/200/edit') 2024 self.assertFalse('The requested form is locked' in self.browser.contents) 2025 self.browser.open(self.student_path + '/studycourse_1/200/edit') 2026 self.assertTrue('The requested form is locked' in self.browser.contents) 1973 2027 1974 2028 class StudentRequestPWTests(StudentsFullSetup):
Note: See TracChangeset for help on using the changeset viewer.