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

« back to all changes in this revision

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

  • Committer: Matt Giuca
  • Date: 2009-05-13 03:18:42 UTC
  • mto: This revision was merged to the branch mainline in revision 1247.
  • Revision ID: matt.giuca@gmail.com-20090513031842-v24d9dvmog6adp2c
ivle-fetchsubmissions: Added -v option to print out submissions to stdout.

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 + "/" +\