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

« back to all changes in this revision

Viewing changes to ivle/database.py

  • Committer: William Grant
  • Date: 2010-02-15 08:39:41 UTC
  • Revision ID: grantw@unimelb.edu.au-20100215083941-60xqwbmhad360dmq
Add semester edit UI.

Show diffs side-by-side

added added

removed removed

Lines of Context:
425
425
        # XXX: Respect extensions.
426
426
        return self.projects.find(Project.deadline > datetime.datetime.now())
427
427
 
428
 
    def clone_worksheets(self, source):
429
 
        """Clone all worksheets from the specified source to this offering."""
430
 
        import ivle.worksheet.utils
431
 
        for worksheet in source.worksheets:
432
 
            newws = Worksheet()
433
 
            newws.seq_no = worksheet.seq_no
434
 
            newws.identifier = worksheet.identifier
435
 
            newws.name = worksheet.name
436
 
            newws.assessable = worksheet.assessable
437
 
            newws.data = worksheet.data
438
 
            newws.format = worksheet.format
439
 
            newws.offering = self
440
 
            Store.of(self).add(newws)
441
 
            ivle.worksheet.utils.update_exerciselist(newws)
442
 
 
443
 
 
444
428
class Enrolment(Storm):
445
429
    """An enrolment of a user in an offering.
446
430