Ignore:
Timestamp:
24 May 2019, 09:11:40 (6 years ago)
Author:
Henrik Bettermann
Message:

Implement course result validation workflow for lecturers.

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

Legend:

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

    r15287 r15422  
    4444from zope.password.interfaces import IPasswordManager
    4545from waeup.kofa.utils.helpers import html2dict
     46from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget
    4647from waeup.kofa.browser.layout import (
    4748    KofaPage, KofaFormPage, KofaEditFormPage, KofaAddFormPage,
     
    24842485    pnav = 1
    24852486    form_fields = grok.AutoFields(ICourse)
     2487    form_fields[
     2488        'results_validation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
    24862489
    24872490    @property
     
    25052508
    25062509    form_fields = grok.AutoFields(ICourse).omit('code')
     2510    form_fields['results_validated_by'].for_display = True
     2511    form_fields['results_validation_date'].for_display = True
     2512    #form_fields['results_validation_session'].for_display = True
     2513    form_fields[
     2514        'results_validation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
    25072515
    25082516    @action(_('Save'), style='primary')
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py

    r15163 r15422  
    3131    DepartmentPage, CoursePage, CertificatePage, CertificateCoursePage,
    3232    UsersContainerPage, UserManageFormPage, DatacenterImportStep1)
     33from waeup.kofa.students.browser import EditScoresPage
    3334from waeup.kofa.interfaces import MessageFactory as _
    3435from waeup.kofa.interfaces import (
     
    615616        return _('Update session ${a} scores', mapping = {'a':st})
    616617
     618class DownloadTicketOverviewActionButton(ManageActionButton):
     619    """ 'Download ticket overview' button for courses.
     620    """
     621    grok.context(ICourse)
     622    grok.view(CoursePage)
     623    grok.name('coursetickets')
     624    grok.require('waeup.showStudents')
     625    icon = 'actionicon_pdf.png'
     626    text = _('Download course tickets overview')
     627    target = 'coursetickets.pdf'
     628    grok.order(5)
     629
     630class DownloadCSVFileActionButton(ManageActionButton):
     631    """ 'Download csv file' button for courses.
     632    """
     633    grok.context(ICourse)
     634    grok.view(EditScoresPage)
     635    grok.name('downloadcsv')
     636    grok.require('waeup.editScores')
     637    icon = 'actionicon_down.png'
     638    text = _('Download csv file (editable scores only)')
     639    target = 'download_scores'
     640    grok.order(7)
    617641
    618642class ManageCertificateActionButton(ManageActionButton):
Note: See TracChangeset for help on using the changeset viewer.