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

« back to all changes in this revision

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

  • Committer: William Grant
  • Date: 2009-04-28 05:06:00 UTC
  • Revision ID: grantw@unimelb.edu.au-20090428050600-hogd9d6wo7ksyqy8
ivle.database.get_store() now takes a configuration object.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
import datetime
24
24
import genshi
25
25
 
 
26
import ivle.util
26
27
import ivle.console
27
28
import ivle.database
28
29
from ivle.database import Exercise, ExerciseAttempt, ExerciseSave, Worksheet, \
29
30
                          Offering, Subject, Semester, WorksheetExercise
30
31
import ivle.worksheet.utils
 
32
import ivle.conf
31
33
import ivle.webapp.tutorial.test
32
34
from ivle.webapp.base.rest import (JSONRESTView, named_operation,
33
35
                                   require_permission)
84
86
            raise NotFound()
85
87
 
86
88
        # Start a console to run the tests on
87
 
        jail_path = os.path.join(req.config['paths']['jails']['mounts'],
88
 
                                 req.user.login)
 
89
        jail_path = os.path.join(ivle.conf.jail_base, req.user.login)
89
90
        working_dir = os.path.join("/home", req.user.login)
90
 
        cons = ivle.console.Console(req.config, req.user.unixid, jail_path,
91
 
                                    working_dir)
 
91
        cons = ivle.console.Console(req.user.unixid, jail_path, working_dir)
92
92
 
93
93
        # Parse the file into a exercise object using the test suite
94
94
        exercise_obj = ivle.webapp.tutorial.test.parse_exercise_file(