Changeset 15148 for main/waeup.kofa/branches
- Timestamp:
- 18 Sep 2018, 20:48:41 (6 years ago)
- Location:
- main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/browser.py
r15146 r15148 1178 1178 return 1179 1179 self.flash(_('Transcript signed.')) 1180 ob_class = self.__implemented__.__name__.replace('waeup.kofa.','') 1181 self.context.student.__parent__.logger.info( 1182 '%s - %s - Transcript signed' 1183 % (ob_class, self.context.student.student_id)) 1184 self.context.student.history.addMessage('Transcript signed') 1180 1185 self.redirect(self.url(self.context)) 1181 1186 return -
main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/tests/test_browser.py
r15143 r15148 2146 2146 # Officer can search for students in state 'transcript requested' 2147 2147 self.browser.open(self.container_path) 2148 self.browser.getControl(name="searchtype").value = ['transcript requested'] 2148 self.browser.getControl(name="searchtype").value = [ 2149 'transcript requested'] 2149 2150 self.browser.getControl("Find student(s)").click() 2150 2151 self.assertTrue('Anna Tester' in self.browser.contents) … … 2153 2154 # Officers can still edit studycourse, studylevel and course tickets. 2154 2155 self.browser.open(self.studycourse_path + '/manage') 2155 self.assertTrue('Undergraduate Full-Time</option>' in self.browser.contents) 2156 self.assertTrue('Undergraduate Full-Time</option>' 2157 in self.browser.contents) 2156 2158 self.browser.getControl(name="form.certificate").value = ['CERT1'] 2157 2159 self.browser.getControl(name="form.current_session").value = ['2004'] … … 2178 2180 self.browser.open(self.studycourse_path + '/manage') 2179 2181 self.assertTrue('The requested form is locked' in self.browser.contents) 2180 self.assertFalse('Undergraduate Full-Time</option>' in self.browser.contents) 2182 self.assertFalse('Undergraduate Full-Time</option>' 2183 in self.browser.contents) 2181 2184 self.browser.open(self.studycourse_path + '/100/manage') 2182 2185 self.assertTrue('The requested form is locked' in self.browser.contents) 2183 2186 self.browser.open(self.studycourse_path + '/100/COURSE1/manage') 2184 2187 self.assertTrue('The requested form is locked' in self.browser.contents) 2188 # Transcript can be signed if officer has the permission to sign 2189 self.browser.open(self.studycourse_path + '/transcript') 2190 self.assertFalse('Sign transcript' in self.browser.contents) 2191 prmglobal = IPrincipalRoleManager(self.app) 2192 prmglobal.assignRoleToPrincipal('waeup.TranscriptSignee', 'mrtranscript') 2193 self.browser.open(self.studycourse_path + '/transcript') 2194 self.browser.getLink("Sign transcript").click() 2195 # Transcript signing has been logged ... 2196 logfile = os.path.join( 2197 self.app['datacenter'].storage, 'logs', 'students.log') 2198 logcontent = open(logfile).read() 2199 self.assertTrue( 2200 'mrtranscript - students.browser.StudentTranscriptSignView - ' 2201 'K1000000 - Transcript signed' in logcontent) 2202 # ... and appears in the student's history 2203 self.browser.open(self.history_path) 2204 self.assertTrue('Transcript signed by Ruth Gordon' 2205 in self.browser.contents) 2185 2206 # Officer can release the transcript 2186 2207 self.browser.open(self.student_path)
Note: See TracChangeset for help on using the changeset viewer.