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

« back to all changes in this revision

Viewing changes to www/apps/tutorialservice/__init__.py

  • Committer: drtomc
  • Date: 2008-02-04 04:29:12 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:401
tutorialservice: Fixed "subjects" directory being searched for problem files, now looks in "problems". (A hang over from an earlier change to split them up).
This fixes the issue of problem submissions not working.

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
    if problem.startswith("..") or problem.startswith(os.sep):
79
79
        problemfile = None
80
80
    else:
81
 
        problemfile = os.path.join(conf.subjects_base, problem)
 
81
        problemfile = os.path.join(conf.problems_base, problem)
82
82
 
83
83
    try:
84
84
        problemfile = open(problemfile)
85
85
    except (TypeError, IOError):    # TypeError if problemfile == None
86
 
        raise Exception("cant open problem file: %s" % problemfile)
87
86
        req.throw_error(req.HTTP_NOT_FOUND)
88
87
 
89
88
    # Parse the file into a problem object using the test suite