diff options
Diffstat (limited to 'yaksh/templates')
-rw-r--r-- | yaksh/templates/yaksh/course_detail.html | 2 | ||||
-rw-r--r-- | yaksh/templates/yaksh/course_detail_options.html | 5 | ||||
-rw-r--r-- | yaksh/templates/yaksh/statistics_question.html | 23 | ||||
-rw-r--r-- | yaksh/templates/yaksh/upload_download_course_md.html | 13 |
4 files changed, 34 insertions, 9 deletions
diff --git a/yaksh/templates/yaksh/course_detail.html b/yaksh/templates/yaksh/course_detail.html index 9f75a68..8661aea 100644 --- a/yaksh/templates/yaksh/course_detail.html +++ b/yaksh/templates/yaksh/course_detail.html @@ -55,6 +55,8 @@ {% include "yaksh/addteacher.html" %} {% elif is_teachers %} {% include "yaksh/course_teachers.html" %} + {% elif is_upload_download_md %} + {% include "yaksh/upload_download_course_md.html" %} {% else %} <div class="jumbotron"> <h1 class="display-4">Manage Course</h1> diff --git a/yaksh/templates/yaksh/course_detail_options.html b/yaksh/templates/yaksh/course_detail_options.html index 84f78ce..f9393ed 100644 --- a/yaksh/templates/yaksh/course_detail_options.html +++ b/yaksh/templates/yaksh/course_detail_options.html @@ -43,4 +43,9 @@ Current Teachers/TAs </a> </li> + <li class="nav-item"> + <a class="nav-link list-group-item {% if is_upload_download_md %} active {% endif %}" href="{% url 'yaksh:upload_download_course_md' course.id %}" data-toggle="tooltip" title="Upload / Download MD files" data-placement="top"> + Upload / Download MD + </a> + </li> </ul>
\ No newline at end of file diff --git a/yaksh/templates/yaksh/statistics_question.html b/yaksh/templates/yaksh/statistics_question.html index 5983835..d70256b 100644 --- a/yaksh/templates/yaksh/statistics_question.html +++ b/yaksh/templates/yaksh/statistics_question.html @@ -1,4 +1,5 @@ {% extends "manage.html" %} +{% load custom_filters %} {% block title %} Question Statistics {% endblock %} {% block pagetitle %} Statistics for {{ quiz.description }}{% endblock pagetitle %} @@ -20,8 +21,8 @@ {% if question_stats %} <p><b>Total number of participants: {{ total }}</b></p> <table class="table table-responsive-sm"> - <tr class="bg-light yakshred"><th>Question</th><th>Type</th><th>Total</th><th>Answered Correctly</th></tr> - {% for question, value in question_stats.items %} + <tr class="bg-light yakshred"><th>Question</th><th></th><th>Type</th><th>Total</th><th>Answered Correctly</th></tr> + {% for question, data in question_stats.items %} <tr> <td style="width: 45%"> <a href="#collapse_question_{{question.id}}" data-toggle="collapse"> @@ -61,12 +62,14 @@ <p> <ol> {% for tc in question.testcase_set.all %} - <li> - {{ tc.mcqtestcase.options|safe }} - {% if tc.mcqtestcase.correct %} - <span class="badge badge-success">Correct</span> - {% endif %} - </li> + <li> + {{ tc.mcqtestcase.options }} + {% if tc.mcqtestcase.correct %} + <span class="badge badge-primary">Correct</span> + {% endif %} + {% get_dict_value data.per_answer tc.id|stringformat:"i" as num %} + <span class="badge badge-info">Answered: {{ num }}</span> + </li> {% endfor %} </ol> </p> @@ -76,7 +79,9 @@ </div> </td> <td>{{ question.type }}</td> - <td>{{value.1}}</td><td>{{ value.0 }} ({% widthratio value.0 value.1 100 %}%)</td> + <td>{{data.answered.1}}</td><td>{{ data.answered.0 }} ({% widthratio data.answered.0 data.answered.1 100 %}%)</td> + + </tr> {% endfor %} </table> diff --git a/yaksh/templates/yaksh/upload_download_course_md.html b/yaksh/templates/yaksh/upload_download_course_md.html new file mode 100644 index 0000000..072ae4c --- /dev/null +++ b/yaksh/templates/yaksh/upload_download_course_md.html @@ -0,0 +1,13 @@ +<div> + <a href="{% url 'upload:download_course_md' course.id %}"> + <i class="fa fa-download"></i> Download + </a> + <br><br> + <form action="" method="POST" enctype="multipart/form-data"> + {% csrf_token %} + <input type="file" name="course_upload_md" required=""> + <button class="btn btn-outline-success" id="course_upload_md_btn" name="course_upload_md_btn"> + <i class="fa fa-upload"></i> Upload + </button> + </form> +</div>
\ No newline at end of file |