3
3
<div class="exercise" id="${exercise.id}">
4
4
<p><b>Exercise:</b> ${exercise.name}</p>
5
5
<py:if test="description is not None">
6
<div id="description">${description}</div>
9
<div class="error">${error}</div>
6
<div>${description}</div>
11
8
<input id="input_resettext_${exercise.id}" type="hidden" value="${exercise.partial}" />
12
9
<textarea id="textarea_${exercise.id}" class="exercisebox"
13
onkeypress="return catch_textbox_input("${exercise.id}", '${exercise.id}',
10
onkeypress="return catch_textbox_input("${exercise.id}", '${filename}',
15
onchange="set_saved_status("${exercise.id}", '${exercise.id}',
12
onchange="set_saved_status("${exercise.id}", '${filename}',
17
14
cols="80" rows="${exercise.num_rows}">${exercisesave}</textarea>
18
15
<div class="exercisebuttons">
19
<py:if test="worksheet">
20
<input type="button" value="Saved" disabled="disabled" id="savebutton_${exercise.id}"
21
onclick="saveexercise("${exercise.id}", '${exercise.id}')"
22
title="Save your solution to this exercise" />
23
<input type="button" value="Reset" id="resetbutton_${exercise.id}"
24
onclick="resetexercise("${exercise.id}", '${exercise.id}')"
25
title="Reload the original partial solution for this exercise" />
16
<input type="button" value="Saved" disabled="disabled" id="savebutton_${exercise.id}"
17
onclick="saveexercise("${exercise.id}", '${filename}')"
18
title="Save your solution to this exercise" />
19
<input type="button" value="Reset" id="resetbutton_${exercise.id}"
20
onclick="resetexercise("${exercise.id}", '${filename}')"
21
title="Reload the original partial solution for this exercise" />
27
22
<input type="button" value="Run"
28
onclick="runexercise("${exercise.id}", '${exercise.id}')"
23
onclick="runexercise("${exercise.id}", '${filename}')"
29
24
title="Run this program in the console" />
30
25
<input type="button" value="Submit"
31
26
id="submitbutton_${exercise.id}"
32
onclick="submitexercise("${exercise.id}", '${exercise.id}')"
27
onclick="submitexercise("${exercise.id}", '${filename}')"
33
28
title="Submit this solution for evaluation" />
35
<p class="form_error" py:if="worksheet is not None and worksheet.offering.has_worksheet_cutoff_passed(req.user)">
36
<strong>Note:</strong> The worksheets for this subject have closed.
37
Future submissions will not count towards your marks.</p>
38
30
<div class="testoutput">
40
<div py:if="worksheet" class="problem_summary">
32
<div class="problem_summary">
42
34
<li id="summaryli_${exercise.id}" class="${complete_class}">
43
35
<b><span id="summarycomplete_${exercise.id}">${complete}</span>.</b>
48
40
<!-- This is filled in by javascript when the page loads -->
49
<div py:if="worksheet" class="attempthistory">
41
<div class="attempthistory">
51
43
<a title="Click to view previous submissions you have made for this exercise"
52
onclick="open_previous("${exercise.id}", '${exercise.id}')">
44
onclick="open_previous("${exercise.id}", '${filename}')">
53
45
View previous attempts