228
def present_problem(req, subject, problemsrc, problemid):
225
229
"""Open a problem file, and write out the problem to the request in HTML.
227
231
problemsrc: "src" of the problem file. A path relative to the top-level
228
232
subjects base directory, as configured in conf.
231
236
# First normalise the path
232
237
problemsrc = os.path.normpath(problemsrc)
233
238
# Now if it begins with ".." or separator, then it's illegal