diff options
Diffstat (limited to 'testapp/templates')
-rw-r--r-- | testapp/templates/exam/add_questionpaper.html | 54 | ||||
-rw-r--r-- | testapp/templates/exam/add_quiz.html | 3 | ||||
-rw-r--r-- | testapp/templates/exam/automatic_questionpaper.html | 101 | ||||
-rw-r--r-- | testapp/templates/exam/editquestionpaper.html | 21 | ||||
-rw-r--r-- | testapp/templates/exam/manual_questionpaper.html | 42 | ||||
-rw-r--r-- | testapp/templates/exam/showquestionpapers.html | 21 | ||||
-rw-r--r-- | testapp/templates/manage.html | 3 |
7 files changed, 243 insertions, 2 deletions
diff --git a/testapp/templates/exam/add_questionpaper.html b/testapp/templates/exam/add_questionpaper.html new file mode 100644 index 0000000..664093c --- /dev/null +++ b/testapp/templates/exam/add_questionpaper.html @@ -0,0 +1,54 @@ +{% extends "manage.html" %} + + +{% block subtitle %}Design Question Paper{% endblock %} + +{% 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> +function load_data() +{ + var value = document.getElementById('mode').value; + var pathArray = window.location.pathname.split( '/' ); + length = pathArray.length; + var digit = parseInt(pathArray[length-2]); + + if (! isNaN(digit) && value == 'Automatic') + { + window.location = "{{ URL_ROOT }}/exam/manage/designquestionpaper/automatic/" + digit; + } + else if(!isNaN(digit) && value == 'Manual') + { + window.location = "{{ URL_ROOT }}/exam/manage/designquestionpaper/manual/" + digit; + } + else if(value == 'Automatic') + { + window.location = "{{ URL_ROOT }}/exam/manage/designquestionpaper/automatic"; + } + else if( value == 'Manual') + { + window.location = "{{ URL_ROOT }}/exam/manage/designquestionpaper/manual"; + } +} +</script> +{% endblock %} + +{% block manage %} +<form> +{% csrf_token %} +Select mode to design Question Paper: +<select name='mode' id='mode' onChange='javascript:load_data();'> + <option>---------</option> + <option>Automatic</option> + <option>Manual</option> +</select> +</form> + + +{% endblock %} diff --git a/testapp/templates/exam/add_quiz.html b/testapp/templates/exam/add_quiz.html index c5998d8..c8e1ac3 100644 --- a/testapp/templates/exam/add_quiz.html +++ b/testapp/templates/exam/add_quiz.html @@ -27,7 +27,8 @@ {{ form.as_table }} </table> </center> - <center><button class="btn" type="submit" name="save">Save</button> + + <center><button class="btn" type="submit" name="questionpaper">Design Question Paper</button> <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/showquiz/");'>Cancel</button> </center> </form> {% endblock %} diff --git a/testapp/templates/exam/automatic_questionpaper.html b/testapp/templates/exam/automatic_questionpaper.html new file mode 100644 index 0000000..b961711 --- /dev/null +++ b/testapp/templates/exam/automatic_questionpaper.html @@ -0,0 +1,101 @@ +{% extends "manage.html" %} + + +{% block subtitle %}Design Question Paper{% endblock %} + +{% 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> +<script src="/static/taggit_autocomplete_modified/jquery.autocomplete.js" type="text/javascript"></script> + +<script> +function load_data() +{ + var value = document.getElementById('mode').value; + if (value == 'Automatic') + { + window.location = "{{ URL_ROOT }}/exam/manage/designquestionpaper/automatic"; + } + else if(value == "Manual") + { + window.location = "{{ URL_ROOT }}/exam/manage/designquestionpaper/manual"; + } +} +</script> +{% endblock %} + +{% block manage %} +<center><b>Automotic 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>Number of question: <input type=text id=questions name='questions' style="width:25px;"> <button class=btn type=submit name='fetch' value='fetch'>Fetch Questions</button><br></center> + + <br> + <br> + <p><b>Below is the list of Questions fetched according to the given tag conditions</p> + <hr> + <center><table class=span10> + <th>Summary + <th>Type + <th>Points + <th>Tags + {% for question in data.questions %} + <tr><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/editquestionpaper.html b/testapp/templates/exam/editquestionpaper.html new file mode 100644 index 0000000..68a9c22 --- /dev/null +++ b/testapp/templates/exam/editquestionpaper.html @@ -0,0 +1,21 @@ +{% extends "manage.html" %} + + +{% block subtitle %}Questions in "{{ papers.quiz.description }}"{% endblock %} + +{% block script %} +<script src="{{ URL_ROOT }}/static/exam/js/show_question.js"></script> +{% endblock %} + +{% block manage %} +<form name=frm action="" method="post"> +{% csrf_token %} + +{% for i in papers.questions %} +<input type="checkbox" name="papers" value="{{ i.id }}"> <a href="{{URL_ROOT}}/exam/manage/editquestionpaper/{{ i.id }}">{{ i.summary}}</a><br> +{% endfor %} +<br> +<button class="btn" type="submit" name=add value=add>Add Question</button> +<button class="btn" type="submit" onClick="return confirm_delete(frm);" name='delete' value='delete'>Delete Selected</button> +</form> +{% endblock %} diff --git a/testapp/templates/exam/manual_questionpaper.html b/testapp/templates/exam/manual_questionpaper.html new file mode 100644 index 0000000..96370c0 --- /dev/null +++ b/testapp/templates/exam/manual_questionpaper.html @@ -0,0 +1,42 @@ +{% extends "manage.html" %} + + +{% block subtitle %}Design Question Paper{% endblock %} + +{% 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> +function load_data() +{ + var value = document.getElementById('mode').value; + if (value == 'Automatic') + { + window.location = "{{ URL_ROOT }}/exam/manage/designquestionpaper/automatic"; + } + else if(value == "Manual") + { + window.location = "{{ URL_ROOT }}/exam/manage/designquestionpaper/manual"; + } +} +</script> +{% 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> + + + +{% endblock %} diff --git a/testapp/templates/exam/showquestionpapers.html b/testapp/templates/exam/showquestionpapers.html new file mode 100644 index 0000000..7a77d2f --- /dev/null +++ b/testapp/templates/exam/showquestionpapers.html @@ -0,0 +1,21 @@ +{% extends "manage.html" %} + + +{% block subtitle %}List of Question Papers {% endblock %} + +{% block script %} +<script src="{{ URL_ROOT }}/static/exam/js/show_question.js"></script> +{% endblock %} + +{% block manage %} +<form name=frm action="" method="post"> +{% csrf_token %} +{% for i in papers %} +<input type="checkbox" name="papers" value="{{ i.id }}"> <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> +<button class="btn" type="submit" name='edit' value='edit' onClick="return confirm_edit(frm);">Edit Selected</button> +<button class="btn" type="submit" onClick="return confirm_delete(frm);" name='delete' value='delete'>Delete Selected</button> +</form> +{% endblock %} diff --git a/testapp/templates/manage.html b/testapp/templates/manage.html index 43578f7..0f122b0 100644 --- a/testapp/templates/manage.html +++ b/testapp/templates/manage.html @@ -30,8 +30,9 @@ <ul> <li><a href="{{ URL_ROOT }}/exam/manage/questions">Questions</a></li> <li><a href="{{ URL_ROOT }}/exam/manage/showquiz">Quizzes</a></li> + <li><a href="{{ URL_ROOT }}/exam/manage/showquestionpapers">Question Papers</a></li> <li><a href="{{ URL_ROOT }}/exam/manage/gradeuser">Grade User</a></li> - <li><a href="{{ URL_ROOT }}/exam/manage/monitor">Monitor</a></li> + <li><a href="{{ URL_ROOT }}/exam/manage/monitor">Monitor</a></li> </ul> <ul style="float:right;"> <li><strong><a style='cursor:pointer' onClick='location.replace("{{URL_ROOT}}/exam/complete/");'>Log out</a></strong></li> |