diff options
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/add_question.html | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/add_quiz.html | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/ajax_questions.html | 31 | ||||
-rw-r--r-- | yaksh/templates/yaksh/courses.html | 25 | ||||
-rw-r--r-- | yaksh/templates/yaksh/design_questionpaper.html | 175 |
5 files changed, 125 insertions, 110 deletions
diff --git a/yaksh/templates/yaksh/add_question.html b/yaksh/templates/yaksh/add_question.html index 9142bb7..c0d53f8 100644 --- a/yaksh/templates/yaksh/add_question.html +++ b/yaksh/templates/yaksh/add_question.html @@ -18,7 +18,7 @@ <center><table class="table"> <tr><td>Summary: <td>{{ form.summary }}{{ form.summary.errors }} <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> Type: <td> {{ 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}} diff --git a/yaksh/templates/yaksh/add_quiz.html b/yaksh/templates/yaksh/add_quiz.html index c674f4b..97bf5a2 100644 --- a/yaksh/templates/yaksh/add_quiz.html +++ b/yaksh/templates/yaksh/add_quiz.html @@ -20,7 +20,7 @@ </table> </center> - <center><button class="btn" type="submit" id="submit" name="questionpaper">Design Question Paper</button> + <center><button class="btn" type="submit" id="submit" name="questionpaper"> Save </button> <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/courses/");'>Cancel</button> </center> diff --git a/yaksh/templates/yaksh/ajax_questions.html b/yaksh/templates/yaksh/ajax_questions.html deleted file mode 100644 index e343f9b..0000000 --- a/yaksh/templates/yaksh/ajax_questions.html +++ /dev/null @@ -1,31 +0,0 @@ -<div id="questions"> - {% if questions %} - <input type="checkbox" id="checkall" class="ignore"> - <span><b> <font size="3"> Select All </font></b></span> - {% endif %} - <ul class="inputs-list"> - - {% for question in questions %} - <li> - <label> - <input type="checkbox" name="questions" data-qid="{{question.id}}"> - <span> {{ question.summary }} </span> - </label> - </li> - {% endfor %} - </ul> -</div> - -<div id="num"> - <select id="numbers"> - <option value="">Number of questions to be picked from the pool</option> - {% for q in questions %} - {% if forloop.counter0 != 0 %} - <option value={{forloop.counter0}}>{{ forloop.counter0}}</option> - {% endif %} - {% if questions|length == 1%} - <option value=1>1</option> - {% endif %} - {% endfor %} - </select> -</div> diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html index 0a61d72..24e29af 100644 --- a/yaksh/templates/yaksh/courses.html +++ b/yaksh/templates/yaksh/courses.html @@ -18,11 +18,10 @@ {% if user != course.creator %} <h4> {{course.creator.get_full_name}} added you to this course</h4> {% endif %} - <div class="row show-grid"> <div class="span14"> <div class="row"> - <div class="span6"> + <div class="span4"> <p> <b><u>Course</u></b> {% if course.active %} @@ -35,7 +34,7 @@ </br></br> {% if user == course.creator %} <div class="row"> - <div class="span6 wrap"> + <div class="span3 wrap"> <center><b><u>Teacher(s) Added to {{ course }}</u></b></center> {% if course.get_teachers %} <div align="left"> @@ -65,12 +64,23 @@ <p><b><a href="{{URL_ROOT}}/exam/manage/searchteacher/{{course.id}}/">Add Teacher</a></b></p> </div> {% endif %} - <div class="span6"> - <p><b><u>Quiz(zes)</u></b></p> + <div class="span4" style="text-align:left"> {% if course.get_quizzes %} - {% for quiz in course.get_quizzes %} + <p><b><u>Quiz(zes)</u></b></p> + {% for quiz in course.get_quizzes %} <a href="{{URL_ROOT}}/exam/manage/addquiz/{{course.id}}/{{quiz.id}}/">{{ quiz.description }}</a><br> - + {% endfor %} + </div> + <div class="span4" style="text-align:left"> + <p><b><u>Question Paper(s)</u></b></p> + {% for quiz in course.get_quizzes %} + {% if quiz.questionpaper_set.get %} + <a href="{{URL_ROOT}}/exam/manage/designquestionpaper/{{ quiz.id }}/{{quiz.questionpaper_set.get.id}}/">Question Paper for {{ quiz.description }}</a><br> + {% else %} + <p><b>No Question Paper </b> + <button class="btn small primary" type="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/quiz/designquestionpaper/{{ quiz.id }}/");'>Add</button> + </p> + {% endif %} {% endfor %} {% else %} <p><b>No quiz </b></p> @@ -79,7 +89,6 @@ </div> <br/> <button class="btn primary"type="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/addquiz/{{course.id}}/");'>Add New Quiz</button> - </div> </div> <br><br> diff --git a/yaksh/templates/yaksh/design_questionpaper.html b/yaksh/templates/yaksh/design_questionpaper.html index 9c190b7..387402a 100644 --- a/yaksh/templates/yaksh/design_questionpaper.html +++ b/yaksh/templates/yaksh/design_questionpaper.html @@ -1,12 +1,12 @@ {% extends "manage.html" %} -{% block subtitle %}Design Question Paper{% endblock %} +{% block title %} Design Question Paper {% endblock title %} + +{% block subtitle %} Design Question Paper {% endblock %} {% block css %} -<link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/base.css" type="text/css" /> -<link rel="stylesheet" href="{{ URL_ROOT }}/static/yaksh/css/question_quiz.css" type="text/css" /> -<link rel="stylesheet" media="all" type="text/css" href="{{ URL_ROOT }}/static/yaksh/css/autotaggit.css" /> -<link rel="stylesheet" media="all" type="text/css" href="{{ URL_ROOT }}/static/yaksh/css/question_paper_creation.css" /> + <link rel="stylesheet" media="all" type="text/css" href="{{ URL_ROOT }}/static/yaksh/css/bootstrap.css" /> + <link rel="stylesheet" media="all" type="text/css" href="{{ URL_ROOT }}/static/yaksh/css/question_paper_creation.css" /> <style> select { @@ -14,17 +14,20 @@ select } </style> {% endblock %} -{% block script %} -<script src="{{ URL_ROOT }}/static/yaksh/js/jquery-1.4.2.min.js" type="text/javascript"></script> -<script src="{{ URL_ROOT }}/static/yaksh/js/bootstrap-tabs.js"></script> -<script src="{{ URL_ROOT }}/static/yaksh/js/add_questionpaper.js"></script> -<script src="{{ URL_ROOT }}/static/yaksh/js/question_paper_creation.js"></script> -<script src="{{ URL_ROOT }}/static/yaksh/js/bootstrap-modal.js"></script> +{% block script %} + <script src="{{ URL_ROOT }}/static/yaksh/js/jquery-1.9.1.min.js"></script> + <script src="{{ URL_ROOT }}/static/yaksh/js/bootstrap.js"></script> + <script src="{{ URL_ROOT }}/static/yaksh/js/bootstrap-tabs.js"></script> + <script src="{{ URL_ROOT }}/static/yaksh/js/question_paper_creation.js"></script> {% endblock %} {% block content %} <input type=hidden id="url_root" value={{ URL_ROOT }}> +<form action="{{ URL_ROOT }}/exam/manage/designquestionpaper/{{ qpaper.quiz.id }}/{{ qpaper.id }}/" method="POST"> +<input class ="btn primary small" type="submit" name="back" id="back" value="Cancel"> + {% csrf_token %} + <input type=hidden name="is_active" id="is_active" value="{{ state }}"> <center><b>Manual mode to design the {{lang}} Question Paper</center><br> <ul class="tabs" data-tabs="tabs"> <li class="active" id="fixed-tab"> @@ -46,42 +49,62 @@ select </a></li> </ul> -<form action="{{URL_ROOT}}/exam/manage/designquestionpaper/" method="post" name=frm > {% csrf_token %} <div> - <h3>Total Marks: <span id="total_marks" class="well">0</span></h3> + <h3>Total Marks: <span id="total_marks" class="well"> {{ qpaper.total_marks }} </span></h3> </div> <div class="tab-content"> <!-- common to fixed and random questions --> <div class="row" id="selectors"> <h5 style="padding-left: 20px;">Please select Question type and Marks</h5> - <div class="span4"> - {{ form.question_type }} - </div> <!-- /.span4 --> - <div class="span4"> - {{ form.marks }} - </div> <!-- /.span4 --> - <div class="span4"> - <div class="pull-left" id="number-wrapper"></div> - </div> <!-- /.span4 --> + <div class="col-md-6"> + {{ filter_form.question_type }} + </div> + <div class="col-md-6"> + {{ filter_form.marks }} + </div> </div> <!-- /.row --> <br><br> - <div class="tab-pane active" id="fixed-questions"> <div class="row"> - <div class="span7"> + <div class="col-md-6"> <div id="fixed-available-wrapper"> <p><u>Select questions to add:</u></p> <div id="fixed-available"> + {% if state == "fixed" or state == "None" %} + <ul class="inputs-list"> + {% for question in questions %} + <li> + <label> + <input type="checkbox" name="questions" data-qid="{{question.id}}" value={{question.id}}> + <span> {{ question.summary }} </span> <span> {{ question.points }} </span> + </label> + </li> + {% endfor %} + </ul> + {% endif %} </div> - <a id="add-fixed" class="btn small primary pull-right" href="#">Add to paper</a> + <br /><br /> + <button id="add-fixed" name="add-fixed" class="btn small primary pull-right" type="submit">Add to paper</button> </div> </div> - <div class="span7"> + <div class="col-md-6"> <div id="fixed-added-wrapper"> <p><u>Fixed questions currently in paper:</u></p> <div id="fixed-added"> + <ul class="inputs-list"> + {% for question in fixed_questions %} + <li> + <label> + <input type="checkbox" name="added-questions" data-qid="{{question.id}}" value={{question.id}}> + <span> {{ question.summary }} </span> <span> {{ question.points }} </span> + </label> + </li> + {% endfor %} + </ul> </div> + <br /> + <button id="remove-fixed" name="remove-fixed" class="btn small primary pull-right" type="submit"> Remove from paper</button> </div> </div> </div> <!-- /.row --> @@ -89,25 +112,66 @@ select <div class="pull-right"> <a class="btn" id="fixed-next">Next ></a> </div> - </div> <!-- /#fixed-questions --> - <div class="tab-pane" id="random-questions"> <div class="row"> - <div class="span7"> + <div class="col-md-6"> <div id="random-available-wrapper"> <p><u>Select questions to add to the pool:</u></p> <div id="random-available"> + {% if state == "random" %} + <select id="num_of_questions" name="num_of_questions"> + <option value="1">Number of questions to be picked from the pool</option> + {% for q in questions %} + {% if forloop.counter0 != 0 %} + <option value={{forloop.counter0}}>{{ forloop.counter0}}</option> + {% endif %} + {% if questions|length == 1%} + <option value=1>1</option> + {% endif %} + {% endfor %} + </select> + <ul class="inputs-list"> + {% for question in questions %} + <li> + <label> + <input type="checkbox" name="random_questions" data-qid="{{question.id}}" value={{question.id}}> + <span> {{ question.summary }} </span> <span> {{ question.points }} </span> + </label> + </li> + {% endfor %} + </ul> + {% endif %} </div> - <a id="add-random" class="btn small primary pull-right" href="#">Add to paper</a> + <br /><br /> + <button id="add-random" name="add-random" class="btn small primary pull-right" type="submit">Add to paper</button> </div> </div> - <div class="span7"> + <div class="col-md-6"> <div id="random-added-wrapper"> <p><u>Pool of questions currently in paper:</u></p> <div id="random-added"> + <ul class="inputs-list"> + {% for random_set in random_sets %} + <li> + <label> + <input type="checkbox" name="random_sets" data-qid="{{random_set.id}}" value={{random_set.id}}> + <span> Random Set {{ forloop.counter }} (will take {{ random_set.num_questions }} randomly out of {{ random_set.questions.count }})</span> + </label> + </li> + {% for question in random_set.questions.all %} + <li> + <label> + <span> {{ question.summary }} </span> <span> {{ question.points }} </span> + </label> + </li> + {% endfor %} + {% endfor %} + </ul> </div> + <br /> + <button id="remove-random" name="remove-random" class="btn small primary pull-right" type="submit"> Remove from paper</button> </div> </div> </div> <!-- /.row --> @@ -124,11 +188,10 @@ select <center> <h5>Almost finished creating your question paper</h5> <label style="float: none;"> - {{ form.shuffle_questions }} + {{ qpaper_form.shuffle_questions }} <span>Auto shuffle.</span> </label> <br><br> - <input class ="btn primary large" type="button" id="preview" value="Preview question paper"> - <input class ="btn primary large" type="button" id="save" value="Save question paper"> + <input class ="btn primary large" type="submit" name="save" id="save" value="Save question paper"> <br> <div class="pull-left"> <a class="btn" id="finish-prev">< Previous</a> @@ -139,44 +202,18 @@ select <!-- /.tab-content --> </form> <br> -<div class="clearfix"></div> - -<!-- Modal --> -<div class="modal fade " id="myModal" > - <div class="modal-dialog"> - <div class="modal-content"> - <div class="modal-header"> - <h4 class="modal-title" id="myModalLabel">Question Paper Preview</h4> - </div> - <div id = "modal_body"class="modal-body"> - </div> - <div class="modal-footer"> - <button type="button" class="btn primary close" data-dismiss="modal">OK</button> - </div> - </div> - </div> -</div> - -<div class="modal fade " id="modalSave" > - <div class="modal-dialog"> - <div class="modal-content"> - <div class="modal-header"> - <h4 class="modal-title" id="myModalLabel">Cannot Save</h4> - </div> - <div class="modal-body"> - Please select questions for your paper - </div> - <div class="modal-footer"> - <button type="button" class="btn primary close" data-dismiss="modal">OK</button> - </div> - </div> - </div> -</div> -</div> - <script> $(function () { $('.tabs').tabs() + {% if state == "fixed" %} + $('#fixed').tab('show'); + {% elif state == "random" %} + $("#random").tab('show'); + {% elif state == "finish" %} + $('#finished').tab('show'); + {% endif %} }) </script> {% endblock %} +{% block manage %} +{% endblock %} |