1
<html xmlns="http://www.w3.org/1999/xhtml"
2
xmlns:py="http://genshi.edgewall.org/">
4
<title>Edit - ${exercise.name}</title>
5
<!-- These let the javascript know which worksheet is open -->
6
<script type="text/javascript">
10
<div id="ivle_padding">
11
<h1>Edit Exercise - ${exercise.id}</h1>
12
<h2>Exercise Values:</h2>
13
<label for="exercise_id">Exercise Identifier:</label>
14
<input class="textinput" type="text" id="exercise_id" value="${exercise.id}" title="Exercise Identifier" />
16
<label for="exercise_name">Exercise Name:</label>
17
<input class="textinput" type='text' id='exercise_name' value="${exercise.name}" title="Exercise Name" />
19
<label for="exercise_num_rows">Number of Rows</label>
20
<input size="5" type="text" id="exercise_num_rows" value="${exercise.num_rows}" title="Number of Rows" />
22
<label for="exercise_desc">Exercise Description (in RST):</label><br />
23
<textarea cols="80" rows="10" id="exercise_desc" title="Exercise Description">${exercise.description}</textarea>
25
<label for="exercise_partial">Exercise Partial Solution (Python):</label><br />
26
<textarea cols="80" rows="5" id="exercise_partial" title="Partial Solution">${exercise.partial}</textarea>
28
<label for="exercise_solution">Exercise Full Solution:</label><br />
29
<textarea cols="80" rows="5" id="exercise_solution" title="Solution">${exercise.solution}</textarea>
32
<h1>Exercise Test Suites</h1>
33
<py:for each="test_suite in exercise.test_suites">
34
<div class="testsuite">
35
<h2>Suite ${test_suite.seq_no + 1} - ${test_suite.description}</h2>
36
<label for="test_suite_description_${test_suite.suiteid}">Description:</label><br />
37
<textarea id="test_suite_description_${test_suite.suiteid}" cols="80" rows="1">${test_suite.description}</textarea>
39
<label for="test_suite_function_${test_suite.suiteid}">Function:</label><br />
40
<textarea id="test_suite_function_${test_suite.suiteid}" title="Suite Function" cols="80" rows="1">${test_suite.function}</textarea>
42
<label for="test_suite_stdin_${test_suite.suiteid}">Stdin:</label><br />
43
<textarea id="test_suite_stdin_${test_suite.suiteid}" title="Suite Stdin" cols="80" rows="4">${test_suite.stdin}</textarea>
46
<h3>Suite ${test_suite.seq_no + 1} - Variables</h3>
47
<py:for each="variable in test_suite.variables">
49
<label for="var_type_${variable.varid}">Type:</label>
50
<select name="Variable Type" id="var_type_${variable.varid}">
51
<py:for each="var_type in var_types">
52
<option py:if="var_type == variable.var_type" selected="selected" value="var_type">${var_type}</option>
53
<option py:if="var_type != variable.var_type" value="var_type">${var_type}</option>
56
<label for="var_name_${variable.varid}">Var Name:</label>
57
<input type="text" id="var_name_${variable.varid}" value="${variable.var_name}" />
58
<label for="var_val_${variable.varid}">Var Value:</label>
59
<input type="text" id="var_val_${variable.varid}" value="${variable.var_value}"/>
60
<label for="var_argno_${variable.varid}">Arg Num:</label>
61
<input size="5" type="text" id="var_argno_${variable.varid}" value="${variable.arg_no}" />
66
<h3>Suite ${test_suite.seq_no + 1} - Test Cases</h3>
67
<py:for each="test_case in test_suite.test_cases">
68
<h4>Test Case ${test_case.seq_no}</h4>
69
<label for="test_case_pass_${test_case.testid}">Pass Message:</label>
70
<input class="textinput" type="text" id="test_case_${test_case.testid}" value="${test_case.passmsg}" />
72
<label for="test_case_fail_${test_case.testid}">Fail Message:</label>
73
<input class="textinput" type="text" id="test_case_fail_${test_case.testid}" value="${test_case.failmsg}" />
75
<label for="test_case_default_${test_case.test_default}">Default Mode:</label>
76
<input class="textinput" type="text" id="test_case_default_${test_case.test_default}" value="${test_case.test_default}" />
78
<h5>Test Case Parts</h5>
79
<py:for each="test_part in test_case.parts">
80
<label for="test_part_part_type_${test_part.partid}">Part Type:</label>
81
<select name="Part Type" id="test_part_part_type_${test_part.partid}">
82
<py:for each="part_type in part_types">
83
<option py:if="part_type==test_part.part_type" selected="selected" value="${part_type}">${part_type}</option>
84
<option py:if="part_type!=test_part.part_type" value="${part_type}">${part_type}</option>
87
<label for="">Test Type</label>
88
<select name="Test Type" id="test_part_test_type_${test_part.partid}">
89
<py:for each="test_type in test_types">
90
<option py:if="test_type==test_part.test_type" selected="selected" value="${test_type}">${test_type}</option>
91
<option py:if="test_type!=test_part.test_type" value="${test_type}">${test_type}</option>
95
<label for="test_part_data_${test_part.partid}">Test:</label><br />
96
<textarea id="test_part_data_${test_part.partid}" rows="2" cols="80">${test_part.data}</textarea>
98
<label for="test_part_file_${test_part.partid}">Filename:</label>
99
<input type="text" id="test_part_file_${test_part.partid}" value="${test_part.filename}" />