~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/webapp/admin/subject.py

  • Committer: William Grant
  • Date: 2010-02-15 09:15:14 UTC
  • Revision ID: grantw@unimelb.edu.au-20100215091514-gexaupx4e6ref0tm
Sort subjects and semesters sanely in the offering new form too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
429
429
 
430
430
    def populate(self, req, ctx):
431
431
        super(OfferingNew, self).populate(req, ctx)
432
 
        ctx['subjects'] = req.store.find(Subject)
433
 
        ctx['semesters'] = req.store.find(Semester)
 
432
        ctx['subjects'] = req.store.find(Subject).order_by(Subject.name)
 
433
        ctx['semesters'] = req.store.find(Semester).order_by(
 
434
            Semester.year, Semester.semester)
434
435
 
435
436
    def populate_state(self, state):
436
437
        state.existing_offering = None