Ignore:
Timestamp:
16 Jun 2015, 11:28:07 (10 years ago)
Author:
Henrik Bettermann
Message:

Rename student views which are not layout-aware and thus not pages.

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

Legend:

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

    r13050 r13055  
    3636from waeup.kofa.browser.layout import (
    3737    KofaPage, KofaEditFormPage, KofaAddFormPage, KofaDisplayFormPage,
    38     KofaForm, NullValidator,
    39     jsaction, action, UtilityView)
     38    NullValidator, jsaction, action, UtilityView)
    4039from waeup.kofa.browser.breadcrumbs import Breadcrumb
    41 from waeup.kofa.browser.pages import ContactAdminForm, ExportCSVView, doll_up
     40from waeup.kofa.browser.pages import ContactAdminFormPage, ExportCSVView, doll_up
    4241from waeup.kofa.browser.interfaces import ICaptchaManager
    4342from waeup.kofa.hostels.hostel import NOT_OCCUPIED
     
    445444        return form_fields
    446445
    447 class ContactStudentForm(ContactAdminForm):
     446class ContactStudentFormPage(ContactAdminFormPage):
    448447    grok.context(IStudent)
    449448    grok.name('contactstudent')
     
    453452
    454453    def update(self, subject=u'', body=u''):
    455         super(ContactStudentForm, self).update()
     454        super(ContactStudentFormPage, self).update()
    456455        self.form_fields.get('subject').field.default = subject
    457456        self.form_fields.get('body').field.default = body
     
    483482        return
    484483
    485 class ExportPDFAdmissionSlipPage(UtilityView, grok.View):
     484class ExportPDFAdmissionSlip(UtilityView, grok.View):
    486485    """Deliver a PDF Admission slip.
    487486    """
     
    586585        return
    587586
    588 class StudentActivatePage(UtilityView, grok.View):
     587class StudentActivateView(UtilityView, grok.View):
    589588    """ Activate student account
    590589    """
     
    605604        return
    606605
    607 class StudentDeactivatePage(UtilityView, grok.View):
     606class StudentDeactivateView(UtilityView, grok.View):
    608607    """ Deactivate student account
    609608    """
     
    748747        return
    749748
    750 class StudentClearPage(UtilityView, grok.View):
     749class StudentClearView(UtilityView, grok.View):
    751750    """ Clear student by clearance officer
    752751    """
     
    10341033
    10351034class StudentTranscriptRequestPage(KofaPage):
    1036     """ Page to transcript by student
     1035    """ Page to request transcript by student
    10371036    """
    10381037    grok.context(IStudent)
     
    11981197            'a':self.context.student.display_fullname})
    11991198
    1200 class ExportPDFTranscriptPage(UtilityView, grok.View):
     1199class ExportPDFTranscriptSlip(UtilityView, grok.View):
    12011200    """Deliver a PDF slip of the context.
    12021201    """
     
    12171216            self.redirect(self.url(self.context))
    12181217            return
    1219         super(ExportPDFTranscriptPage, self).update()
     1218        super(ExportPDFTranscriptSlip, self).update()
    12201219        self.semester_dict = getUtility(IKofaUtils).SEMESTER_DICT
    12211220        self.level_dict = level_dict(self.context)
     
    13471346            'b':level_title})
    13481347
    1349 class ExportPDFCourseRegistrationSlipPage(UtilityView, grok.View):
     1348class ExportPDFCourseRegistrationSlip(UtilityView, grok.View):
    13501349    """Deliver a PDF slip of the context.
    13511350    """
     
    15051504        return
    15061505
    1507 class ValidateCoursesPage(UtilityView, grok.View):
     1506class ValidateCoursesView(UtilityView, grok.View):
    15081507    """ Validate course list by course adviser
    15091508    """
     
    15311530        return
    15321531
    1533 class RejectCoursesPage(UtilityView, grok.View):
     1532class RejectCoursesView(UtilityView, grok.View):
    15341533    """ Reject course list by course adviser
    15351534    """
     
    18451844            'b':self.context.p_id})
    18461845
    1847 class OnlinePaymentApprovePage(UtilityView, grok.View):
     1846class OnlinePaymentApproveView(UtilityView, grok.View):
    18481847    """ Callback view
    18491848    """
     
    18701869        return
    18711870
    1872 class OnlinePaymentFakeApprovePage(OnlinePaymentApprovePage):
     1871class OnlinePaymentFakeApproveView(OnlinePaymentApproveView):
    18731872    """ Approval view for students.
    18741873
     
    18761875    must be neutralized in custom pages!
    18771876    """
    1878 
    18791877    grok.name('fake_approve')
    18801878    grok.require('waeup.payStudent')
    18811879
    1882 class ExportPDFPaymentSlipPage(UtilityView, grok.View):
     1880class ExportPDFPaymentSlip(UtilityView, grok.View):
    18831881    """Deliver a PDF slip of the context.
    18841882    """
     
    21462144            mapping = {'a':self.context.getSessionString()})
    21472145
    2148 class ExportPDFBedTicketSlipPage(UtilityView, grok.View):
     2146class ExportPDFBedTicketSlip(UtilityView, grok.View):
    21492147    """Deliver a PDF slip of the context.
    21502148    """
     
    21842182            omit_fields=self.omit_fields)
    21852183
    2186 class BedTicketRelocationPage(UtilityView, grok.View):
     2184class BedTicketRelocationView(UtilityView, grok.View):
    21872185    """ Callback view
    21882186    """
     
    30333031        return list(set(hitlist))
    30343032
    3035 class ClearAllStudentsInDepartmentPage(UtilityView, grok.View):
     3033class ClearAllStudentsInDepartmentView(UtilityView, grok.View):
    30363034    """ Clear all students of a department in state 'clearance requested'.
    30373035    """
  • main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py

    r13050 r13055  
    944944        logcontent = open(logfile).read()
    945945        self.assertTrue(
    946             'zope.mgr - students.browser.OnlinePaymentApprovePage '
     946            'zope.mgr - students.browser.OnlinePaymentApproveView '
    947947            '- K1000000 - schoolfee payment approved'
    948948            in logcontent)
     
    10791079        logcontent = open(logfile).read()
    10801080        self.assertTrue(
    1081             'zope.mgr - students.browser.OnlinePaymentApprovePage '
     1081            'zope.mgr - students.browser.OnlinePaymentApproveView '
    10821082            '- K1000000 - schoolfee payment approved'
    10831083            in logcontent)
     
    12461246        # Relocation is properly logged
    12471247        logcontent = open(logfile).read()
    1248         self.assertTrue('zope.mgr - students.browser.BedTicketRelocationPage '
     1248        self.assertTrue('zope.mgr - students.browser.BedTicketRelocationView '
    12491249            '- K1000000 - relocated: hall-1_A_101_B' in logcontent)
    12501250        # The payment object still shows the original payment item
     
    19421942            self.app['datacenter'].storage, 'logs', 'students.log')
    19431943        logcontent = open(logfile).read()
    1944         self.assertTrue('zope.mgr - students.browser.StudentDeactivatePage - '
     1944        self.assertTrue('zope.mgr - students.browser.StudentDeactivateView - '
    19451945                        'K1000000 - account deactivated' in logcontent)
    1946         self.assertTrue('zope.mgr - students.browser.StudentActivatePage - '
     1946        self.assertTrue('zope.mgr - students.browser.StudentActivateView - '
    19471947                        'K1000000 - account activated' in logcontent)
    19481948
Note: See TracChangeset for help on using the changeset viewer.