1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/">
<head>
<title>${worksheet.name} - ${subject.name}</title>
<!-- These let the javascript know which worksheet is open -->
<script type="text/javascript">
subject = "${subject.short_name}";
worksheet = "${worksheet.identifier}";
year = "${year}";
semester = "${semester}";
</script>
</head>
<body>
<py:def function="offering_url(offering)">/subjects/${offering.subject.short_name}/${offering.semester.year}/${offering.semester.semester}</py:def>
<h1>${worksheet.name} in ${subject.name}</h1>
<div id="ivle_padding">
<div class="contextactions" py:if="'edit' in worksheet.get_permissions(user, config)">
<a class="editaction" href="${offering_url(worksheet.offering)}/+worksheets/${worksheet.identifier}/+edit">Edit this worksheet</a>
</div>
<!-- Display the Table Of Contents -->
<p py:if="not worksheet.published"><strong>Note:</strong> This worksheet is not yet published — it is not visible to students.</p>
<div id="tutorial-toc">
<h2>Contents</h2>
<py:if test="show_exercise_stats">
<table class="pretty_table">
<tr><th></th><th>Exercise</th><th># completed</th>
<th># attempted</th><th>% complete</th>
</tr>
<py:for each="exercise in exercises">
<tr class="${exercise['complete']}" id="toc_li_${exercise['exid']}">
<td><img
src="/+media/ivle.webapp.tutorial/images/tiny/${'complete' if exercise['complete'] == 'complete' else 'incomplete'}.png" /></td>
<td><a href="#${exercise['exid']}">${exercise.name}</a></td>
<td py:content="exercise.stats[0]" />
<td py:content="exercise.stats[1]" />
<td py:if="exercise.stats[1] > 0">${int((100.0 * exercise.stats[0]) / exercise.stats[1])}%</td>
<td py:if="exercise.stats[1] == 0">N/A</td>
</tr>
</py:for>
</table>
<p>Note: The above statistics show the completion and attempt rate on
each exercise, for all students enrolled in the subject.</p>
</py:if>
<py:if test="not show_exercise_stats">
<ul>
<py:for each="exercise in exercises">
<li class="${exercise['complete']}" id="toc_li_${exercise['exid']}">
<a href="#${exercise['exid']}">
${exercise.name}
</a>
</li>
</py:for>
</ul>
</py:if>
</div>
${worksheetstream}
</div>
</body>
</html>
|