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

« back to all changes in this revision

Viewing changes to ivle/db.py

  • Committer: William Grant
  • Date: 2009-01-20 01:33:41 UTC
  • mto: This revision was merged to the branch mainline in revision 1090.
  • Revision ID: grantw@unimelb.edu.au-20090120013341-2f32aruefwotgce0
ivle.database.Offering: Add project_sets referenceset.
www/apps/userservice: Replace usage of ivle.db.get_projectsets_by_offering
   with Storm calls.
ivle.db.get_projectsets_by_offering: Kill. Unused.

Show diffs side-by-side

added added

removed removed

Lines of Context:
498
498
            return query
499
499
        return self.db.query(query).dictresult()
500
500
 
501
 
    def get_projectsets_by_offering(self, offeringid, dry=False):
502
 
        """Returns all the projectsets in a particular offering"""
503
 
        query = """\
504
 
SELECT projectsetid, max_students_per_group
505
 
FROM project_set
506
 
WHERE project_set.offeringid = %d;"""%offeringid
507
 
        if dry:
508
 
            return query
509
 
        return self.db.query(query).dictresult()
510
 
 
511
501
    def get_groups_by_projectset(self, projectsetid, dry=False):
512
502
        """Returns all the groups that are in a particular projectset"""
513
503
        query = """\