diff options
author | King | 2020-09-08 18:11:33 +0530 |
---|---|---|
committer | GitHub | 2020-09-08 18:11:33 +0530 |
commit | e4bfcb650e76579f0fc5daee264c7cb3da90eced (patch) | |
tree | 97b40b2f4f4dc04cc81c42e965331477d6bc2c46 /yaksh/templates | |
parent | 9569e3ef6bbaeb8b36ad78c272006a538e044894 (diff) | |
parent | 44b64f9ad0f0618d15ee99026a33df14937d3ef4 (diff) | |
download | online_test-e4bfcb650e76579f0fc5daee264c7cb3da90eced.tar.gz online_test-e4bfcb650e76579f0fc5daee264c7cb3da90eced.tar.bz2 online_test-e4bfcb650e76579f0fc5daee264c7cb3da90eced.zip |
Merge pull request #755 from prathamesh920/allow-special-attempt
Provide additional attempt to a selected student or extend time.
Diffstat (limited to 'yaksh/templates')
-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/quit.html | 4 | ||||
-rw-r--r-- | yaksh/templates/yaksh/quizzes_user.html | 2 |
5 files changed, 65 insertions, 3 deletions
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/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"> |