~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:10:04 UTC
  • Revision ID: grantw@unimelb.edu.au-20100215091004-to0sas4feknvi7ay
Sort subjects and semesters sanely in the offering forms.

Show diffs side-by-side

added added

removed removed

Lines of Context:
390
390
 
391
391
    def populate(self, req, ctx):
392
392
        super(OfferingEdit, self).populate(req, ctx)
393
 
        ctx['subjects'] = req.store.find(Subject)
394
 
        ctx['semesters'] = req.store.find(Semester)
 
393
        ctx['subjects'] = req.store.find(Subject).order_by(Subject.name)
 
394
        ctx['semesters'] = req.store.find(Semester).order_by(
 
395
            Semester.year, Semester.semester)
395
396
 
396
397
    def populate_state(self, state):
397
398
        state.existing_offering = self.context