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

« back to all changes in this revision

Viewing changes to ivle/webapp/tutorial/service.py

  • Committer: Matt Giuca
  • Date: 2010-02-12 03:33:38 UTC
  • Revision ID: matt.giuca@gmail.com-20100212033338-z5sc1gh7ea3y30vx
Tutors can now (once again) edit worksheets.
database: Created a new capability, 'edit_worksheets', which is set for tutors
    and above.
    The 'edit' capability for worksheets is now derived from the
    'edit_worksheets' capability in the offering, rather than 'edit'.
All checks to do with creating or editing worksheets (in general, not specific
ones) check 'edit_worksheets'. Checks specific to a worksheet still check the
'edit' capability, on the worksheet itself.

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
class WorksheetsRESTView(JSONRESTView):
119
119
    """View used to update and create Worksheets."""
120
120
 
121
 
    @named_operation('edit')
 
121
    @named_operation('edit_worksheets')
122
122
    def move_up(self, req, worksheetid):
123
123
        """Takes a list of worksheet-seq_no pairs and updates their 
124
124
        corresponding Worksheet objects to match."""
139
139
        
140
140
        return {'result': 'ok'}
141
141
 
142
 
    @named_operation('edit')
 
142
    @named_operation('edit_worksheets')
143
143
    def move_down(self, req, worksheetid):
144
144
        """Takes a list of worksheet-seq_no pairs and updates their 
145
145
        corresponding Worksheet objects to match."""