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

« back to all changes in this revision

Viewing changes to ivle/database.py

  • Committer: Matt Giuca
  • Date: 2010-02-25 09:03:17 UTC
  • Revision ID: matt.giuca@gmail.com-20100225090317-ajrh2no4j77shc0p
Offering page: Display the worksheet cutoff to students, if there is one.

Show diffs side-by-side

added added

removed removed

Lines of Context:
429
429
        # XXX: Respect extensions.
430
430
        return self.projects.find(Project.deadline > datetime.datetime.now())
431
431
 
 
432
    def has_worksheet_cutoff_passed(self, user):
 
433
        """Check whether the worksheet cutoff has passed.
 
434
        A user is required, in case we support extensions.
 
435
        """
 
436
        if self.worksheet_cutoff is None:
 
437
            return False
 
438
        else:
 
439
            return self.worksheet_cutoff < datetime.datetime.now()
 
440
 
432
441
    def clone_worksheets(self, source):
433
442
        """Clone all worksheets from the specified source to this offering."""
434
443
        import ivle.worksheet.utils