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

« back to all changes in this revision

Viewing changes to ivle/webapp/tutorial/templates/exercise_edit.html

  • Committer: Nick Chadwick
  • Date: 2009-02-24 03:32:59 UTC
  • mto: (1099.1.227 exercise-ui)
  • mto: This revision was merged to the branch mainline in revision 1162.
  • Revision ID: chadnickbok@gmail.com-20090224033259-m518nuqp6w9f23ax
Added a new page to display exercises. This will then be modified to
actually edit exercises.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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">
 
7
    </script>
 
8
  </head>
 
9
  <body>
 
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" />
 
15
      <br />
 
16
      <label for="exercise_name">Exercise Name:</label>
 
17
      <input class="textinput" type='text' id='exercise_name' value="${exercise.name}" title="Exercise Name" />
 
18
      <br />
 
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" />
 
21
      <br />
 
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>
 
24
      <br />
 
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>
 
27
      <br />
 
28
      <label for="exercise_solution">Exercise Full Solution:</label><br />
 
29
      <textarea cols="80" rows="5" id="exercise_solution" title="Solution">${exercise.solution}</textarea>
 
30
      <br />
 
31
      
 
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>
 
38
          <br />
 
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>
 
41
          <br />
 
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>
 
44
          <br />
 
45
      
 
46
          <h3>Suite ${test_suite.seq_no + 1} - Variables</h3>
 
47
          <py:for each="variable in test_suite.variables">
 
48
            <span>
 
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>
 
54
                </py:for>
 
55
              </select>
 
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}" />
 
62
            </span>
 
63
            <br />
 
64
          
 
65
          </py:for>
 
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}" />
 
71
            <br />
 
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}" />
 
74
            <br />
 
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}" />
 
77
 
 
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>
 
85
                </py:for>
 
86
              </select>
 
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>
 
92
                </py:for>
 
93
              </select>
 
94
              <br />
 
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>
 
97
              <br />
 
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}" />
 
100
            </py:for>
 
101
          </py:for>
 
102
        </div>
 
103
      </py:for>
 
104
    </div>
 
105
  </body>
 
106
</html>