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

« back to all changes in this revision

Viewing changes to ivle/database.py

  • Committer: William Grant
  • Date: 2009-12-09 01:17:36 UTC
  • mfrom: (1375.1.4 trunk)
  • Revision ID: grantw@unimelb.edu.au-20091209011736-rnzmusevrvg12vjn
Merge trainchanges.

Show diffs side-by-side

added added

removed removed

Lines of Context:
465
465
        return self.offering.get_permissions(user)
466
466
 
467
467
    @property
 
468
    def is_group(self):
 
469
        return self.max_students_per_group is not None
 
470
 
 
471
    @property
468
472
    def assigned(self):
469
473
        """Get the entities (groups or users) assigned to submit this project.
470
474
 
471
475
        This will be a Storm ResultSet.
472
476
        """
473
477
        #If its a solo project, return everyone in offering
474
 
        if self.max_students_per_group is None:
 
478
        if self.is_group:
 
479
            return self.project_groups
 
480
        else:
475
481
            return self.offering.students
476
 
        else:
477
 
            return self.project_groups
478
482
 
479
483
class Project(Storm):
480
484
    """A student project for which submissions can be made."""