~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-25 06:17:41 UTC
  • mto: This revision was merged to the branch mainline in revision 1722.
  • Revision ID: grantw@unimelb.edu.au-20100225061741-19jre7q6zv52za1l
Abstract worksheet and exercise data setting.

Show diffs side-by-side

added added

removed removed

Lines of Context:
945
945
        else:
946
946
            return None
947
947
 
 
948
    def set_description(self, description):
 
949
        self.description = description
 
950
 
948
951
    def delete(self):
949
952
        """Deletes the exercise, providing it has no associated worksheets."""
950
953
        if (self.worksheet_exercises.count() > 0):
1029
1032
        else:
1030
1033
            return self.data
1031
1034
 
 
1035
    def set_data(self, data):
 
1036
        self.data = data
 
1037
 
1032
1038
    def delete(self):
1033
1039
        """Deletes the worksheet, provided it has no attempts on any exercises.
1034
1040