~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: 2009-12-01 04:27:58 UTC
  • mfrom: (1164.2.46 sphinx-docs)
  • Revision ID: matt.giuca@gmail.com-20091201042758-wuxd9bdec00c283i
Merged sphinx-docs branch. This adds Sphinx documentation for the entire IVLE system (for system administrators and developers), and removes all of our random old document files (all either irrelevant, or moved into the Sphinx docs nicely). Currently incomplete, but ready to merge.

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
27
26
import ivle.console
28
27
import ivle.database
29
28
from ivle.database import Exercise, ExerciseAttempt, ExerciseSave, Worksheet, \
30
29
                          Offering, Subject, Semester, WorksheetExercise
31
30
import ivle.worksheet.utils
32
 
import ivle.conf
33
31
import ivle.webapp.tutorial.test
34
32
from ivle.webapp.base.rest import (JSONRESTView, named_operation,
35
33
                                   require_permission)
86
84
            raise NotFound()
87
85
 
88
86
        # Start a console to run the tests on
89
 
        jail_path = os.path.join(ivle.conf.jail_base, req.user.login)
 
87
        jail_path = os.path.join(req.config['paths']['jails']['mounts'],
 
88
                                 req.user.login)
90
89
        working_dir = os.path.join("/home", req.user.login)
91
 
        cons = ivle.console.Console(req.user.unixid, jail_path, working_dir)
 
90
        cons = ivle.console.Console(req.config, req.user.unixid, jail_path,
 
91
                                    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(