Changeset 14371


Ignore:
Timestamp:
5 Jan 2017, 17:42:19 (8 years ago)
Author:
Henrik Bettermann
Message:

Hide Admitted Course of Study from applicants.

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

Legend:

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

    r14363 r14371  
    263263        return form_fields
    264264
     265    def getCourseAdmitted(self):
     266        """Return link, title and code in html format to the certificate
     267           admitted.
     268        """
     269        if self.layout.isApplicant():
     270            return ''
     271        course_admitted = self.context.course_admitted
     272        if getattr(course_admitted, '__parent__',None):
     273            url = self.url(course_admitted)
     274            title = course_admitted.title
     275            code = course_admitted.code
     276            return '<a href="%s">%s - %s</a>' %(url,code,title)
     277        return ''
     278
    265279class CustomPDFActionButton(PDFActionButton):
    266280
  • main/waeup.aaue/trunk/src/waeup/aaue/applicants/tests/test_browser.py

    r14308 r14371  
    248248        self.assertEqual(applicant.values()[0].amount_auth, 100.0)
    249249        return
     250
     251    def test_view_course_admitted(self):
     252        self.applicant.course_admitted = self.certificate
     253        self.login()
     254        self.assertFalse('Admitted Course of Study' in self.browser.contents)
     255        return
Note: See TracChangeset for help on using the changeset viewer.