~azzar1/unity/add-show-desktop-key

1099.1.212 by Nick Chadwick
Added a new page to display exercises. This will then be modified to
1
<html xmlns="http://www.w3.org/1999/xhtml"
2
      xmlns:py="http://genshi.edgewall.org/">
3
  <head>
4
    <title>Edit - ${exercise.name}</title>
5
    <!-- These let the javascript know which worksheet is open -->
6
    <script type="text/javascript">
1099.1.216 by Nick Chadwick
Started adding in add and save options in the exercise edit view, to
7
      exercise = '${exercise.id}';
1099.1.212 by Nick Chadwick
Added a new page to display exercises. This will then be modified to
8
    </script>
9
  </head>
10
  <body>
1099.1.221 by Nick Chadwick
added in extra parts to the exercise edit view. Now almost all
11
    <h1>Edit Exercise - ${exercise.id}</h1>
1099.1.212 by Nick Chadwick
Added a new page to display exercises. This will then be modified to
12
    <div id="ivle_padding">
1099.1.221 by Nick Chadwick
added in extra parts to the exercise edit view. Now almost all
13
      <h3>Exercise Values:</h3>
1099.1.212 by Nick Chadwick
Added a new page to display exercises. This will then be modified to
14
      <label for="exercise_id">Exercise Identifier:</label>
15
      <input class="textinput" type="text" id="exercise_id" value="${exercise.id}" title="Exercise Identifier" />
16
      <br />
17
      <label for="exercise_name">Exercise Name:</label>
18
      <input class="textinput" type='text' id='exercise_name' value="${exercise.name}" title="Exercise Name" />
19
      <br />
20
      <label for="exercise_num_rows">Number of Rows</label>
21
      <input size="5" type="text" id="exercise_num_rows" value="${exercise.num_rows}" title="Number of Rows" />
22
      <br />
23
      <label for="exercise_desc">Exercise Description (in RST):</label><br />
24
      <textarea cols="80" rows="10" id="exercise_desc" title="Exercise Description">${exercise.description}</textarea>
25
      <br />
26
      <label for="exercise_partial">Exercise Partial Solution (Python):</label><br />
27
      <textarea cols="80" rows="5" id="exercise_partial" title="Partial Solution">${exercise.partial}</textarea>
28
      <br />
29
      <label for="exercise_solution">Exercise Full Solution:</label><br />
30
      <textarea cols="80" rows="5" id="exercise_solution" title="Solution">${exercise.solution}</textarea>
31
      <br />
1099.1.216 by Nick Chadwick
Started adding in add and save options in the exercise edit view, to
32
      <label for="exercise_include">Exercise Included Code:</label><br />
1099.1.221 by Nick Chadwick
added in extra parts to the exercise edit view. Now almost all
33
      <textarea cols="80" rows="5" id="exercise_include" title="Included Code">${exercise.include}</textarea>
1099.1.216 by Nick Chadwick
Started adding in add and save options in the exercise edit view, to
34
      <br />
1099.1.217 by Nick Chadwick
working on making the exercise editor complete
35
      <input type="submit" value="Save Changes" onclick="edit_exercise()" />
1099.1.216 by Nick Chadwick
Started adding in add and save options in the exercise edit view, to
36
      <br />
1099.1.221 by Nick Chadwick
added in extra parts to the exercise edit view. Now almost all
37
      <h2>Exercise Test Suites</h2>
1099.1.213 by Nick Chadwick
Modifief exercise view, so that exercises can now be viewed in an
38
      <ul>
39
        <py:for each="test_suite in exercise.test_suites">
40
          <li>
1099.1.228 by Nick Chadwick
Merged from trunk.
41
            <h3><a id="suite_header_${test_suite.suiteid}" onclick="tog('suite_data_${test_suite.suiteid}')">Suite ${test_suite.seq_no + 1} - ${test_suite.description}</a> <a onclick="delete_suite('${test_suite.suiteid}')"><img src="${mediapath}cross.png"/></a></h3>
1099.1.213 by Nick Chadwick
Modifief exercise view, so that exercises can now be viewed in an
42
            
43
            <div class="testsuite" id="suite_data_${test_suite.suiteid}">
1099.1.214 by Nick Chadwick
The skeleton for editing an exercise has now been created. The next
44
              <div class="test_suite_vals">
45
                <div>
46
                  <label for="test_suite_description_${test_suite.suiteid}">Description:</label> <textarea id="test_suite_description_${test_suite.suiteid}" cols="80" rows="1">${test_suite.description}</textarea>
47
                </div>
48
                <div>
49
                  <label for="test_suite_function_${test_suite.suiteid}">Function:</label> <textarea id="test_suite_function_${test_suite.suiteid}" title="Suite Function" cols="80" rows="1">${test_suite.function}</textarea>
50
                </div>
