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

« back to all changes in this revision

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

  • Committer: Nick Chadwick
  • Date: 2009-03-17 01:42:19 UTC
  • mto: This revision was merged to the branch mainline in revision 1162.
  • Revision ID: chadnickbok@gmail.com-20090317014219-e0dvzakaxw58b71p
Fixed a problem with exercise editor, which wasn't editing or adding
variables properly.

Fixed the final issues from the merge-proposal, which make deleting
exercises use appropriate functions, which now raise exceptions
if they fail.

Show diffs side-by-side

added added

removed removed

Lines of Context:
542
542
        # the exercise cannot be deleted
543
543
        if req.method == 'POST':
544
544
            ctx['method'] = 'POST'
545
 
            ctx['deleted'] = self.context.delete(req.store)
 
545
            try:
 
546
                self.context.delete()
 
547
                ctx['deleted'] = True
 
548
            except:
 
549
                ctx['deleted'] = False
546
550
 
547
551
        # If get, display a delete confirmation page
548
552
        else: