summaryrefslogtreecommitdiff
path: root/testapp/templates/exam
diff options
context:
space:
mode:
authorhardythe12012-04-14 06:28:44 +0530
committerhardythe12012-04-14 06:28:44 +0530
commit5d7ab20a710e2374a3345b07ed62154456dbd2c8 (patch)
treec553204df559a8c71e7b462a18b48f548d7fe193 /testapp/templates/exam
parentc0fcc1181e209192f6d11f2ca521e55e33a4ead7 (diff)
downloadonline_test-5d7ab20a710e2374a3345b07ed62154456dbd2c8.tar.gz
online_test-5d7ab20a710e2374a3345b07ed62154456dbd2c8.tar.bz2
online_test-5d7ab20a710e2374a3345b07ed62154456dbd2c8.zip
model changes as per requirnment
Diffstat (limited to 'testapp/templates/exam')
-rw-r--r--testapp/templates/exam/manual_questionpaper.html69
-rw-r--r--testapp/templates/exam/showquestionpapers.html2
2 files changed, 60 insertions, 11 deletions
diff --git a/testapp/templates/exam/manual_questionpaper.html b/testapp/templates/exam/manual_questionpaper.html
index 96370c0..47df1ed 100644
--- a/testapp/templates/exam/manual_questionpaper.html
+++ b/testapp/templates/exam/manual_questionpaper.html
@@ -6,6 +6,12 @@
{% block css %}
<link rel="stylesheet" href="{{ URL_ROOT }}/static/exam/css/question_quiz.css" type="text/css" />
<link rel="stylesheet" media="all" type="text/css" href="{{ URL_ROOT }}/static/exam/css/autotaggit.css" />
+<style>
+select
+{
+ width:auto;
+}
+</style>
{% endblock %}
{% block script %}
<script src="/static/taggit_autocomplete_modified/jquery.min.js" type="text/javascript"></script>
@@ -28,15 +34,60 @@ function load_data()
{% endblock %}
{% block manage %}
-<form >
-{% csrf_token %}
-Select mode to design Question Paper:
-<select name='mode' id='mode' onChange='javascript:load_data();'>
- <option>Manual</option>
- <option>Automatic</option>
-</select>
-</form>
-
+<center><b>Manual mode to design the Question Paper</center><br>
+<form action="" method="post" name=frm>
+ {% csrf_token %}
+ <center>
+ Tag Conditions:
+ <select name='first_tag'>
+ <option value="">Select Tag </option>
+ {% for tag in data.tags %}
+ <option value={{tag}}>{{tag}}</option>
+ {% endfor %}
+ </select>
+ <select name='first_condition'>
+ <option value="or">OR</option>
+ <option value="and">AND</option>
+ </select>
+ <select name='second_tag'>
+ <option value="">Select Tag </option>
+ {% for tag in data.tags %}
+ <option value={{tag}}>{{tag}}</option>
+ {% endfor %}
+ </select>
+ <select name='second_condition'>
+ <option value="or">OR</option>
+ <option value="and">AND</option>
+ </select>
+ <select name='third_tag'>
+ <option value="null">Select Tag </option>
+ {% for tag in data.tags %}
+ <option value={{tag}}>{{tag}}</option>
+ {% endfor %}
+ </select>
+ </center>
+ <br>
+ <center><button class=btn type=submit name='fetch' value='fetch'>Fetch Questions</button>
+ <br><br><b>Below is the list of Questions fetched according to the given tag conditions</b></center>
+ <hr>
+ <center><table class=span10>
+ <th> &nbsp;
+ <th>Summary
+ <th>Type
+ <th>Points
+ <th>Tags
+ {% for question in data.questions %}
+ <tr><td><input type=checkbox name=questions value={{question.id}}> <td> {{ question.summary }} <td>{{ question.type }} <td>{{ question.points }} <td>
+ {% for tag in question.tags.all %}
+ {{ tag }}
+ {% endfor %}
+ </tr>
+ <br>
+ {% endfor %}
+ </table>
+ {% if data.msg %}<div class="alert alert-error">{{ data.msg }}</div>{% endif %}
+ <center><button class=btn type=submit name='save' value='save'>Save Question Paper</button></center>
+</form>
{% endblock %}
diff --git a/testapp/templates/exam/showquestionpapers.html b/testapp/templates/exam/showquestionpapers.html
index 7a77d2f..26b756d 100644
--- a/testapp/templates/exam/showquestionpapers.html
+++ b/testapp/templates/exam/showquestionpapers.html
@@ -14,8 +14,6 @@
<input type="checkbox" name="papers" value="{{ i.id }}">&nbsp;&nbsp;<a href="{{URL_ROOT}}/exam/manage/showquestionpapers/{{ i.id }}">{{ i.quiz.description }}</a><br>
{% endfor %}
<br>
-<button class="btn" type="button" onclick='location.replace("{{URL_ROOT}}/exam/manage/addquestion/");'>Add Question</button>&nbsp;&nbsp;
-<button class="btn" type="submit" name='edit' value='edit' onClick="return confirm_edit(frm);">Edit Selected</button>&nbsp;&nbsp;
<button class="btn" type="submit" onClick="return confirm_delete(frm);" name='delete' value='delete'>Delete Selected</button>
</form>
{% endblock %}