51
                <div>
52
                  <label for="test_suite_stdin_${test_suite.suiteid}">Stdin:</label> <textarea id="test_suite_stdin_${test_suite.suiteid}" title="Suite Stdin" cols="80" rows="4">${test_suite.stdin}</textarea>
53
                </div>
1099.1.217 by Nick Chadwick
working on making the exercise editor complete
54
                <br />
55
                <input type="submit" name="Save Suite" value="Save Suite" onclick="edit_suite('${test_suite.suiteid}')" />
1099.1.214 by Nick Chadwick
The skeleton for editing an exercise has now been created. The next
56
              </div>
1099.1.213 by Nick Chadwick
Modifief exercise view, so that exercises can now be viewed in an
57
              <br />
1099.1.212 by Nick Chadwick
Added a new page to display exercises. This will then be modified to
58
          
1099.1.221 by Nick Chadwick
added in extra parts to the exercise edit view. Now almost all
59
              <a id='variables_header_${test_suite.suiteid}' onclick="tog('variables_${test_suite.suiteid}')"><h4>Suite ${test_suite.seq_no + 1} - Variables</h4></a>
1099.1.213 by Nick Chadwick
Modifief exercise view, so that exercises can now be viewed in an
60
        
61
                <div class="test_variables" id="variables_${test_suite.suiteid}">
62
                  <py:for each="variable in test_suite.variables">
63
                    <span>
1099.6.4 by Nick Chadwick
Exercise UI is now ready to be merged into trunk.
64
                      <a onclick="delete_var('${variable.varid}', '${test_suite.suiteid}')"><img src="${mediapath}cross.png"/></a>
1099.1.213 by Nick Chadwick
Modifief exercise view, so that exercises can now be viewed in an
65
                      <label for="var_type_${variable.varid}">Type:</label>
66
                      <select name="Variable Type" id="var_type_${variable.varid}">
67
                        <py:for each="var_type in var_types">
1099.1.217 by Nick Chadwick
working on making the exercise editor complete
68
                          <option py:if="var_type == variable.var_type" selected="selected" value="${var_type}">${var_type}</option>
69
                          <option py:if="var_type != variable.var_type" value="${var_type}">${var_type}</option>
1099.1.213 by Nick Chadwick
Modifief exercise view, so that exercises can now be viewed in an
70
                        </py:for>
71
                      </select>
72
                      <label for="var_name_${variable.varid}">Var Name:</label>
73
                      <input type="text" id="var_name_${variable.varid}" value="${variable.var_name}" />
74
                      <label for="var_val_${variable.varid}">Var Value:</label>
75
                      <input type="text" id="var_val_${variable.varid}" value="${variable.var_value}"/>
76
                      <label for="var_argno_${variable.varid}">Arg Num:</label>
77
                      <input size="5" type="text" id="var_argno_${variable.varid}" value="${variable.arg_no}" />
1099.1.242 by Nick Chadwick
Fixed a problem with exercise editor, which wasn't editing or adding
78
                      <input type="submit" value="Save" onclick="edit_var('${variable.varid}', '${test_suite.suiteid}')" />
1099.1.213 by Nick Chadwick
Modifief exercise view, so that exercises can now be viewed in an
79
                    </span>
80
                    <br />          
81
                  </py:for>
1099.1.217 by Nick Chadwick
working on making the exercise editor complete
82
                  <a onclick="tog('add_variable_${test_suite.suiteid}')">Add A New Variable</a>
83
                  <div class="add_variable" id="add_variable_${test_suite.suiteid}">
84
                    <label for="new_var_type_${test_suite.suiteid}">Type:</label>
85
                    <select name="Variable Type" id="new_var_type_${test_suite.suiteid}">
86
                      <py:for each="var_type in var_types">
87
                        <option  value="${var_type}">${var_type}</option>
88
                      </py:for>
89
                    </select>
90
                    <label for="new_var_name_${test_suite.suiteid}">Var Name:</label>
91
                    <input type="text" id="new_var_name_${test_suite.suiteid}" />
92
                    <label for="new_var_val_${test_suite.suiteid}">Var Value:</label>
93
                    <input type="text" id="new_var_val_${test_suite.suiteid}" />
94
                    <label for="new_var_argno_${test_suite.suiteid}">Arg Num:</label>
95
                    <input size="5" type="text" id="new_var_argno_${test_suite.suiteid}" />
96
                    <input type="submit" value="Add" onclick="add_var('${test_suite.suiteid}')" />
97
                  </div>
1099.1.213 by Nick Chadwick
Modifief exercise view, so that exercises can now be viewed in an
98
                </div>
1099.1.221 by Nick Chadwick
added in extra parts to the exercise edit view. Now almost all
99
              <a onclick="tog('test_cases_${test_suite.suiteid}')" id="cases_header_${test_suite.suiteid}"><h4>Suite ${test_suite.seq_no + 1} - Test Cases</h4></a>
