1
1
<html xmlns="http://www.w3.org/1999/xhtml"
2
2
xmlns:py="http://genshi.edgewall.org/" py:strip="">
3
<div class="exercise" id="${exercise.id}">
4
<p><b>Exercise:</b> ${exercise.name}</p>
5
<py:if test="description is not None">
6
<div>${description}</div>
3
<div class="exercise" id="exercise${exerciseid}">
4
<p><b>Exercise:</b> ${exercisename}</p>
5
<py:if test="exercisedesc is not None">
6
<div>${exercisedesc}</div>
8
<input id="input_resettext_${exercise.id}" type="hidden" value="${exercise.partial}" />
9
<textarea id="textarea_${exercise.id}" class="exercisebox"
10
onkeypress="return catch_textbox_input("${exercise.id}", '${exercise.id}',
8
<input id="input_resettext_exercise${exerciseid}" type="hidden" value="${exercisepartial_backup}" />
9
<textarea id="textarea_exercise${exerciseid}" class="exercisebox"
10
onkeypress="return catch_textbox_input("exercise${exerciseid}", '${filename}',
12
onchange="set_saved_status("${exercise.id}", '${exercise.id}',
12
onchange="set_saved_status("exercise${exerciseid}", '${filename}',
14
cols="80" rows="${exercise.num_rows}">${exercisesave}</textarea>
14
cols="80" rows="${rows}">${exercisepartial}</textarea>
15
15
<div class="exercisebuttons">
16
<py:if test="worksheet">
17
<input type="button" value="Saved" disabled="disabled" id="savebutton_${exercise.id}"
18
onclick="saveexercise("${exercise.id}", '${exercise.id}')"
19
title="Save your solution to this exercise" />
20
<input type="button" value="Reset" id="resetbutton_${exercise.id}"
21
onclick="resetexercise("${exercise.id}", '${exercise.id}')"
22
title="Reload the original partial solution for this exercise" />
16
<input type="button" value="Saved" disabled="disabled" id="savebutton_exercise${exerciseid}"
17
onclick="saveexercise("exercise${exerciseid}", '${filename}')"
18
title="Save your solution to this exercise" />
19
<input type="button" value="Reset" id="resetbutton_exercise${exerciseid}"
20
onclick="resetexercise("exercise${exerciseid}", '${filename}')"
21
title="Reload the original partial solution for this exercise" />
24
22
<input type="button" value="Run"
25
onclick="runexercise("${exercise.id}", '${exercise.id}')"
23
onclick="runexercise("exercise${exerciseid}", '${filename}')"
26
24
title="Run this program in the console" />
27
25
<input type="button" value="Submit"
28
id="submitbutton_${exercise.id}"
29
onclick="submitexercise("${exercise.id}", '${exercise.id}')"
26
id="submitbutton_exercise${exerciseid}"
27
onclick="submitexercise("exercise${exerciseid}", '${filename}')"
30
28
title="Submit this solution for evaluation" />
32
30
<div class="testoutput">
34
<div py:if="worksheet" class="problem_summary">
32
<div class="problem_summary">
36
<li id="summaryli_${exercise.id}" class="${complete_class}">
37
<b><span id="summarycomplete_${exercise.id}">${complete}</span>.</b>
38
Attempts: <span id="summaryattempts_${exercise.id}">${attempts}</span>.
34
<li id="summaryli_exercise${exerciseid}" class="${complete_class}">
35
<b><span id="summarycomplete_exercise${exerciseid}">${complete}</span>.</b>
36
Attempts: <span id="summaryattempts_exercise${exerciseid}">${attempts}</span>.
42
40
<!-- This is filled in by javascript when the page loads -->
43
<div py:if="worksheet" class="attempthistory">
41
<div class="attempthistory">
45
43
<a title="Click to view previous submissions you have made for this exercise"
46
onclick="open_previous("${exercise.id}", '${exercise.id}')">
44
onclick="open_previous("exercise${exerciseid}", '${filename}')">
47
45
View previous attempts
50
48
<div style="display: none">
51
49
<h3>Previous attempts</h3>
53
<a title="Close the previous attempts" onclick="close_previous("${exercise.id}")">
51
<a title="Close the previous attempts" onclick="close_previous("exercise${exerciseid}")">