summaryrefslogtreecommitdiff
path: root/testapp/exam/templates
diff options
context:
space:
mode:
authorPrabhu Ramachandran2015-05-12 20:20:43 +0530
committerPrabhu Ramachandran2015-05-12 20:20:43 +0530
commita022e0145ec8fb1622d58c2e2281c016b1d45b01 (patch)
tree1c0c3f2e8605d6f36405c57cbe5de9a895a47958 /testapp/exam/templates
parentcd9f2542d09db0e4a352dd410f626f27e23c37e4 (diff)
parent5b23647de575fd90552807260a4b8e0a96ab6afe (diff)
downloadonline_test-a022e0145ec8fb1622d58c2e2281c016b1d45b01.tar.gz
online_test-a022e0145ec8fb1622d58c2e2281c016b1d45b01.tar.bz2
online_test-a022e0145ec8fb1622d58c2e2281c016b1d45b01.zip
Merge pull request #41 from ankitjavalkar/code-server-redesign-mymaster2
Code server redesign
Diffstat (limited to 'testapp/exam/templates')
-rw-r--r--testapp/exam/templates/exam/add_question.html21
-rw-r--r--testapp/exam/templates/exam/edit_question.html36
2 files changed, 38 insertions, 19 deletions
diff --git a/testapp/exam/templates/exam/add_question.html b/testapp/exam/templates/exam/add_question.html
index b0b22b1..43f09e1 100644
--- a/testapp/exam/templates/exam/add_question.html
+++ b/testapp/exam/templates/exam/add_question.html
@@ -27,14 +27,25 @@
<tr><td>Points:<td><button class="btn-mini" type="button" onClick="increase(frm);">+</button>{{ form.points }}<button class="btn-mini" type="button" onClick="decrease(frm);">-</button>{{ form.points.errors }}
<tr><td><strong>Rendered: </strong><td><p id='my'></p>
<tr><td>Description: <td>{{ form.description}} {{form.description.errors}}
- <tr><td>Test: <td>{{ form.test }}{{form.test.errors}}
<tr><td>Snippet: <td>{{ form.snippet }}{{ form.snippet.errors }}</td></tD></td></tr>
<tr><td>Tags: <td>{{ form.tags }}
- <tr><td id='label_option'>Options: <td>{{ form.options }} {{form.options.errors}}
-
-
+ <tr><td id='label_option'>Options: <td>{{ form.options }} {{form.options.errors}}
+ <tr><td id='label_solution'>Test: <td>{{ form.solution }} {{form.solution.errors}}
+ <tr><td id='label_ref_code_path'>Reference Code Path: <td>{{ form.ref_code_path }} {{form.ref_code_path.errors}}
+
+ <form method="post" action="">
+ {% if formset%}
+ {{ formset.management_form }}
+ {% for form in formset %}
+ {{ form }}
+ {% endfor %}
+ {% endif %}
+ </form>
</table></center>
- <center><button class="btn" type="submit" name="savequestion">Save</button>
+ <center><button class="btn" type="submit" name="add_test">Add Test Case</button>
+ <button class="btn" type="submit" name="delete_test">Remove Test Case</button>
+ </center><br>
+ <center><button class="btn" type="submit" name="save_question">Save</button>
<button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/questions/");'>Cancel</button> </center>
</form>
{% endblock %}
diff --git a/testapp/exam/templates/exam/edit_question.html b/testapp/exam/templates/exam/edit_question.html
index b28cc3e..6deca4a 100644
--- a/testapp/exam/templates/exam/edit_question.html
+++ b/testapp/exam/templates/exam/edit_question.html
@@ -21,29 +21,37 @@
<table>
- {% for form in forms %}
+ {% for question, test in data_list %}
- <tr><td height=10><a id='a{{forloop.counter}}' onClick="data('contentDiv{{forloop.counter}}','myContent{{forloop.counter}}','a{{forloop.counter}}','{{form.summary.value}}');" style='cursor:pointer;'>{{form.summary.value}}</a>
-
+ <tr><td height=10><a id='a{{forloop.counter}}' onClick="data('contentDiv{{forloop.counter}}','myContent{{forloop.counter}}','a{{forloop.counter}}','{{question.summary.value}}');" style='cursor:pointer;'>{{question.summary.value}}</a>
+
<div id="contentDiv{{forloop.counter}}" style="display:none;">
<div id="myContent{{forloop.counter}}" style="display: none;">
-
- <center><table class=span1>
- <tr><td><b>Summary:</b> <td>{{ form.summary }}{{ form.summary.errors }}
- <tr><td><b> Language: </b><td> {{form.language}}{{form.language.errors}}
- <tr><td><b> Active: </b><td>&nbsp; {{ form.active }}{{form.active.errors}} &nbsp; Type: &nbsp;{{ form.type }}{{form.type.errors}}
- <tr><td><b>Points:<td><button class="btn-mini" name={{forloop.counter}} type="button" onClick="increase(frm,{{forloop.counter}});">+</button>{{ form.points }}<button class="btn-mini" type="button" onClick="decrease(frm,{{forloop.counter}});">-</button>{{ form.points.errors }}
+
+ <center><table class=span1>
+ <tr><td><b>Summary:</b> <td>{{ question.summary }}{{ question.summary.errors }}
+ <tr><td><b> Language: </b><td> {{question.language}}{{question.language.errors}}
+ <tr><td><b> Active: </b><td>&nbsp; {{ question.active }}{{question.active.errors}} &nbsp; Type: &nbsp;{{ question.type }}{{question.type.errors}}
+ <tr><td><b>Points:<td><button class="btn-mini" name={{forloop.counter}} type="button" onClick="increase(frm,{{forloop.counter}});">+</button>{{ question.points }}<button class="btn-mini" type="button" onClick="decrease(frm,{{forloop.counter}});">-</button>{{ question.points.errors }}
<tr><td><strong>Rendered: </strong><td><p id='my{{forloop.counter}}'></p>
- <tr><td><b>Description: <td>{{ form.description }} {{form.description.errors}}
- <tr><td><b>Test: <td>{{ form.test }}{{form.test.errors}}
- <tr><td><b>Snippet: <td>{{ form.snippet }}{{ form.snippet.errors }}</td></b></td></tr>
- <tr><td><b>Tags: </b><td>{{ form.tags }}
- <tr><td id='label_option{{forloop.counter}}'><b>Options:<td>{{ form.options }} {{form.options.errors}} {{form.options.helptext}}
+ <tr><td><b>Description: <td>{{ question.description }}
+ {{question.description.errors}} <tr><td><b>Test: <td>
+ {{ question.test }}{{question.test.errors}}
+ <tr><td><b>Snippet: <td>{{ question.snippet }}{{ question.snippet.errors }}
+ </td></b></td></tr>
+ <tr><td><b>Tags: </b><td>{{ question.tags }}
+ <tr><td id='label_option{{forloop.counter}}'><b>Options:<td>{{ question.options }}
+ {{question.options.errors}} {{question.options.helptext}}
+ </table></center>
+ <center><table class=span1>
+ {{ test }}
</table></center>
</div>
</div>
{% endfor %}
</table></center>
+
+
{% for i in data %}
<input type=hidden name='questions' value="{{ i }}" />
{% endfor %}