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

« back to all changes in this revision

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

  • Committer: Nick Chadwick
  • Date: 2009-03-09 01:15:33 UTC
  • mto: This revision was merged to the branch mainline in revision 1162.
  • Revision ID: chadnickbok@gmail.com-20090309011533-dw59mhauiysji3nt
Fixed a slight oversight, which meant there was no way to add a new
exercise through the ui.

In addition, entire exercises can now be deleted, providing they have
never been linked to a worksheet.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
    
47
47
        new_exercise = Exercise()
48
48
        new_exercise.id = unicode(identifier)
49
 
        new_exercise.description = description
50
 
        new_exercise.partial = partial
51
 
        new_exercise.solution = solution
52
 
        new_exercise.include = include
53
 
        new_exercise.num_rows = num_rows
 
49
        new_exercise.name = unicode(name)
 
50
        new_exercise.description = unicode(description)
 
51
        new_exercise.partial = unicode(partial)
 
52
        new_exercise.solution = unicode(solution)
 
53
        new_exercise.include = unicode(include)
 
54
        new_exercise.num_rows = int(num_rows)
54
55
        
55
56
        req.store.add(new_exercise)
56
57