Changeset 16458 for main


Ignore:
Timestamp:
14 Apr 2021, 06:07:09 (4 years ago)
Author:
Henrik Bettermann
Message:

Only ug_ft students must upload picture.

Location:
main/waeup.uniben/trunk/src/waeup/uniben/students
Files:
3 edited

Legend:

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

    r16457 r16458  
    146146    def dataNotComplete(self):
    147147        store = getUtility(IExtFileStore)
    148         if not store.getFileByContext(self.context, attr=u'passport.jpg'):
     148        if self.context.entry_mode in ('ug_ft', 'de_ft') and \
     149            not store.getFileByContext(self.context, attr=u'passport.jpg'):
    149150            return _('No red background passport picture uploaded.')
    150151        if not store.getFileByContext(self.context, attr=u'birth_certificate.jpg'):
     
    156157        if not store.getFileByContext(self.context, attr=u'fst_sit_scan.jpg'):
    157158            return _('No first sitting result uploaded.')
    158         #if not store.getFileByContext(self.context, attr=u'scd_sit_scan.jpg'):
    159         #    return _('No second sitting result uploaded.')
    160159        if not store.getFileByContext(self.context, attr=u'secr_cults.jpg'):
    161160            return _('No affidavit of non-membership of secret cults uploaded.')
     
    782781            emit_lock_message(self)
    783782            return
     783        if self.context.entry_mode not in ('ug_ft', 'de_ft'):
     784            emit_lock_message(self)
     785            return
    784786        PORTRAIT_CHANGE_STATES = getUtility(IStudentsUtils).PORTRAIT_CHANGE_STATES
    785787        if self.context.state not in PORTRAIT_CHANGE_STATES:
  • main/waeup.uniben/trunk/src/waeup/uniben/students/tests/test_browser.py

    r16456 r16458  
    144144        IWorkflowState(self.student).setState('clearance started')
    145145        self.student.nationality = u'NG'
     146        self.student['studycourse'].entry_mode = 'ug_ft'
    146147        file_store = getUtility(IExtFileStore)
    147148        self.browser.open(self.login_path)
  • main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py

    r16457 r16458  
    5252        if self.context.entry_session != 2020:
    5353            return ''
     54        if self.context.entry_mode not in ('ug_ft', 'de_ft'):
     55            return ''
    5456        PORTRAIT_CHANGE_STATES = getUtility(IStudentsUtils).PORTRAIT_CHANGE_STATES
    5557        if self.context.state not in PORTRAIT_CHANGE_STATES:
Note: See TracChangeset for help on using the changeset viewer.