Ignore:
Timestamp:
6 Sep 2016, 18:37:59 (8 years ago)
Author:
Henrik Bettermann
Message:

Remove CustomStudyCourseTranscriptPage?.

Students are allowed to view transcripts. Buttons not yet visible, waiting for confirmation.

Location:
main/waeup.aaue/trunk/src/waeup/aaue/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py

    r14149 r14165  
    4747    CourseTicketManageFormPage,
    4848    EditScoresPage,
    49     ExportPDFScoresSlip
     49    ExportPDFScoresSlip,
     50    StudyCourseTranscriptPage,
    5051    )
    5152from kofacustom.nigeria.students.browser import (
     
    6364    NigeriaAccommodationManageFormPage,
    6465    NigeriaStudentBaseDisplayFormPage,
    65     NigeriaStudentBaseManageFormPage,
    66     NigeriaExportPDFFinancialClearancePage
     66    NigeriaStudentBaseManageFormPage
    6767    )
    6868from waeup.aaue.students.interfaces import (
     
    411411            )
    412412
     413class CustomStudyCourseTranscriptPage(StudyCourseTranscriptPage):
     414    """ Page to display the student's transcript.
     415    """
     416    grok.require('waeup.viewStudent')
     417
    413418class CustomExportPDFTranscriptSlip(ExportPDFTranscriptSlip):
    414419    """Deliver a PDF slip of the context.
    415420    """
     421    grok.require('waeup.viewStudent')
    416422
    417423    def _sigsInFooter(self):
     
    780786        return header + sorted(tickets,
    781787            key=lambda value: value[5] + value[3] + str(value[6]))
    782 
    783 
    784 
    785 class CustomExportPDFFinancialClearancePage(NigeriaExportPDFFinancialClearancePage):
    786     """Deliver a PDF financial clearance slip.
    787     """
    788 
    789     def _sigsInFooter(self):
    790         if not checkPermission('waeup.clearStudentFinancially', self.context):
    791             return ()
    792         return (_('Date, Checking Officer Signature'),
    793                 _('Date, Approving Officer Signature'),
    794                 )
  • main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py

    r14136 r14165  
    867867        self.assertTrue('mrslecturer - waeup.aaue.students.browser.CustomEditScoresPage - '
    868868                        'E1000000 100/COURSE1 score updated (None)' in logcontent)
     869
     870
     871    def test_student_view_transcript(self):
     872        # Student cant login if their password is not set
     873        IWorkflowInfo(self.student).fireTransition('admit')
     874        self.browser.open(self.login_path)
     875        self.browser.getControl(name="form.login").value = self.student_id
     876        self.browser.getControl(name="form.password").value = 'spwd'
     877        self.browser.getControl("Login").click()
     878        self.assertMatches(
     879            '...You logged in...', self.browser.contents)
     880        # Students can view the transcript
     881        self.browser.open(self.studycourse_path)
     882        self.browser.getLink("Transcript").click()
     883        self.browser.getLink("Academic Transcript").click()
     884        self.assertEqual(self.browser.headers['Status'], '200 Ok')
     885        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
Note: See TracChangeset for help on using the changeset viewer.