Ignore:
Timestamp:
9 Oct 2019, 09:27:16 (5 years ago)
Author:
Henrik Bettermann
Message:

Make max file size customizable.

Location:
main/waeup.kofa/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/CHANGES.txt

    r15628 r15652  
    441.6.1.dev0 (unreleased)
    55=======================
     6
     7* Make max file size customizable.
     8
     9* Add `score_editing_disabled` switch at course level.
    610
    711* Take `DELETION_MARKER` into consideration when updating passwords.
  • main/waeup.kofa/trunk/src/waeup/kofa/students/fileviewlets.py

    r15163 r15652  
    6262    grok.view(StudentClearanceManageFormPage)
    6363    grok.require('waeup.uploadStudentFile')
     64
     65    @property
     66    def mus(self):
     67        students_utils = getUtility(IStudentsUtils)
     68        return 1024 * students_utils.MAX_KB
    6469
    6570    @property
     
    133138    label = _(u'Birth Certificate')
    134139    title = _(u'Birth Certificate Scan')
    135     mus = 1024 * 250
    136140    download_name = u'birth_certificate'
    137141    tab_redirect = '#tab2-top'
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r15622 r15652  
    489489            else:
    490490                return _(u'No bed allocated.'), None
    491         elif category == 'transcript':
    492             amount = academic_session.transcript_fee
    493         elif category == 'transfer':
    494             amount = academic_session.transfer_fee
    495         elif category == 'late_registration':
    496             amount = academic_session.late_registration_fee
     491        else:
     492            fee_name = category + '_fee'
     493            amount = getattr(academic_session, fee_name, 0.0)
    497494        if amount in (0.0, None):
    498495            return _('Amount could not be determined.'), None
     
    11401137            'studentpayments', 'bedtickets')
    11411138
     1139    # Maximum size of upload files in kB
     1140    MAX_KB = 250
     1141
    11421142    #: A prefix used when generating new student ids. Each student id will
    11431143    #: start with this string. The default is 'K' for Kofa.
Note: See TracChangeset for help on using the changeset viewer.