Ignore:
Timestamp:
21 May 2019, 09:16:47 (6 years ago)
Author:
Henrik Bettermann
Message:

Add graduated students filter.

Inform students_catalog after setting workflow state.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/hostel.py

    r15305 r15417  
    260260                          'accommodation'][str(accommodation_session)]
    261261        except KeyError:
     262            self.owner = NOT_OCCUPIED
     263            sh, sex, bt = self.bed_type.split('_')
     264            bt = u'%s_%s_reserved' % (sh, sex)
     265            self.bed_type = bt
     266            notify(grok.ObjectModifiedEvent(self))
    262267            return
    263268        if bedticket.maint_payment_made:
  • main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py

    r15416 r15417  
    234234                value = row['state']
    235235                IWorkflowState(obj).setState(value)
     236                notify(grok.ObjectModifiedEvent(obj))
    236237                msg = _("State '${a}' set", mapping = {'a':value})
    237238                history = IObjectHistory(obj)
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r15405 r15417  
    263263        form = self.request.form
    264264        self.hitlist = []
    265         if form.get('searchtype', None) in ('suspended', TRANSREQ, TRANSVAL):
     265        if form.get('searchtype', None) in (
     266            'suspended', TRANSREQ, TRANSVAL, GRADUATED):
    266267            self.searchtype = form['searchtype']
    267268            self.searchterm = None
     
    305306        form = self.request.form
    306307        self.hitlist = []
    307         if form.get('searchtype', None) in ('suspended', TRANSREQ, TRANSVAL):
     308        if form.get('searchtype', None) in (
     309            'suspended', TRANSREQ, TRANSVAL, GRADUATED):
    308310            self.searchtype = form['searchtype']
    309311            self.searchterm = None
     
    374376        self.context.addStudent(student)
    375377        IWorkflowState(student).setState(GRADUATED)
     378        notify(grok.ObjectModifiedEvent(student))
    376379        self.flash(_('Student record created.'))
    377380        self.redirect(self.url(self.context[student.student_id], 'index'))
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/containermanagepage.pt

    r15163 r15417  
    2222      <option i18n:translate="" value="transcript validated">
    2323        in state 'transcript validated' (search term omitted)
     24      </option>
     25      <option i18n:translate="" value="graduated">
     26        in state 'graduated' (search term omitted)
    2427      </option>
    2528    </select>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/containerpage.pt

    r15163 r15417  
    2222      <option i18n:translate="" value="transcript validated">
    2323        in state 'transcript validated' (search term omitted)
     24      </option>
     25      <option i18n:translate="" value="graduated">
     26        in state 'graduated' (search term omitted)
    2427      </option>
    2528    </select>
  • main/waeup.kofa/trunk/src/waeup/kofa/students/catalog.py

    r15163 r15417  
    2929from waeup.kofa.students.interfaces import IStudent, ICourseTicket
    3030from waeup.kofa.university.vocabularies import course_levels
    31 from waeup.kofa.students.workflow import (TRANSREQ, TRANSVAL)
     31from waeup.kofa.students.workflow import TRANSREQ, TRANSVAL, GRADUATED
    3232
    3333class StudentsCatalog(grok.Indexes):
     
    8989                hitlist.append(StudentQueryResultItem(student, view=view))
    9090        return hitlist
    91     elif searchtype in (TRANSREQ, TRANSVAL):
     91    elif searchtype in (TRANSREQ, TRANSVAL, GRADUATED):
    9292        cat = queryUtility(ICatalog, name='students_catalog')
    9393        results = cat.searchResults(state=(searchtype, searchtype))
Note: See TracChangeset for help on using the changeset viewer.