1099.1.213 by Nick Chadwick
Modifief exercise view, so that exercises can now be viewed in an
100
101
              <div class="test_cases" id="test_cases_${test_suite.suiteid}">    
102
                <ul>
103
                  <py:for each="test_case in test_suite.test_cases">
104
                    <li>
1099.1.228 by Nick Chadwick
Merged from trunk.
105
                      <h5><a onclick="tog('test_case_${test_case.testid}_${test_suite.suiteid}')" id="case_header_${test_case.testid}">Test Case ${test_case.seq_no + 1}</a> <a onclick="delete_testcase('${test_case.testid}','${test_suite.suiteid}')"><img src="${mediapath}cross.png"/></a></h5>
1099.6.1 by Nick Chadwick
Exercise-ui is now able to create an entire exercise.
106
                      <div class="test_case" id="test_case_${test_case.testid}_${test_suite.suiteid}">
107
                        <label for="test_case_pass_${test_case.testid}_${test_suite.suiteid}">Pass Message:</label>
108
                        <input class="textinput" type="text" id="test_case_pass_${test_case.testid}_${test_suite.suiteid}" value="${test_case.passmsg}" />
109
                        <br />
110
                        <label for="test_case_fail_${test_case.testid}_${test_suite.suiteid}">Fail Message:</label>
111
                        <input class="textinput" type="text" id="test_case_fail_${test_case.testid}_${test_suite.suiteid}" value="${test_case.failmsg}" />
112
                        <br />
113
                        <label for="test_case_default_${test_case.test_default}_${test_suite.suiteid}">Default Mode:</label>
114
                        <input class="textinput" type="text" id="test_case_default_${test_case.test_default}_${test_suite.suiteid}" value="${test_case.test_default}" />
115
                        <br />
116
                        <input type="submit" onclick="edit_test_case('${test_case.testid}','${test_suite.suiteid}')" value="Save Case" />
117
                        <br />
118
                        <h5>Test Case Parts</h5>
119
                        <div class="disabled_test_case_parts" id="test_case_parts_${test_case.testid}_${test_suite.suiteid}">
1099.1.217 by Nick Chadwick
working on making the exercise editor complete
120
                          <py:for each="test_part in test_case.parts">
1099.6.4 by Nick Chadwick
Exercise UI is now ready to be merged into trunk.
121
                            <a onclick="delete_testpart('${test_part.partid}','${test_case.testid}','${test_suite.suiteid}')"><img src="${mediapath}cross.png"/></a>
1099.1.217 by Nick Chadwick
working on making the exercise editor complete
122
                            <label for="test_part_part_type_${test_part.partid}">Part Type:</label>
123
                            <select name="Part Type" id="test_part_part_type_${test_part.partid}">
124
                              <py:for each="part_type in part_types">
125
                                <option py:if="part_type==test_part.part_type" selected="selected" value="${part_type}">${part_type}</option>
126
                                <option py:if="part_type!=test_part.part_type" value="${part_type}">${part_type}</option>
127
                              </py:for>
128
                            </select>
129
                            <label for="">Test Type</label>
130
                            <select name="Test Type" id="test_part_test_type_${test_part.partid}">
131
                              <py:for each="test_type in test_types">
132
                                <option py:if="test_type==test_part.test_type" selected="selected" value="${test_type}">${test_type}</option>
133
                                <option py:if="test_type!=test_part.test_type" value="${test_type}">${test_type}</option>
134
                              </py:for>
135
                            </select>
136
                            <br />
137
                            <label for="test_part_data_${test_part.partid}">Test:</label><br />
138
                            <textarea id="test_part_data_${test_part.partid}" rows="2" cols="80">${test_part.data}</textarea>
139
                            <br />
140
                            <label for="test_part_file_${test_part.partid}">Filename:</label>
141
                            <input type="text" id="test_part_file_${test_part.partid}" value="${test_part.filename}" />
1099.1.221 by Nick Chadwick
added in extra parts to the exercise edit view. Now almost all
142
                            <br />
1099.6.1 by Nick Chadwick
Exercise-ui is now able to create an entire exercise.
143
                            <input type="submit" value="Save Part" onclick="edit_test_part('${test_part.partid}', '${test_case.testid}', ${test_suite.suiteid})"/>
1099.6.4 by Nick Chadwick
Exercise UI is now ready to be merged into trunk.
144
                            <br />
1099.1.217 by Nick Chadwick
working on making the exercise editor complete
145
                          </py:for>
146
                        </div>
1099.1.242 by Nick Chadwick
Fixed a problem with exercise editor, which wasn't editing or adding
147
                        <a onclick="tog('new_test_part_${test_case.testid}')">Add a New part</a>
