diff options
author | prathamesh | 2014-06-16 17:04:40 +0530 |
---|---|---|
committer | prathamesh | 2014-06-16 17:04:40 +0530 |
commit | 763f96559bd1827ce87a72708d72efc9361ef588 (patch) | |
tree | b3de9316a59d31c785251c58baecab6c7a068c11 /testapp/templates | |
parent | 5adb38569bec47ea0a1ea63e22ceec8906717b04 (diff) | |
download | online_test-763f96559bd1827ce87a72708d72efc9361ef588.tar.gz online_test-763f96559bd1827ce87a72708d72efc9361ef588.tar.bz2 online_test-763f96559bd1827ce87a72708d72efc9361ef588.zip |
Models modified.
QuestionPaper model modified for generating random questions.
Added language field to Question model.
Removed tags from Quiz model.
Template and javascript for Add and Edit questions modified.
Added test cases for models.
Diffstat (limited to 'testapp/templates')
-rw-r--r-- | testapp/templates/exam/add_question.html | 6 | ||||
-rw-r--r-- | testapp/templates/exam/add_quiz.html | 3 | ||||
-rw-r--r-- | testapp/templates/exam/edit_question.html | 12 | ||||
-rw-r--r-- | testapp/templates/exam/edit_quiz.html | 4 |
4 files changed, 10 insertions, 15 deletions
diff --git a/testapp/templates/exam/add_question.html b/testapp/templates/exam/add_question.html index b49d7de..b0b22b1 100644 --- a/testapp/templates/exam/add_question.html +++ b/testapp/templates/exam/add_question.html @@ -22,8 +22,10 @@ {% csrf_token %} <center><table class=span1> <tr><td>Summary: <td>{{ form.summary }}{{ form.summary.errors }} - <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 }} Active: {{ form.active }}{{form.active.errors}} Type: {{ form.type }}{{form.type.errors}} - <tr><td><strong>Rendered: </strong><td><p id='my'></p> + <tr><td> Language: <td> {{form.language}}{{form.language.errors}} + <tr><td> Active: <td> {{ form.active }}{{form.active.errors}} Type: {{ form.type }}{{form.type.errors}} + <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> diff --git a/testapp/templates/exam/add_quiz.html b/testapp/templates/exam/add_quiz.html index 9851584..c2533de 100644 --- a/testapp/templates/exam/add_quiz.html +++ b/testapp/templates/exam/add_quiz.html @@ -5,11 +5,8 @@ {% 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" /> {% endblock %} {% block script %} -<script src="/static/taggit_autocomplete_modified/jquery.min.js" type="text/javascript"></script> -<script src="/static/taggit_autocomplete_modified/jquery.autocomplete.js" type="text/javascript"></script> <script src="{{ URL_ROOT }}/static/exam/js/add_quiz.js"></script> {% endblock %} {% block onload %} onload="javascript:test();" {% endblock %} diff --git a/testapp/templates/exam/edit_question.html b/testapp/templates/exam/edit_question.html index 73e61d7..b28cc3e 100644 --- a/testapp/templates/exam/edit_question.html +++ b/testapp/templates/exam/edit_question.html @@ -30,15 +30,15 @@ <center><table class=span1> <tr><td><b>Summary:</b> <td>{{ form.summary }}{{ form.summary.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 }} Active: {{ form.active }}{{form.active.errors}} Type: {{ form.type }}{{form.type.errors}} - + <tr><td><b> Language: </b><td> {{form.language}}{{form.language.errors}} + <tr><td><b> Active: </b><td> {{ form.active }}{{form.active.errors}} Type: {{ 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 }} <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>Test: <td>{{ form.test }}{{form.test.errors}} <tr><td><b>Snippet: <td>{{ form.snippet }}{{ form.snippet.errors }}</td></b></td></tr> - <tr><td>Tags: <td>{{ form.tags }} - <tr><td id='label_option{{forloop.counter}}'><b>Options: <td>{{ form.options }} {{form.options.errors}} {{form.options.helptext}} + <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}} </table></center> </div> </div> diff --git a/testapp/templates/exam/edit_quiz.html b/testapp/templates/exam/edit_quiz.html index 0ea4aae..cf80df1 100644 --- a/testapp/templates/exam/edit_quiz.html +++ b/testapp/templates/exam/edit_quiz.html @@ -5,13 +5,10 @@ {% 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" /> {% endblock %} {% block script %} <script src="{{ URL_ROOT }}/static/exam/js/edit_quiz.js"></script> -<script src="/static/taggit_autocomplete_modified/jquery.min.js" type="text/javascript"></script> -<script src="/static/taggit_autocomplete_modified/jquery.autocomplete.js" type="text/javascript"></script> {% endblock %} {% block onload %} onload = 'javascript:form_load();' {% endblock %} @@ -25,7 +22,6 @@ <tr><td><b>Start Date: <td>{{ form.start_date}} <tr><td><b>Duration: <td> {{ form.duration }} <tr><td><b>Active: <td> {{ form.active }} - <tr><td><b>Tags: <td> {{ form.tags }} <tr><td><b>Description: <td> {{ form.description }} <hr> {% endfor %} |