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

« back to all changes in this revision

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

  • Committer: William Grant
  • Date: 2009-06-29 06:43:20 UTC
  • Revision ID: grantw@unimelb.edu.au-20090629064320-vrahlocbh0d5852w
Allow admins to set the admin flag with ivle-adduser (issue #151).

ivle-makeuser was also renamed to ivle-adduser.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
    template = "subject.html"
17
17
 
 
18
    def __init__(self, req, subject, year, semester):
 
19
 
 
20
        self.context = req.store.find(Offering,
 
21
                Offering.subject_id == Subject.id,
 
22
                Subject.short_name == unicode(subject),
 
23
                Offering.semester_id == Semester.id,
 
24
                Semester.year == unicode(year),
 
25
                Semester.semester == unicode(semester)).one()
 
26
 
 
27
        if self.context is None:
 
28
            raise NotFound()
 
29
 
18
30
    def new_project_url(self, projectset):
19
31
        return "/api/subjects/" + str(self.context.subject.id) + "/" +\
20
32
               self.context.semester.year + "/" +\