148
                        <div class="add_new_part" id="new_test_part_${test_case.testid}">
1099.6.1 by Nick Chadwick
Exercise-ui is now able to create an entire exercise.
149
                            <label for="new_test_part_part_type_${test_case.testid}">Part Type:</label>
150
                            <select name="Part Type" id="new_test_part_part_type_${test_case.testid}">
151
                              <py:for each="part_type in part_types">
152
                                <option value="${part_type}">${part_type}</option>
153
                              </py:for>
154
                            </select>
155
                            <br />
156
                            <label>Test Type:</label>
157
                            <select name="Test Type" id="new_test_part_test_type_${test_case.testid}">
158
                              <py:for each="test_type in test_types">
159
                                <option value="${test_type}">${test_type}</option>
160
                              </py:for>
161
                            </select>
162
                            <br />
163
                            <label>Test:</label>
164
                            <textarea id="new_test_part_data_${test_case.testid}" rows="2" cols="80"></textarea>
165
                            <br />
166
                            <label>Filename:</label>
167
                            <input type="text" id="new_test_part_file_${test_case.testid}"/>
168
                            <br />
169
                            <input type="submit" value="Add Part" onclick="add_test_part('${test_case.testid}', '${test_suite.suiteid}')" id="new_test_part_save_${test_case.testid}" />
170
                        </div>
1099.1.213 by Nick Chadwick
Modifief exercise view, so that exercises can now be viewed in an
171
                      </div>
172
                    </li>
173
                  </py:for>
1099.1.221 by Nick Chadwick
added in extra parts to the exercise edit view. Now almost all
174
                  <li>
175
                    <a onclick="tog('new_test_part_${test_suite.suiteid}')"><h5>Add A New Test Case</h5></a>
176
                    <div class="add_new_part" id="new_test_part_${test_suite.suiteid}">
177
                      <label for="new_test_case_pass_${test_suite.suiteid}">Pass Message:</label>
178
                      <input class="textinput" type="text" id="new_test_case_pass_${test_suite.suiteid}" />
179
                      <br />
180
                      <label for="new_test_case_fail_${test_suite.suiteid}">Fail Message:</label>
181
                      <input class="textinput" type="text" id="new_test_case_fail_${test_suite.suiteid}" />
182
                      <br />
183
                      <label for="new_test_case_default_${test_suite.suiteid}">Default Mode:</label>
1099.6.1 by Nick Chadwick
Exercise-ui is now able to create an entire exercise.
184
                      <input class="textinput" type="text" value="ignore" id="new_test_case_default_${test_suite.suiteid}" />
1099.1.221 by Nick Chadwick
added in extra parts to the exercise edit view. Now almost all
185
                      <br />
1099.6.1 by Nick Chadwick
Exercise-ui is now able to create an entire exercise.
186
                      <input type="submit" value="Add Case" onclick="add_test_case('${test_suite.suiteid}')" />
1099.1.221 by Nick Chadwick
added in extra parts to the exercise edit view. Now almost all
187
                    </div>
188
                  </li>
1099.1.213 by Nick Chadwick
Modifief exercise view, so that exercises can now be viewed in an
189
                </ul>
190
              </div>
191
              
192
            </div>
193
          </li>
194
        </py:for>
195
      </ul>
1099.1.216 by Nick Chadwick
Started adding in add and save options in the exercise edit view, to
196
      <a onclick="tog('add_suite')">Add A New Test Suite</a>
197
      <br />
198
      <div id="add_suite" class="test_suite_vals">
199
        <div>
200
          <label for="new_test_suite_description">Description:</label> <textarea id="new_test_suite_description" cols="80" rows="1"></textarea>
201
        </div>
202
        <div>
203
          <label for="new_test_suite_function">Function:</label> <textarea id="new_test_suite_function" title="Suite Function" cols="80" rows="1"></textarea>
204
        </div>
205
        <div>
206
          <label for="new_test_suite_stdin">Stdin:</label> <textarea id="new_test_suite_stdin" title="Suite Stdin" cols="80" rows="4"></textarea>
207
        </div>
1099.1.217 by Nick Chadwick
working on making the exercise editor complete
208
        <input type='submit' name='Submit' onclick='add_suite()' value="Add Suite" />
1099.1.216 by Nick Chadwick
Started adding in add and save options in the exercise edit view, to
209
      </div>
1099.1.228 by Nick Chadwick
Merged from trunk.
210
      
211
      <p><a href="/+exercises">Back To Exercise Listing</a></p>
212
      
1099.1.212 by Nick Chadwick
Added a new page to display exercises. This will then be modified to
213
    </div>
1099.1.213 by Nick Chadwick
Modifief exercise view, so that exercises can now be viewed in an
214
    
1099.1.212 by Nick Chadwick
Added a new page to display exercises. This will then be modified to
215
  </body>
216
</html>