~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: 2009-02-27 07:12:29 UTC
  • Revision ID: grantw@unimelb.edu.au-20090227071229-zzjx7fpxr7b72wqt
SubjectsView now tells users if they have no enrolments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
    tab = 'subjects'
42
42
 
43
43
    def authorize(self, req):
44
 
        if req.user is None:
45
 
            return False
46
 
        return req.user.enrolments.count() > 0
 
44
        return req.user is not None
47
45
 
48
46
    def populate(self, req, ctx):
49
47
        ctx['semesters'] = []