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

« back to all changes in this revision

Viewing changes to ivle/webapp/admin/projectservice.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:
29
29
    
30
30
    Add new, delete, edit functionality is given here."""
31
31
    template = "templates/projectset_fragment.html"
 
32
    
 
33
    def __init__(self, req, subject, year, semester, projectset):
 
34
        self.context = req.store.find(ProjectSet,
 
35
            ProjectSet.id == int(projectset),
 
36
            ProjectSet.offering_id == Offering.id,
 
37
            Offering.subject_id == Subject.id,
 
38
            Subject.short_name == unicode(subject),
 
39
            Offering.semester_id == Semester.id,
 
40
            Semester.year == unicode(year),
 
41
            Semester.semester == unicode(semester)).one()
 
42
        
 
43
        if self.context is None:
 
44
            raise NotFound()
32
45
 
33
46
    def _project_url(self, project):
34
47
        return "/subjects/%s/%s/%s/+projects/%s" % \