diff options
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/add_quiz.html | 12 | ||||
-rw-r--r-- | yaksh/templates/yaksh/design_questionpaper.html | 72 | ||||
-rw-r--r-- | yaksh/templates/yaksh/micromanaged.html | 22 | ||||
-rw-r--r-- | yaksh/templates/yaksh/micromonitor.html | 9 | ||||
-rw-r--r-- | yaksh/templates/yaksh/monitor.html | 31 | ||||
-rw-r--r-- | yaksh/templates/yaksh/question.html | 10 | ||||
-rw-r--r-- | yaksh/templates/yaksh/quit.html | 4 | ||||
-rw-r--r-- | yaksh/templates/yaksh/quizzes_user.html | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/statistics_question.html | 24 |
9 files changed, 129 insertions, 57 deletions
diff --git a/yaksh/templates/yaksh/add_quiz.html b/yaksh/templates/yaksh/add_quiz.html index 55e3bd6..9b80e0d 100644 --- a/yaksh/templates/yaksh/add_quiz.html +++ b/yaksh/templates/yaksh/add_quiz.html @@ -55,7 +55,7 @@ {% if quiz and course_id %} {% if quiz.questionpaper_set.get.id %} <center> - <a href="{% url 'yaksh:designquestionpaper' quiz.id quiz.questionpaper_set.get.id course_id %}" class="btn btn-primary"> + <a href="{% url 'yaksh:designquestionpaper' course_id quiz.id quiz.questionpaper_set.get.id %}" class="btn btn-primary"> <i class="fa fa-edit"></i> Edit Question Paper </a> <a href="{% url 'yaksh:preview_questionpaper' quiz.questionpaper_set.get.id %}" class="btn btn-info" target="_blank"> @@ -65,11 +65,11 @@ <br> <h4>You can check the quiz by attempting it in the following modes:</h4> <a class="btn btn-outline-info" name="button" href="{% url 'yaksh:test_quiz' 'usermode' quiz.id course_id %}" target="blank"> - User Mode + Try as student </a> - <a class="btn btn-outline-info" name="button" href="{% url 'yaksh:test_quiz' 'godmode' quiz.id course_id %}" target="blank"> - God Mode + <a class="btn btn-outline-primary" name="button" href="{% url 'yaksh:test_quiz' 'godmode' quiz.id course_id %}" target="blank"> + Try as teacher </a> <a data-toggle="modal" data-target="#help"> <span class="text-info"><i class="fa fa-info-circle"></i> Help</span></a> @@ -88,13 +88,13 @@ </div> <div class="modal-body"> <p> - <b>User Mode:</b> Attempt quiz the way normal users will attempt i.e. - + <b>Try as student:</b> Attempt quiz the way students will attempt i.e. - <ul class="list-group list-group-flush"> <li class="list-group-item">Quiz will have the same duration as that of the original quiz.</li> <li class="list-group-item">Quiz won't start if the course is inactive or the quiz time has expired.</li> <li class="list-group-item">You will be notified about quiz prerequisites.(You can still attempt the quiz though)</li> </ul> - <b>God Mode:</b> Attempt quiz without any time or eligibilty constraints. + <b>Try as teacher:</b> Attempt quiz without any time or eligibilty constraints. </p> </div> </div> diff --git a/yaksh/templates/yaksh/design_questionpaper.html b/yaksh/templates/yaksh/design_questionpaper.html index ffbdf5f..fcc3ed5 100644 --- a/yaksh/templates/yaksh/design_questionpaper.html +++ b/yaksh/templates/yaksh/design_questionpaper.html @@ -114,12 +114,47 @@ <div id="fixed-available-wrapper"> <p><u>Select questions to add:</u></p> <div id="fixed-available"> - {% if state == "fixed" or state == "None" %} + {% if questions %} + {% if state == "fixed" or state == "None" %} + <ul class="inputs-list"> + <h5><input id="add_checkall" name="add_checkall" type="checkbox"> Select All </h5> + {% for question in questions %} + <li> + <label> + <input type="checkbox" name="questions" data-qid="{{question.id}}" value={{question.id}}> + <span> + {% if user == question.user %} + <a href="{% url 'yaksh:add_question' question.id %}" target="_blank">{{ question.summary }}</a> + {% else %} + {{question.summary}} + {% endif %} + </span> + <span> {{ question.points }}</span> + </label> + </li> + {% endfor %} + </ul> + {% endif %} + {% endif %} + </div> + </div> + <br /> + <button id="add-fixed" name="add-fixed" class="btn btn-success pull-right" type="submit"> + <i class="fa fa-plus-square"></i> Add to paper + </button> + </div> + <div class="col-md-6"> + <div id="fixed-added-wrapper"> + <p><u>Fixed questions currently in paper:</u></p> + <div id="fixed-added"> + {% if fixed_questions %} <ul class="inputs-list"> - {% for question in questions %} + <h5><input id="remove_checkall" type="checkbox"> Select All </h5> + {% for question in fixed_questions %} <li> <label> - <input type="checkbox" name="questions" data-qid="{{question.id}}" value={{question.id}}> + <input type="checkbox" name="added-questions" + data-qid="{{question.id}}" value={{question.id}}> <span> {% if user == question.user %} <a href="{% url 'yaksh:add_question' question.id %}" target="_blank">{{ question.summary }}</a> @@ -127,7 +162,7 @@ {{question.summary}} {% endif %} </span> - <span> {{ question.points }}</span> + <span> {{ question.points }} </span> </label> </li> {% endfor %} @@ -136,35 +171,6 @@ </div> </div> <br /> - <button id="add-fixed" name="add-fixed" class="btn btn-success pull-right" type="submit"> - <i class="fa fa-plus-square"></i> Add to paper - </button> - </div> - <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> - {% if user == question.user %} - <a href="{% url 'yaksh:add_question' question.id %}" target="_blank">{{ question.summary }}</a> - {% else %} - {{question.summary}} - {% endif %} - </span> - <span> {{ question.points }} </span> - </label> - </li> - {% endfor %} - </ul> - </div> - </div> - <br /> <button id="remove-fixed" name="remove-fixed" class="btn btn-danger pull-right" type="submit"> <i class="fa fa-minus-square"></i> Remove from paper </button> diff --git a/yaksh/templates/yaksh/micromanaged.html b/yaksh/templates/yaksh/micromanaged.html new file mode 100644 index 0000000..336feec --- /dev/null +++ b/yaksh/templates/yaksh/micromanaged.html @@ -0,0 +1,22 @@ +{% if micromanagers %} +<hr> +<div class="row"> + {% for micromanager in micromanagers %} + {% if micromanager.attempts_permitted > 0 %} + <div class="col-md-8"> + <p> You have been given a special attempt to the {{ micromanager.quiz.description }} by the course creator</p> + </div> + <div class="col-md-3"> + {% if micromanager.can_student_attempt %} + <a class="btn btn-success" href="{% url 'yaksh:special_start' micromanager.id %}"> + Start Special Attempt + </a> + {% else %} + <span class="badge badge-secondary">Exhausted</span> + {% endif %} + </div> + {% endif %} + {% endfor %} +{% endif %} +</div> + diff --git a/yaksh/templates/yaksh/micromonitor.html b/yaksh/templates/yaksh/micromonitor.html new file mode 100644 index 0000000..cc059aa --- /dev/null +++ b/yaksh/templates/yaksh/micromonitor.html @@ -0,0 +1,9 @@ +{% if micromanager %} + {% if micromanager.can_student_attempt %} + <a class="btn btn-danger" href="{% url 'yaksh:revoke_special_attempt' micromanager.id %}">Revoke</a> + {% else %} + <a class="btn btn-success" href="{% url 'yaksh:allow_special_attempt' user_id course_id quiz_id %}">Allow </a> + {% endif %} +{% else %} + <a class="btn btn-success" href="{% url 'yaksh:allow_special_attempt' user_id course_id quiz_id %}">Allow </a> +{% endif %} diff --git a/yaksh/templates/yaksh/monitor.html b/yaksh/templates/yaksh/monitor.html index ef7b033..183ba99 100644 --- a/yaksh/templates/yaksh/monitor.html +++ b/yaksh/templates/yaksh/monitor.html @@ -74,6 +74,18 @@ $(document).ready(function() </div> </div> <br> + <br> + {% if messages %} + {% for message in messages %} + <div class="alert alert-dismissible alert-{{ message.tags }}"> + <button type="button" class="close" data-dismiss="alert"> + <i class="fa fa-close"></i> + </button> + <strong>{{ message }}</strong> + </div> + {% endfor %} + {% endif %} + <br> <div class="row"> <div class="col-md-4"> <a href="{% url 'yaksh:show_statistics' papers.0.question_paper.id course.id %}" class="btn btn-primary"> @@ -102,8 +114,9 @@ $(document).ready(function() <th> Institute <i class="fa fa-sort"></i> </th> <th> Marks <i class="fa fa-sort"></i> </th> <th> Attempts <i class="fa fa-sort"></i> </th> - <th> Time <i class="fa fa-sort"></i> </th> + <th> Time Left <i class="fa fa-sort"></i> </th> <th> Status <i class="fa fa-sort"></i> </th> + <th> Special Attempt <i class="fa fa-sort"></i> </th> </tr> </thead> <tbody> @@ -118,7 +131,20 @@ $(document).ready(function() <td> {{ paper.marks_obtained }} </td> <td> {{ paper.answers.count }} </td> <td id="time_left{{forloop.counter0}}"> {{ paper.time_left }} </td> - <td id="status{{forloop.counter0}}">{{ paper.status }}</td> + <td> {% if paper.is_attempt_inprogress %} + <form method="post" action="{% url 'yaksh:extend_time' paper.id %}"> + {% csrf_token %} + <div class="form-group"> + <label for="extra_time"> Time in mins </label> + <input type="number" class="form-control" id="extra_time" name="extra_time" required> + </div> + <button type="submit" class="btn btn-primary">Extend Time</button> + </form> + {% else %} + <span class="badge badge-secondary"> Completed </span> + {% endif %} + </td> + <td>{% specail_attempt_monitor paper.user.id course.id quiz.id %}</td> </tr> {% endfor %} </tbody> @@ -126,7 +152,6 @@ $(document).ready(function() <!-- CSV Modal --> <div class="modal fade" id="csvModal" role="dialog"> <div class="modal-dialog"> - <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html index ae2f9f4..3f7e67e 100644 --- a/yaksh/templates/yaksh/question.html +++ b/yaksh/templates/yaksh/question.html @@ -127,14 +127,14 @@ question_type = "{{ question.type }}"; <button type="button" class="close" data-dismiss="alert"> <i class="fa fa-close"></i> </button> - <strong>Note:</strong> {{ notification }} + {{ notification }} </div> {% else %} <div id="notification" class="alert alert-info col-md-8" role="alert"> <button type="button" class="close" data-dismiss="alert"> <i class="fa fa-close"></i> </button> - <strong>Note:</strong> {{ notification }} + {{ notification }} </div> {% endif %} {% else %} @@ -239,21 +239,21 @@ question_type = "{{ question.type }}"; <!-- Integer type question --> {% if question.type == "integer" %} Enter Integer:<br/> - <input autofocus class="form-control" name="answer" type="number" id="integer" value="{{ last_attempt|safe }}" /> + <input autofocus class="form-control" name="answer" type="number" id="integer" value="{{ last_attempt|to_integer }}" /> <br><br> {% endif %} <!-- String type question --> {% if question.type == "string" %} Enter Text:<br/> - <textarea autofocus name="answer" id="string" class="form-control" style="width: 100%">{{ last_attempt|safe }}</textarea> + <textarea autofocus name="answer" id="string" class="form-control" style="width: 100%">{{ last_attempt|to_str }}</textarea> <br/><br/> {% endif %} <!-- Float type question --> {% if question.type == "float" %} Enter Decimal Value :<br/> - <input autofocus class="form-control" name="answer" type="number" step="any" id="float" value="{{ last_attempt|safe }}" /> + <input autofocus class="form-control" name="answer" type="number" step="any" id="float" value="{{ last_attempt|to_float }}" /> <br/><br/> {% endif %} diff --git a/yaksh/templates/yaksh/quit.html b/yaksh/templates/yaksh/quit.html index ccb0893..a801ea8 100644 --- a/yaksh/templates/yaksh/quit.html +++ b/yaksh/templates/yaksh/quit.html @@ -56,7 +56,11 @@ {% csrf_token %} <center> <button class="btn btn-outline-success btn-lg" type="submit" name="yes">Yes</button> + {% if paper.is_special %} + <a class="btn btn-outline-danger btn-lg" name="no" href="{% url 'yaksh:skip_question' paper.questions.first.id paper.attempt_number module_id paper.question_paper.id course_id %}">No</a> + {% else %} <a class="btn btn-outline-danger btn-lg" name="no" href="{% url 'yaksh:start_quiz' paper.attempt_number module_id paper.question_paper.id course_id %}">No</a> + {% endif %} </center> </form> {% endblock content %} diff --git a/yaksh/templates/yaksh/quizzes_user.html b/yaksh/templates/yaksh/quizzes_user.html index a9f5a43..e28cb69 100644 --- a/yaksh/templates/yaksh/quizzes_user.html +++ b/yaksh/templates/yaksh/quizzes_user.html @@ -1,4 +1,5 @@ {% extends "user.html" %} +{% load custom_filters %} {% block title %} Student Dashboard {% endblock %} {% block script %} @@ -104,6 +105,7 @@ {% endif %} </div> </div> + {% show_special_attempt user.id course.data.id %} </div> <div id="collapse{{course.data.id}}" class="collapse hide" data-parent="#accordion"> <div class="card-body"> diff --git a/yaksh/templates/yaksh/statistics_question.html b/yaksh/templates/yaksh/statistics_question.html index 9a54501..52c29d3 100644 --- a/yaksh/templates/yaksh/statistics_question.html +++ b/yaksh/templates/yaksh/statistics_question.html @@ -1,9 +1,10 @@ {% extends "manage.html" %} +{% block title %} Question Statistics {% endblock %} {% block pagetitle %} Statistics for {{ quiz.description }}{% endblock pagetitle %} {% block content %} -<div class="container"> +<div class="container-fluid"> <div class="row"> <div class="col-md-2"> <ul class="list-group"> @@ -18,16 +19,14 @@ <div class="col-md-9"> {% if question_stats %} <p><b>Total number of participants: {{ total }}</b></p> - <table class="table table-bordered table-responsive-sm"> - <tr class="bg-light yakshred"><th>Question</th><th>Type</th><th>Total</th><th>Answered Correctly</th></tr> + <table class="table table-responsive-sm"> + <tr class="bg-light yakshred"><th>Question</th><th></th><th>Type</th><th>Total</th><th>Answered Correctly</th></tr> {% for question, value in question_stats.items %} <tr> - <td>{{ question.summary }} - <button class="btn btn-primary" type="button" data-toggle="collapse" data-target="#collapse_question_{{question.id}}" aria-expanded="false" aria-controls="collapseExample"> - More - </button> + <td width="45%">{{ question.summary }} <div class="collapse" id="collapse_question_{{question.id}}"> - <div class="card card-body" style="width: 18rem;"> + <br> + <div class="card card-body"> <strong> Summary: </strong> @@ -38,7 +37,7 @@ Description: </strong> <p> - {{ question.description }} + {{ question.description|safe }} </p> <strong> Points: @@ -50,7 +49,7 @@ Type: </strong> <p> - {{ question.type }} + {{ question.get_type_display }} </p> {% if question.type in 'mcq mcc' %} <strong> @@ -72,6 +71,11 @@ </div> </div> </td> + <td> + <button class="btn btn-outline-primary" type="button" data-toggle="collapse" data-target="#collapse_question_{{question.id}}" aria-expanded="false" aria-controls="collapseExample"> + <i class="fa fa-angle-down"></i> More + </button> + </td> <td>{{ question.type }}</td> <td>{{value.1}}</td><td>{{ value.0 }} ({% widthratio value.0 value.1 100 %}%)</td> |