160
162
# Now all the errors are out the way, we can begin writing
161
163
req.title = "Tutorial - %s" % subject
162
164
req.write_html_head_foot = True
163
166
req.write("<h1>IVLE Tutorials - %s</h1>\n" % cgi.escape(subject))
164
167
req.write("<h2>Worksheets</h2>\n<ul>\n")
165
168
for worksheet in worksheets:
166
169
req.write(' <li><a href="%s">%s</a></li>\n'
167
170
% (urllib.quote(worksheet.id), cgi.escape(worksheet.name)))
170
174
def handle_worksheet(req, subject, worksheet):
171
175
# Subject and worksheet names must be valid identifiers