Changeset 15162 for main/waeup.kofa/branches/henrik-transcript-workflow/src
- Timestamp:
- 21 Sep 2018, 09:32:42 (6 years ago)
- Location:
- main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/browser/templates/mytranscriptrequests.pt
r15160 r15162 2 2 Transcripts to be validated 3 3 </h3> 4 <div tal:repeat="student python:view.getStudents[0]"> 5 <a tal:attributes="href python:student.url + '/studycourse/transcript'"> 6 <span tal:content="student/display_fullname">FULLNAME</span> 7 </a> 8 </div> 4 5 <table class="kofa-data-table dataTable" tal:condition="python:view.getStudents[0]"> 6 <thead> 7 <tr> 8 <th i18n:translate="">Matric No.</th> 9 <th i18n:translate="">Student Id</th> 10 <th i18n:translate="">Fullname</th> 11 <th i18n:translate="">Faculty</th> 12 <th i18n:translate="">Department</th> 13 <th i18n:translate="">Course of Studies</th> 14 </tr> 15 </thead> 16 <tbody> 17 <tr tal:repeat="student python:view.getStudents[0]"> 18 <td tal:content="student/context/matric_number">MATRICNUMBER</td> 19 <td> 20 <a tal:attributes="href python:student.url + '/studycourse/transcript'"> 21 <span tal:content="student/student_id">STUDENTID</span> 22 </a> 23 </td> 24 <td tal:content="student/context/display_fullname">FULLNAME</td> 25 <td tal:content="student/context/faccode">FACCODE</td> 26 <td tal:content="student/context/depcode">DEPCODE</td> 27 <td tal:content="student/context/certcode">CERTCODE</td> 28 </tr> 29 </tbody> 30 </table> 31 9 32 <h3 i18n:domain="waeup.kofa" i18n:translate="" tal:condition="python:view.getStudents[1]"> 10 33 Transcripts to be signed and released 11 34 </h3> 12 <div tal:repeat="student python:view.getStudents[1]">13 <a tal:attributes="href python:student.url + '/studycourse/transcript'">14 <span tal:content="student/display_fullname">FULLNAME</span>15 (<span tal:content="student/student_id">ID</span> -16 <span tal:content="student/matric_number">MATRICNUMBER</span>)17 </a>,18 <span tal:content="student/context/faccode">FACCODE</span> /19 <span tal:content="student/context/depcode">DEPCODE</span> /20 <span tal:content="student/context/certcode">CERTCODE</span>21 </div>22 35 36 <table class="kofa-data-table dataTable" tal:condition="python:view.getStudents[1]"> 37 <thead> 38 <tr> 39 <th i18n:translate="">Matric No.</th> 40 <th i18n:translate="">Student Id</th> 41 <th i18n:translate="">Fullname</th> 42 <th i18n:translate="">Faculty</th> 43 <th i18n:translate="">Department</th> 44 <th i18n:translate="">Course of Studies</th> 45 </tr> 46 </thead> 47 <tbody> 48 <tr tal:repeat="student python:view.getStudents[1]"> 49 <td tal:content="student/context/matric_number">MATRICNUMBER</td> 50 <td> 51 <a tal:attributes="href python:student.url + '/studycourse/transcript'"> 52 <span tal:content="student/student_id">STUDENTID</span> 53 </a> 54 </td> 55 <td tal:content="student/context/display_fullname">FULLNAME</td> 56 <td tal:content="student/context/faccode">FACCODE</td> 57 <td tal:content="student/context/depcode">DEPCODE</td> 58 <td tal:content="student/context/certcode">CERTCODE</td> 59 </tr> 60 </tbody> 61 </table> -
main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/permissions.py
r15155 r15162 158 158 class TranscriptOfficer(grok.Role): 159 159 """The Transcript Officer is allowed to view, to validate and to 160 release student transcripts. The officer is alsoallowed to160 release student transcripts. The officer is not allowed to 161 161 manage student data. 162 162 """ … … 168 168 'waeup.viewStudent', 169 169 'waeup.viewStudentsContainer', 170 'waeup.manageStudent',171 170 ) 172 171 -
main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/tests/test_browser.py
r15159 r15162 2127 2127 'Comment line2\n\nDispatch Address:\nAddress line 1 \n' 2128 2128 'Address line2\n\n') 2129 # Create transcript officer2129 # Create officer with both roles 2130 2130 self.app['users'].addUser('mrtranscript', 'mrtranscriptsecret') 2131 2131 self.app['users']['mrtranscript'].email = 'mrtranscript@foo.ng' … … 2133 2133 prmglobal = IPrincipalRoleManager(self.app) 2134 2134 prmglobal.assignRoleToPrincipal('waeup.TranscriptOfficer', 'mrtranscript') 2135 # Login as transcript officer 2135 prmglobal.assignRoleToPrincipal('waeup.StudentsManager', 'mrtranscript') 2136 prmglobal.assignRoleToPrincipal('waeup.TranscriptSignee', 'mrtranscript') 2137 # Login 2136 2138 self.browser.open(self.login_path) 2137 2139 self.browser.getControl(name="form.login").value = 'mrtranscript' … … 2186 2188 self.browser.open(self.studycourse_path + '/100/COURSE1/manage') 2187 2189 self.assertTrue('The requested form is locked' in self.browser.contents) 2190 2188 2191 # 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') 2192 #self.browser.open(self.studycourse_path + '/transcript') 2193 #self.assertFalse('Sign transcript' in self.browser.contents) 2194 #prmglobal = IPrincipalRoleManager(self.app) 2195 #prmglobal.assignRoleToPrincipal('waeup.TranscriptSignee', 'mrtranscript') 2196 2193 2197 self.browser.open(self.studycourse_path + '/transcript') 2194 2198 self.browser.getLink("Sign transcript electronically").click() … … 2249 2253 self.assertEqual(self.browser.headers['Content-Type'], 2250 2254 'application/pdf') 2251 # Transcript views are no longer access sible2255 # Transcript views are no longer accessible 2252 2256 self.browser.open(self.studycourse_path) 2253 2257 self.assertFalse('studycourse/transcript' in self.browser.contents) … … 2289 2293 'http://localhost/app/students/K1000000/studycourse/transcript' 2290 2294 in self.browser.contents) 2291 self.browser.getLink(" Anna Tester").click()2295 self.browser.getLink("K1000000").click() 2292 2296 self.assertTrue( 2293 2297 'Anna Tester: Transcript Data' in self.browser.contents) … … 2329 2333 'http://localhost/app/students/K1000000/studycourse/transcript' 2330 2334 in self.browser.contents) 2331 self.browser.getLink(" Anna Tester").click()2335 self.browser.getLink("K1000000").click() 2332 2336 self.assertTrue( 2333 2337 'Anna Tester: Transcript Data' in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.