Ignore:
Timestamp:
18 Sep 2018, 06:27:29 (6 years ago)
Author:
Henrik Bettermann
Message:

Extend test. Global transcript officers get the permission to manage student data.

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/permissions.py

    r15134 r15141  
    158158class TranscriptOfficer(grok.Role):
    159159    """The Transcript Officer is allowed to view, to validate and to
    160     release student transcripts.
     160    release student transcripts. The officer is also allowed to
     161    manage student data (global role only).
    161162    """
    162163    grok.name('waeup.TranscriptOfficer')
     
    167168                     'waeup.viewStudent',
    168169                     'waeup.viewStudentsContainer',
     170                     'waeup.manageStudent',
    169171                     )
    170172
  • main/waeup.kofa/branches/henrik-transcript-workflow/src/waeup/kofa/students/tests/test_browser.py

    r15140 r15141  
    21202120        print "Sample PDF transcript.pdf written to %s" % path
    21212121
    2122     def test_release_transcript(self):
     2122    def test_process_transcript(self):
    21232123        IWorkflowState(self.student).setState('transcript requested')
    21242124        notify(grok.ObjectModifiedEvent(self.student))
     
    21512151        self.browser.getLink("K1000000").click()
    21522152        self.assertFalse('Release transcript request' in self.browser.contents)
    2153         # Officer has to validate the transcript
     2153        # Officers can still edit studycourse, studylevel and course tickets.
     2154        self.browser.open(self.studycourse_path + '/manage')
     2155        self.assertTrue('Undergraduate Full-Time</option>' in self.browser.contents)
     2156        self.browser.getControl(name="form.certificate").value = ['CERT1']
     2157        self.browser.getControl(name="form.current_session").value = ['2004']
     2158        self.browser.getControl(name="form.current_verdict").value = ['A']
     2159        self.browser.getControl(name="form.entry_mode").value = ['ug_ft']
     2160        self.browser.getControl("Save").click()
     2161        self.browser.getControl(name="form.current_level").value = ['100']
     2162        self.browser.getControl("Save").click()
     2163        self.browser.getControl(name="addlevel").value = ['100']
     2164        self.browser.getControl(name="level_session").value = ['2004']
     2165        self.browser.getControl("Add study level").click()
     2166        self.browser.getLink("100").click()
     2167        self.browser.getLink("Manage").click()
     2168        self.browser.getControl(name="form.level_session").value = ['2002']
     2169        self.browser.getControl("Save").click()
     2170        self.browser.getLink("COURSE1").click()
     2171        self.browser.getLink("Manage").click()
     2172        self.browser.getControl("Save").click()
     2173        self.assertTrue('Form has been saved' in self.browser.contents)
     2174        # Officer can validate the transcript
     2175        self.browser.open(self.student_path)
    21542176        self.browser.getLink("Validate transcript").click()
    2155 
    2156 
    2157 
    2158 
    2159         self.assertTrue('Release transcript' in self.browser.contents)
    2160         # Now the transcript can be released.
     2177        # After validation all manage forms are locked.
     2178        self.browser.open(self.studycourse_path + '/manage')
     2179        self.assertTrue('The requested form is locked' in self.browser.contents)
     2180        self.assertFalse('Undergraduate Full-Time</option>' in self.browser.contents)
     2181        self.browser.open(self.studycourse_path + '/100/manage')
     2182        self.assertTrue('The requested form is locked' in self.browser.contents)
     2183        self.browser.open(self.studycourse_path + '/100/COURSE1/manage')
     2184        self.assertTrue('The requested form is locked' in self.browser.contents)
     2185        # Officer can release the transcript
     2186        self.browser.open(self.student_path)
    21612187        self.browser.getLink("Release transcript").click()
    21622188        self.assertTrue(' UTC K1000000 wrote:<br><br>Comment line 1 <br>'
Note: See TracChangeset for help on using the changeset viewer.