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

« back to all changes in this revision

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

  • Committer: William Grant
  • Date: 2009-12-10 02:38:01 UTC
  • mfrom: (1394.2.15 test-exercise)
  • Revision ID: grantw@unimelb.edu.au-20091210023801-mmbkfawdwbmvmoli
Add an ExerciseView, allowing testing of an exercise before adding it to a worksheet. Also some exercise editor UI tweaks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
from ivle.webapp.base.rest import (JSONRESTView, named_operation,
25
25
                                   require_permission)
26
26
from ivle.webapp.errors import NotFound, BadRequest
 
27
from ivle.worksheet.utils import test_exercise_submission
27
28
 
28
29
 
29
30
class ExercisesRESTView(JSONRESTView):
310
311
        test_part.delete()
311
312
        
312
313
        return {'result': 'ok'}
 
314
 
 
315
    @named_operation(u'edit')
 
316
    def test(self, req, code):
 
317
        return test_exercise_submission(req.config, req.user, self.context, code)