summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/add_course.html18
-rw-r--r--yaksh/templates/yaksh/add_exercise.html14
-rw-r--r--yaksh/templates/yaksh/add_lesson.html10
-rw-r--r--yaksh/templates/yaksh/add_module.html5
-rw-r--r--yaksh/templates/yaksh/add_question.html30
-rw-r--r--yaksh/templates/yaksh/add_quiz.html14
-rw-r--r--yaksh/templates/yaksh/ajax_question_filter.html57
-rw-r--r--yaksh/templates/yaksh/course_added_modules.html141
-rw-r--r--yaksh/templates/yaksh/course_detail_options.html19
-rw-r--r--yaksh/templates/yaksh/course_forum.html115
-rw-r--r--yaksh/templates/yaksh/course_modules.html9
-rw-r--r--yaksh/templates/yaksh/courses.html35
-rw-r--r--yaksh/templates/yaksh/design_course_session.html8
-rw-r--r--yaksh/templates/yaksh/design_questionpaper.html9
-rw-r--r--yaksh/templates/yaksh/paginator.html7
-rw-r--r--yaksh/templates/yaksh/post_comments.html71
-rw-r--r--yaksh/templates/yaksh/question.html1
-rw-r--r--yaksh/templates/yaksh/showquestions.html373
18 files changed, 546 insertions, 390 deletions
diff --git a/yaksh/templates/yaksh/add_course.html b/yaksh/templates/yaksh/add_course.html
index 97c6f56..0072a95 100644
--- a/yaksh/templates/yaksh/add_course.html
+++ b/yaksh/templates/yaksh/add_course.html
@@ -26,22 +26,10 @@
Add/Edit Course
</a>
</li>
- <li class="nav-item dropdown hide">
- <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="true">More</a>
- <div class="dropdown-menu hide" x-placement="bottom-start" style="position: absolute; transform: translate3d(0px, 37px, 0px); top: 0px; left: 0px; will-change: transform;">
- <a class="dropdown-item" href="{% url 'yaksh:show_all_quizzes' %}">
- View Quizzes
- </a>
- <a class="dropdown-item" href="{% url 'yaksh:show_all_lessons' %}">
- View Lessons
- </a>
- <a class="dropdown-item" href="{% url 'yaksh:show_all_modules' %}">
- View Modules
- </a>
- <a href="{% url 'grades:grading_systems'%}" class="dropdown-item" >
- View Grading Systems
+ <li class="nav-item">
+ <a href="{% url 'grades:grading_systems'%}" class="nav-link" >
+ Add/View Grading Systems
</a>
- </div>
</li>
</ul>
</div>
diff --git a/yaksh/templates/yaksh/add_exercise.html b/yaksh/templates/yaksh/add_exercise.html
index d3d9068..542d1c4 100644
--- a/yaksh/templates/yaksh/add_exercise.html
+++ b/yaksh/templates/yaksh/add_exercise.html
@@ -23,17 +23,9 @@
</div>
{% endfor %}
{% endif %}
- {% if course_id %}
- <a class="btn btn-primary" href="{% url 'yaksh:get_course_modules' course_id %}">
- <i class="fa fa-arrow-left"></i>
- Back
- </a>
- {% else %}
- <a class="btn btn-primary" href="{% url 'yaksh:show_all_quizzes' %}">
- <i class="fa fa-arrow-left"></i>
- Back
- </a>
- {% endif %}
+ <a class="btn btn-primary" href="{% url 'yaksh:get_course_modules' course_id %}">
+ <i class="fa fa-arrow-left"></i>&nbsp;Back
+ </a>
<br><br>
<form name=frm id=frm action="" method="post" >
{% csrf_token %}
diff --git a/yaksh/templates/yaksh/add_lesson.html b/yaksh/templates/yaksh/add_lesson.html
index 99fc31a..b984db0 100644
--- a/yaksh/templates/yaksh/add_lesson.html
+++ b/yaksh/templates/yaksh/add_lesson.html
@@ -26,17 +26,9 @@
<div class="container">
<div class="row justify-content-center form-group">
<div class="col-md-9 col-md-offset-4">
- {% if course_id %}
<a class="btn btn-primary" href="{% url 'yaksh:get_course_modules' course_id %}">
- <i class="fa fa-arrow-left"></i>
- Back
+ <i class="fa fa-arrow-left"></i>&nbsp;Back
</a>
- {% else %}
- <a class="btn btn-primary" href="{% url 'yaksh:show_all_lessons' %}">
- <i class="fa fa-arrow-left"></i>
- Back
- </a>
- {% endif %}
<br>
{% if messages %}
<br>
diff --git a/yaksh/templates/yaksh/add_module.html b/yaksh/templates/yaksh/add_module.html
index edbfaa2..262c009 100644
--- a/yaksh/templates/yaksh/add_module.html
+++ b/yaksh/templates/yaksh/add_module.html
@@ -110,7 +110,7 @@
<!-- Add learning Units -->
{% if status == "design" %}
<div class="container">
-<center><h3><u>Add/Edit Learning Units</h3></u></center>
+<center><h2><u>{{module.name}}</u></h2></center>
{% if course_id %}
<form action="{% url 'yaksh:design_module' module_id course_id %}" method="POST" id="design_course_form">
{% else %}
@@ -161,8 +161,7 @@
<th width="25%" colspan="2">Check Prerequisite
<br>
<a href="#" data-toggle="tooltip" id="prereq_msg">
- <span class="glyphicon glyphicon-question-sign">
- </span> What's This
+ What's This&nbsp;<i class="fa fa-question-circle"></i>
</a>
</th>
</tr>
diff --git a/yaksh/templates/yaksh/add_question.html b/yaksh/templates/yaksh/add_question.html
index 17cdcfe..0c846d0 100644
--- a/yaksh/templates/yaksh/add_question.html
+++ b/yaksh/templates/yaksh/add_question.html
@@ -74,18 +74,6 @@
</div>
</td>
</tr>
- {% if question %}
- <tr><td>Add Test Case:</td>
- <td>
- <select id="case_type" class="form-control" name="case_type" onchange="frm.submit()">
- <option value="" selected="selected">Select Testcase</option>
- {% for key, value in testcase_options %}
- <option value="{{key}}">{{value}}</option>
- {% endfor %}
- </select>
- </td>
- </tr>
- {% endif %}
</table>
{% if uploaded_files %}
<div class="card">
@@ -127,6 +115,22 @@
<h3>Test Cases</h3>
</div>
<div class="card-body">
+ {% if question %}
+ <div class="row">
+ <div class="col pb-4">
+ <tr><td>Add Test Case:</td>
+ <td>
+ <select id="case_type" class="form-control" name="case_type" onchange="frm.submit()">
+ <option value="" selected="selected">Select Testcase</option>
+ {% for key, value in testcase_options %}
+ <option value="{{key}}">{{value}}</option>
+ {% endfor %}
+ </select>
+ </td>
+ </tr>
+ </div>
+ </div>
+ {% endif %}
{% for formset in formsets %}
{{ formset.management_form }}
<div id="accordion">
@@ -141,7 +145,7 @@
</div>
<div class="ml-auto">
<a class="card-link" data-toggle="collapse" href="#collapse{{form.instance.id}}">
- <i class="fa fa-toggle-down"></i>
+ Details&nbsp;<i class="fa fa-angle-down"></i></i>
</a>
</div>
</div>
diff --git a/yaksh/templates/yaksh/add_quiz.html b/yaksh/templates/yaksh/add_quiz.html
index 5497eeb..55e3bd6 100644
--- a/yaksh/templates/yaksh/add_quiz.html
+++ b/yaksh/templates/yaksh/add_quiz.html
@@ -35,17 +35,9 @@
</div>
{% endfor %}
{% endif %}
- {% if course_id %}
- <a class="btn btn-primary" href="{% url 'yaksh:get_course_modules' course_id %}">
- <i class="fa fa-arrow-left"></i>
- Back
- </a>
- {% else %}
- <a class="btn btn-primary" href="{% url 'yaksh:show_all_quizzes' %}">
- <i class="fa fa-arrow-left"></i>
- Back
- </a>
- {% endif %}
+ <a class="btn btn-primary" href="{% url 'yaksh:get_course_modules' course_id %}">
+ <i class="fa fa-arrow-left"></i>&nbsp;Back
+ </a>
<br><br>
<form name=frm id=frm action="" method="post" >
{% csrf_token %}
diff --git a/yaksh/templates/yaksh/ajax_question_filter.html b/yaksh/templates/yaksh/ajax_question_filter.html
deleted file mode 100644
index 18f14ff..0000000
--- a/yaksh/templates/yaksh/ajax_question_filter.html
+++ /dev/null
@@ -1,57 +0,0 @@
-<div id="questions">
- <script>
- $(document).ready(function(){
- $("#checkall").change(function(){
- if($(this).prop("checked")) {
- $("#filtered-questions input:checkbox").each(function(index, element) {
- $(this).prop('checked', true);
- });
- }
- else {
- $("#filtered-questions input:checkbox").each(function(index, element) {
- $(this).prop('checked', false);
- });
- }
- });
- });
- </script>
- <br>
- <a class="btn btn-lg btn-success" href="{% url 'yaksh:add_question' %}">
- <i class="fa fa-plus-circle"></i>&nbsp;Add Question
- </a>
- <br><br>
- {% if questions %}
- {% include "yaksh/paginator.html" %}
-
- <h5 class="highlight"><input type="checkbox" id="checkall">
- Select All
- </h5>
- <ul class="inputs-list">
- <table id="questions-table" class="tablesorter table table table-striped">
- <thead>
- <tr>
- <th> Select </th>
- <th> Summary </th>
- <th> Language </th>
- <th> Type </th>
- <th> Marks </th>
- </tr>
- </thead>
- <tbody>
- {% for question in questions %}
- <tr>
- <td>
- <input type="checkbox" name="question" value="{{ question.id }}">
- </td>
- <td><a href="{% url 'yaksh:add_question' question.id %}">{{question.summary|capfirst}}</a></td>
- <td>{{question.language|capfirst}}</td>
- <td>{{question.type|capfirst}}</td>
- <td>{{question.points}}</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </ul>
- {% include "yaksh/paginator.html" %}
- {% endif %}
-</div>
diff --git a/yaksh/templates/yaksh/course_added_modules.html b/yaksh/templates/yaksh/course_added_modules.html
index c70eb7a..2d194b9 100644
--- a/yaksh/templates/yaksh/course_added_modules.html
+++ b/yaksh/templates/yaksh/course_added_modules.html
@@ -1,46 +1,113 @@
{% if is_modules %}
{% block pagetitle %} <center> <h3>Course Modules</h3> </center> {% endblock %}
+ <a href="{% url 'yaksh:add_module' course.id %}" class="btn btn-primary btn-lg">
+ <i class="fa fa-plus-circle"></i>&nbsp;Add Module
+ </a>
+ <br><br>
{% if modules %}
- <table class="table table-responsive">
- <tr>
- <th>Module</th>
- <th>Module Design</th>
- <th>Lessons/Quizzes</th>
- </tr>
+ <center>
+ <div class="alert alert-dismissible alert-info">
+ <strong>
+ For additional module settings, Click on Design Module
+ </strong>
+ </div>
+ </center>
{% for module in modules %}
- <tr>
- <td>
- <a href="{% url 'yaksh:edit_module' module.id course.id %}">
- {{module.name}}</a>
- </td>
- <td>
- <a href="{% url 'yaksh:design_module' module.id course.id %}">
- Add Quizzes/Lessons for {{module.name}}
- </a>
- </td>
- <td>
- {% for unit in module.get_learning_units %}
- <ul class="inputs-list">
- <li>
- {% if unit.type == "quiz" %}
- {% if unit.quiz.is_exercise %}
- <a href="{% url 'yaksh:edit_exercise' unit.quiz.id course.id %}">
- {{unit.quiz.description}}</a>
+ <div class="card">
+ <div class="card-header">
+ <a href="{% url 'yaksh:edit_module' course.id module.id %}">
+ <i class="fa fa-edit"></i>&nbsp;{{module.name}}
+ </a>
+ </div>
+ <div class="card-body">
+ <div class="row">
+ <div class="col">
+ <a href="{% url 'yaksh:edit_lesson' course.id module.id %}" class="btn btn-info">
+ <i class="fa fa-plus-circle"></i>&nbsp;Add Lesson
+ </a>
+ </div>
+ <div class="col">
+ <a href="{% url 'yaksh:add_quiz' course.id module.id %}" class="btn btn-success">
+ <i class="fa fa-plus-circle"></i>&nbsp;Add Quiz
+ </a>
+ </div>
+ <div class="col">
+ <a href="{% url 'yaksh:add_exercise' course.id module.id %}" class="btn btn-dark">
+ <i class="fa fa-plus-circle"></i>&nbsp;Add Exercise
+ </a>
+ </div>
+ <div class="col">
+ <a href="{% url 'yaksh:design_module' module.id course.id %}" class="btn btn-secondary">
+ Design Module
+ </a>
+ </div>
+ </div>
+ <br>
+ {% with module.get_learning_units as units %}
+ {% if units %}
+ <p><b><u>Lessons/Quizzes/Exercise</u></b><p>
+ <table class="table table-responsive-sm">
+ {% for unit in units %}
+ <tr>
+ <td>
+ {% if unit.type == "quiz" %}
+ {% if unit.quiz.is_exercise %}
+ <a href="{% url 'yaksh:edit_exercise' course.id module.id unit.quiz.id %}">
+ {{unit.quiz.description}}</a>
+ {% else %}
+ <a href="{% url 'yaksh:edit_quiz' course.id module.id unit.quiz.id %}">
+ {{unit.quiz.description}}</a>
+ {% endif %}
+ {% else %}
+ <a href="{% url 'yaksh:edit_lesson' course.id module.id unit.lesson.id %}">
+ {{unit.lesson.name}}</a>
+ {% endif %}
+ </td>
+ <td>
+ {% if unit.type == "quiz" %}
+ {% with unit.quiz as quiz %}
+ {% if quiz.questionpaper_set.get.id %}
+ <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>
+ {% else %}
+ <a href="{% url 'yaksh:designquestionpaper' course.id quiz.id %}" class="btn btn-success">
+ <i class="fa fa-plus-circle"></i>
+ Add Question Paper
+ </a>
+ {% endif %}
+ {% endwith %}
+ {% else %}
+ -------
+ {% endif %}
+ </td>
+ <td>
+ {% if unit.type == "quiz" %}
+ {% if unit.quiz.is_exercise %}
+ Exercise
+ {% else %}
+ Quiz
+ {% endif %}
+ {% else %}
+ Lesson
+ {% endif %}
+ </td>
+ </tr>
+ {% endfor %}
+ </table>
{% else %}
- <a href="{% url 'yaksh:edit_quiz' unit.quiz.id course.id %}">
- {{unit.quiz.description}}</a>
+ <center>
+ <span class="badge badge-warning">
+ <big>No lesson/quiz added</big>
+ </span>
+ </center>
{% endif %}
- {% else %}
- <a href="{% url 'yaksh:edit_lesson' unit.lesson.id course.id %}">
- {{unit.lesson.name}}</a>
- {% endif %}
- </li>
- </ul>
- {% endfor %}
- </td>
- </tr>
- {% endfor %} <!-- end for modules -->
- </table>
+ {% endwith %}
+ </div>
+ </div>
+ <br>
+ {% endfor %}
{% else %}
<center>
<span class="badge badge-warning"><big>No learning modules</big></span>
diff --git a/yaksh/templates/yaksh/course_detail_options.html b/yaksh/templates/yaksh/course_detail_options.html
index 6f9a711..4dd4dda 100644
--- a/yaksh/templates/yaksh/course_detail_options.html
+++ b/yaksh/templates/yaksh/course_detail_options.html
@@ -5,13 +5,18 @@
</a>
</li>
<li class="nav-item">
- <a href="{% url 'yaksh:course_students' course.id %}" id="enroll-students" class="nav-link list-group-item {% if is_students %} active {% endif %}" title="View the course requested, rejected and added students" data-placement="top" data-toggle="tooltip">
+ <a href="{% url 'yaksh:course_students' course.id %}" id="enroll-students" class="nav-link list-group-item {% if is_students %} active {% endif %}" title="View the course requested, rejected and enrolled students" data-placement="top" data-toggle="tooltip">
Enroll Students
</a>
</li>
<li class="nav-item">
- <a href="{% url 'yaksh:send_mail' course.id %}" class="nav-link list-group-item {% if is_mail %} active {% endif %}" title="Send mail to course students" data-placement="top" data-toggle="tooltip">
- Send Mail
+ <a class="nav-link list-group-item {% if is_modules %} active {% endif %}" href="{% url 'yaksh:get_course_modules' course.id %}" title="View modules added to the course" data-placement="top" data-toggle="tooltip">
+ Course Modules
+ </a>
+ </li>
+ <li class="nav-item">
+ <a class="nav-link list-group-item {% if is_design_course %} active {% endif %}" href="{% url 'yaksh:design_course' course.id %}" title="Additional course settings" data-placement="top" data-toggle="tooltip">
+ Design Course
</a>
</li>
<li class="nav-item">
@@ -20,13 +25,13 @@
</a>
</li>
<li class="nav-item">
- <a class="nav-link list-group-item {% if is_design_course %} active {% endif %}" href="{% url 'yaksh:design_course' course.id %}" title="Add modules to this course" data-placement="top" data-toggle="tooltip">
- Design Course
+ <a href="{% url 'yaksh:send_mail' course.id %}" class="nav-link list-group-item {% if is_mail %} active {% endif %}" title="Send mail to course students" data-placement="top" data-toggle="tooltip">
+ Send Mail
</a>
</li>
<li class="nav-item">
- <a class="nav-link list-group-item {% if is_modules %} active {% endif %}" href="{% url 'yaksh:get_course_modules' course.id %}" title="View modules added to the course" data-placement="top" data-toggle="tooltip">
- Course Modules
+ <a href="{% url 'yaksh:course_forum' course.id %}" class="nav-link list-group-item" title="Discussion forum of this course" data-placement="top" data-toggle="tooltip">
+ Discussion Forum
</a>
</li>
<li class="nav-item">
diff --git a/yaksh/templates/yaksh/course_forum.html b/yaksh/templates/yaksh/course_forum.html
new file mode 100644
index 0000000..e6b6a90
--- /dev/null
+++ b/yaksh/templates/yaksh/course_forum.html
@@ -0,0 +1,115 @@
+{% extends base_template %}
+{% load static %}
+{% block title %}
+ {{course.name}}: Discussion Forum
+{% endblock title %}
+{% block content %}
+ <div class="container">
+ <div>
+ <h2><center>{{course.name}}</center></h2>
+ <center>Discussion Forum</center>
+ </div>
+ <div class="d-flex p-2 bd-highlight">
+ <div class="col-md-4">
+ {% if moderator %}
+ <a href="{% url 'yaksh:course_detail' course.id %}" class="btn btn-primary">Back to Course</a>
+ {% else %}
+ <a href="{% url 'yaksh:course_modules' course.id %}" class="btn btn-primary">Back to Course</a>
+ {% endif %}
+ </div>
+ <div class="col-md-4">
+ <form class="my-2 my-lg-0" action="" method="GET">
+ <div class="input-group">
+ <input type="search" placeholder="Search" name="search" class="form-control">
+ <span class="input-group-append">
+ <button class="btn btn-outline-info" type="submit"><i class="fa fa-search"></i>&nbsp;Search</button>
+ </span>
+ </div>
+ </form>
+ </div>
+ <div class="col-md-4">
+ <button type="button" class="btn btn-primary pull-right" data-toggle="modal" data-target="#newPostModal">New Post</button>
+ </div>
+ </div>
+ <!-- Modal -->
+ <div id="newPostModal" class="modal fade" role="dialog">
+ <div class="modal-dialog">
+
+ <!-- Modal content-->
+ <div class="modal-content">
+ <div class="modal-header">
+ <h4 class="modal-title">Create a new Post</h4>
+ <button type="button" class="close" data-dismiss="modal">&times;</button>
+ </div>
+ <div class="modal-body">
+ <form action="." method="POST" enctype='multipart/form-data'>
+ <div class="form-group">
+ {% csrf_token %}
+ {{form}}
+ </div>
+ <input type="submit" class="btn btn-primary" value="Create Post">
+ </form>
+ </div>
+ <div class="modal-footer">
+ <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
+ </div>
+ </div>
+
+ </div>
+ </div>
+ <br>
+ <br>
+ {% if posts %}
+ <table id="posts_table" class="tablesorter table">
+ <thead class="thread-inverse">
+ <tr>
+ <th width="700">Questions</th>
+ <th>Created by</th>
+ <th>Replies</th>
+ <th>Last reply</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for post in posts %}
+ <tr>
+ <td>
+ <a href="{% url 'yaksh:post_comments' course.id post.uid %}">{{post.title}}</a>
+ <small class="text-muted d-block">{{ post.description|truncatewords:30 }}</small>
+ <small class="text-muted"><strong>Last updated: {{post.modified_at}}</strong></small>
+ </td>
+ <td>{{post.creator.username}}</td>
+ <td>{{post.get_comments_count}}</td>
+ <td>
+ {% with post.get_last_comment as last_comment %}
+ {% if last_comment %}
+ {{last_comment.creator}}
+ {% else %}
+ None
+ {% endif %}
+ {% endwith %}
+ </td>
+ <td>
+ {% if user.profile.is_moderator %}
+ <small><a href="{% url 'yaksh:hide_post' course.id post.uid %}" class="pull-right btn btn-danger">Delete</i></a></small>
+ {% endif %}
+ </td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ {% else %}
+ No discussion posts are there yet. Create one to start discussing.
+ {% endif %}
+ {% include "yaksh/paginator.html" %}
+ </div>
+{% endblock content %}
+{% block script %}
+ <script type="text/javascript" src="{% static 'yaksh/js/mathjax/MathJax.js' %}?config=TeX-MML-AM_CHTML"></script>
+ <script type="text/javascript" src="{% static 'yaksh/js/jquery.tablesorter.min.js' %}"></script>
+ <script type="text/javascript">
+ $(document).ready(() => {
+ $("#posts_table").tablesorter();
+ });
+ </script>
+{% endblock script %} \ No newline at end of file
diff --git a/yaksh/templates/yaksh/course_modules.html b/yaksh/templates/yaksh/course_modules.html
index 214f8c7..b808562 100644
--- a/yaksh/templates/yaksh/course_modules.html
+++ b/yaksh/templates/yaksh/course_modules.html
@@ -7,6 +7,7 @@
<div class="card">
<div class="card-header">
{{ course.name }}
+ <a href="{% url "yaksh:course_forum" course.id %}" class="btn btn-info pull-right">Discussion Forum</a>
</div>
<div class="card-body">
{% if course.view_grade %}
@@ -128,9 +129,11 @@
View
</a>
{% else %}
- <a href="{% url 'yaksh:start_quiz' unit.quiz.questionpaper_set.get.id module.id course.id %}" class="btn btn-outline-info">
- View
- </a>
+ {% if unit.quiz.questionpaper_set.get %}
+ <a href="{% url 'yaksh:start_quiz' unit.quiz.questionpaper_set.get.id module.id course.id %}" class="btn btn-outline-info">
+ View
+ </a>
+ {% endif %}
{% endif %}
</td>
<td>
diff --git a/yaksh/templates/yaksh/courses.html b/yaksh/templates/yaksh/courses.html
index 084d0f6..151e1fb 100644
--- a/yaksh/templates/yaksh/courses.html
+++ b/yaksh/templates/yaksh/courses.html
@@ -8,14 +8,6 @@
</script>
{% endblock %}
-{% block css %}
-<style>
- .test + .tooltip.top > .tooltip-inner {
- padding: 15px;
- font-size: 12px;
- }
-</style>
-{% endblock %}
{% block content %}
<div class="container-fluid">
<div class="container">
@@ -32,22 +24,10 @@
Add/Edit Course
</a>
</li>
- <li class="nav-item dropdown hide">
- <a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="true">More</a>
- <div class="dropdown-menu hide" x-placement="bottom-start" style="position: absolute; transform: translate3d(0px, 37px, 0px); top: 0px; left: 0px; will-change: transform;">
- <a class="dropdown-item" href="{% url 'yaksh:show_all_quizzes' %}">
- Add/View Quizzes
- </a>
- <a class="dropdown-item" href="{% url 'yaksh:show_all_lessons' %}">
- Add/View Lessons
- </a>
- <a class="dropdown-item" href="{% url 'yaksh:show_all_modules' %}">
- Add/View Modules
- </a>
- <a href="{% url 'grades:grading_systems'%}" class="dropdown-item" >
+ <li class="nav-item">
+ <a href="{% url 'grades:grading_systems'%}" class="nav-link" >
Add/View Grading Systems
</a>
- </div>
</li>
</ul>
</div>
@@ -61,8 +41,7 @@
</div>
{% else %}
<hr>
- <form name=frm action="" method="post">
- {% csrf_token %}
+ <form name=frm action="" method="get">
<div class="card">
<div class="card-header">
<h3>Search/Filter Courses</h3>
@@ -77,9 +56,11 @@
</div>
</div>
<br>
- <button class="btn btn-success" type="submit">Search</button>
- <a class="btn btn-primary" href="{% url 'yaksh:courses' %}">
- Clear Search
+ <button class="btn btn-outline-success" type="submit">
+ <i class="fa fa-search"></i>&nbsp;Search
+ </button>
+ <a class="btn btn-outline-danger" href="{% url 'yaksh:courses' %}">
+ <i class="fa fa-times"></i>&nbsp;Clear
</a>
</div>
</div>
diff --git a/yaksh/templates/yaksh/design_course_session.html b/yaksh/templates/yaksh/design_course_session.html
index a15f4b1..88ecc16 100644
--- a/yaksh/templates/yaksh/design_course_session.html
+++ b/yaksh/templates/yaksh/design_course_session.html
@@ -68,16 +68,14 @@
<th width="25%" colspan="2">Check Prerequisite Completion
<br>
<a href="#" data-toggle="tooltip" id="prereq_msg">
- <span class="glyphicon glyphicon-question-sign">
- </span> What's This
+ What's This&nbsp;<i class="fa fa-question-circle"></i>
</a>
</th>
<th width="25%" colspan="2">Check Prerequisite Passing
<br>
<a href="#" data-toggle="tooltip" id="prereq_passing_msg">
- <span class="glyphicon glyphicon-question-sign">
- </span> What's This
- </a>
+ What's This&nbsp;<i class="fa fa-question-circle"></i>
+ </a>
</th>
</tr>
<tr>
diff --git a/yaksh/templates/yaksh/design_questionpaper.html b/yaksh/templates/yaksh/design_questionpaper.html
index 6e916a3..ffbdf5f 100644
--- a/yaksh/templates/yaksh/design_questionpaper.html
+++ b/yaksh/templates/yaksh/design_questionpaper.html
@@ -17,17 +17,10 @@
{% block content %}
<div class="container">
<input type=hidden id="url_root" value={{ URL_ROOT }}>
-{% if course_id %}
- <form action="{% url 'yaksh:designquestionpaper' qpaper.quiz.id qpaper.id course_id %}" method="POST" id="design_q">
+ <form action="{% url 'yaksh:designquestionpaper' course_id qpaper.quiz.id qpaper.id %}" method="POST" id="design_q">
<a href="{% url 'yaksh:get_course_modules' course_id %}" class="btn btn-primary">
<i class="fa fa-arrow-left"></i>&nbsp;Back
</a>
-{% else %}
- <form action="{% url 'yaksh:designquestionpaper' qpaper.quiz.id qpaper.id %}" method="POST" id="design_q">
- <a href="{% url 'yaksh:show_all_quizzes' %}" class="btn btn-primary">
- <i class="fa fa-arrow-left"></i>&nbsp;Back
- </a>
-{% endif %}
{% 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>
diff --git a/yaksh/templates/yaksh/paginator.html b/yaksh/templates/yaksh/paginator.html
index 5f0df7a..e958519 100644
--- a/yaksh/templates/yaksh/paginator.html
+++ b/yaksh/templates/yaksh/paginator.html
@@ -1,7 +1,8 @@
<ul class="pagination pagination">
{% if objects.has_previous %}
<li class="page-item">
- <a class="page-link" href="?page=1" aria-label="Previous">
+ <a class="page-link" href="?page=1{% if request.GET.question_type %}&question_type={{ request.GET.question_type }}{% endif %}{% if request.GET.language %}&language={{ request.GET.language }}{% endif %}{% if request.GET.marks %}&marks={{ request.GET.marks }}{% endif %}{% if request.GET.question_tags %}&question_tags={{ request.GET.question_tags }}{% endif %}
+ {% if request.GET.search_tags %}&search_tags={{ request.GET.search_tags }}{% endif %}{% if request.GET.search_status %}&search_status={{ request.GET.search_status }}{% endif %}" aria-label="Previous">
<span aria-hidden="true">
<i class="fa fa-angle-double-left"></i>
</span>
@@ -16,13 +17,13 @@
<span class="page-link">{{ n }}<span class="sr-only">(current)</span></span>
</li>
{% elif n > objects.number|add:'-5' and n < objects.number|add:'5' %}
- <li class="page-item"><a class="page-link" href="?page={{ n }}">{{ n }}</a></li>
+ <li class="page-item"><a class="page-link" href="?page={{ n }}{% if request.GET.question_type %}&question_type={{ request.GET.question_type }}{% endif %}{% if request.GET.language %}&language={{ request.GET.language }}{% endif %}{% if request.GET.marks %}&marks={{ request.GET.marks }}{% endif %}{% if request.GET.question_tags %}&question_tags={{ request.GET.question_tags }}{% endif %}{% if request.GET.search_tags %}&search_tags={{ request.GET.search_tags }}{% endif %}{% if request.GET.search_status %}&search_status={{ request.GET.search_status }}{% endif %}">{{ n }}</a></li>
{% endif %}
{% endfor %}
{% if objects.has_next %}
<li class="page-item">
- <a class="page-link" href="?page={{ objects.paginator.num_pages }}" aria-label="Next">
+ <a class="page-link" href="?page={{ objects.paginator.num_pages }}{% if request.GET.question_type %}&question_type={{ request.GET.question_type }}{% endif %}{% if request.GET.language %}&language={{ request.GET.language }}{% endif %}{% if request.GET.marks %}&marks={{ request.GET.marks }}{% endif %}{% if request.GET.question_tags %}&question_tags={{ request.GET.question_tags }}{% endif %}{% if request.GET.search_tags %}&search_tags={{ request.GET.search_tags }}{% endif %}{% if request.GET.search_status %}&search_status={{ request.GET.search_status }}{% endif %}" aria-label="Next">
<span aria-hidden="true">
<i class="fa fa-angle-double-right"></i>
</span>
diff --git a/yaksh/templates/yaksh/post_comments.html b/yaksh/templates/yaksh/post_comments.html
new file mode 100644
index 0000000..463103e
--- /dev/null
+++ b/yaksh/templates/yaksh/post_comments.html
@@ -0,0 +1,71 @@
+{% extends base_template %}
+{% load static %}
+{% block title %}
+ {{post.title}}
+{% endblock title %}
+
+{% block content %}
+ <div class="container">
+ <a class="btn btn-primary" href="{% url 'yaksh:course_forum' post.course.id %}">Back to Posts</a>
+ <br>
+ <br>
+ <div class="card mb-2 border-dark">
+ <div class="card-header text-white bg-dark py-2 px-3">
+ {{post.title}}
+ <br>
+ <small>
+ <strong>{{post.creator.username}}</strong>
+ {{post.created_at}}
+ {% if user.profile.is_moderator %}<a href="{% url 'yaksh:hide_post' post.course.id post.uid %}" class="pull-right btn btn-danger">Delete</a>{% endif %}
+ </small>
+
+ </div>
+ <div class="card-body">
+ <p class="card-text description">{{post.description}}</p>
+ {% if post.image %}
+ <a href="{{post.image.url}}" target="_blank">
+ <center><img src="{{post.image.url}}" class="post_image thumbnail" alt=""></center>
+ </a>
+ {% endif %}
+ </div>
+ </div>
+ <br>
+ {% if comments %}
+ {% for comment in comments %}
+ <div class="card mb-2">
+ <div class="card-body p-3">
+ <div class="row mb-3">
+ <div class="col-6">
+ <strong class="text-muted">{{comment.creator.username}}</strong>
+ </div>
+ <div class="col-6 text-right">
+ <small class="text-muted">{{comment.created_at}} {% if user.profile.is_moderator %} <a href="{% url 'yaksh:hide_comment' post.course.id comment.uid %}" class="btn btn-danger">Delete</a>{% endif %}</small>
+ </div>
+ </div>
+ <p class="card-text description">{{comment.description}}</p>
+ <div>
+ {% if comment.image %}
+ <a href="{{comment.image.url}}" target="_blank">
+ <center><img src="{{comment.image.url}}" class="comment_image thumbnail" alt=""></center>
+ </a>
+ {% endif %}
+ </div>
+ </div>
+ </div>
+ {% endfor %}
+ {% endif %}
+ <br>
+ <div>
+ <form action="{% url 'yaksh:post_comments' post.course.id post.uid %}" method="POST" enctype='multipart/form-data'>
+ <div class="form-group">
+ {% csrf_token %}
+ {{form}}
+ </div>
+ <input type="submit" value="Submit" class="btn btn-primary">
+ </form>
+ </div>
+ </div>
+{% endblock content %}
+{% block script %}
+ <script type="text/javascript" src="{% static 'yaksh/js/mathjax/MathJax.js' %}?config=TeX-MML-AM_CHTML"></script>
+{% endblock script %} \ No newline at end of file
diff --git a/yaksh/templates/yaksh/question.html b/yaksh/templates/yaksh/question.html
index 74343f8..92d591f 100644
--- a/yaksh/templates/yaksh/question.html
+++ b/yaksh/templates/yaksh/question.html
@@ -26,6 +26,7 @@
<script src="{% static 'yaksh/js/codemirror/mode/python/python.js' %}"></script>
<script src="{% static 'yaksh/js/codemirror/mode/clike/clike.js' %}"></script>
<script src="{% static 'yaksh/js/codemirror/mode/shell/shell.js' %}"></script>
+<script src="{% static 'yaksh/js/codemirror/mode/r/r.js' %}"></script>
<script type="text/javascript" src="{% static 'yaksh/js/mathjax/MathJax.js' %}?config=TeX-MML-AM_CHTML"></script>
<script src="{% static 'yaksh/js/jquery-sortable.js' %}"></script>
<script>
diff --git a/yaksh/templates/yaksh/showquestions.html b/yaksh/templates/yaksh/showquestions.html
index fdfcc60..daeaea7 100644
--- a/yaksh/templates/yaksh/showquestions.html
+++ b/yaksh/templates/yaksh/showquestions.html
@@ -7,207 +7,218 @@
{% block script %}
<script type="text/javascript" src="{% static 'yaksh/js/show_question.js' %}"></script>
-<script type="text/javascript" src="{% static 'yaksh/js/question_filter.js' %}"></script>
<script type="text/javascript" src="{% static 'yaksh/js/jquery.tablesorter.min.js' %}"></script>
{% endblock %}
{% block content %}
-<div class="container">
- <!-- Side bar -->
- <div class="nav nav-pills" role="tablist" aria-orientation="vertical">
- <a href="#show" id="showbar" class="nav-link active" data-toggle="pill" role="tab" aria-controls="show" aria-selected="true"> Show all Questions</a>
- <a href="#updown" id="updownbar" class="nav-link" data-toggle="pill" role="tab" aria-controls="updown" aria-selected="false" > Upload Questions</a>
- </div>
- <!-- End of side bar -->
- <div class="tab-content">
+ <div class="container-fluid">
+ <div class="nav nav-pills" role="tablist" aria-orientation="vertical">
+ <a href="#show" id="showbar" class="nav-link active" data-toggle="pill" role="tab" aria-controls="show" aria-selected="true"> All Questions</a>
+ <a href="#updown" id="updownbar" class="nav-link" data-toggle="pill" role="tab" aria-controls="updown" aria-selected="false" > Upload Questions</a>
+ </div>
<br>
- <!-- Upload Questions -->
- <div id="updown" class="card tab-pane fade" role="tabpanel" aria-labelledby="updownbar">
- <div class="col" role="alert">
- <p>You can upload question files the following ways -
- <li><b><u>Yaml File</u></b>
- <p>One can upload Yaml file with extensions .yaml or .yml. Please note
- that you cannot upload files associated to a question. Yaml file can
- have any name.
- </p>
- </li>
- <li><b><u>Zip File</u></b>
- <p> One can also upload zip with the following zip structure - </p>
- <pre>
- .zip
- |-- .yaml or .yml
- |-- .yaml or .yml
- |-- folder1
- | |-- Files required by questions
- |-- folder2
- | |-- Files required by questions
- </pre>
- </li>
- </p>
- </div>
- <div class="card-body">
- <form action="" method="post" enctype="multipart/form-data">
- {% csrf_token %}
- <div class="form-group col-md-6">
- <a class="btn btn-info" href="{% url 'yaksh:download_yaml_template' %}">
- <i class="fa fa-download"></i>&nbsp;Download Template</a>
- <br><br>
- <h4> Or </h4>
- <br>
- <div class="input-group mb-3">
- <div class="custom-file">
- {{ upload_form }}
- <label class="custom-file-label" for="id_file">
- Choose file
- </label>
- </div>
- <div class="input-group-append">
- <button class="btn btn-outline-primary" type="submit" name="upload" value="upload"><i class="fa fa-upload"></i>&nbsp;Upload File</button>
- </div>
- </div>
- </div>
- <script>
- $('#id_file').on('change',function(){
- //get the file name
- var fileName = $(this).val();
- //replace the "Choose a file" label
- $(this).next('.custom-file-label').html(fileName);
- })
- </script>
- </form>
+ <div class="tab-content">
+ <!-- Upload Questions -->
+ <div id="updown" class="card tab-pane fade" role="tabpanel" aria-labelledby="updownbar">
+ <div class="col" role="alert">
+ <p>You can upload question files the following ways -
+ <li><b><u>Yaml File</u></b>
+ <p>One can upload Yaml file with extensions .yaml or .yml. Please note
+ that you cannot upload files associated to a question. Yaml file can
+ have any name.
+ </p>
+ </li>
+ <li><b><u>Zip File</u></b>
+ <p> One can also upload zip with the following zip structure - </p>
+ <pre>
+ .zip
+ |-- .yaml or .yml
+ |-- .yaml or .yml
+ |-- folder1
+ | |-- Files required by questions
+ |-- folder2
+ | |-- Files required by questions
+ </pre>
+ </li>
+ </p>
+ </div>
+ <div class="card-body">
+ <form action="" method="post" enctype="multipart/form-data">
+ {% csrf_token %}
+ <div class="form-group col-md-6">
+ <a class="btn btn-info" href="{% url 'yaksh:download_yaml_template' %}">
+ <i class="fa fa-download"></i>&nbsp;Download Template</a>
+ <br><br>
+ <h4> Or </h4>
+ <br>
+ <div class="input-group mb-3">
+ <div class="custom-file">
+ {{ upload_form }}
+ <label class="custom-file-label" for="id_file">
+ Choose file
+ </label>
+ </div>
+ <div class="input-group-append">
+ <button class="btn btn-outline-primary" type="submit" name="upload" value="upload"><i class="fa fa-upload"></i>&nbsp;Upload File</button>
+ </div>
+ </div>
+ </div>
+ <script>
+ $('#id_file').on('change',function(){
+ //get the file name
+ var fileName = $(this).val();
+ //replace the "Choose a file" label
+ $(this).next('.custom-file-label').html(fileName);
+ })
+ </script>
+ </form>
+ </div>
</div>
- </div>
- <!-- End of upload questions -->
+ <!-- End of upload questions -->
- <!-- Show questions -->
- <div id="show" class="tab-pane fade show active" role="tabpanel" aria-labelledby="showbar">
- {% if messages %}
- {% for message in messages %}
- <div class="alert alert-dismissible alert-info">
- <button type="button" class="close" data-dismiss="alert">
- <i class="fa fa-close"></i>
- </button>
- <strong>{{ message }}</strong>
- </div>
- {% endfor %}
- {% endif %}
- <form name=frm action="" method="post">
+ <div id="show" class="tab-pane fade show active" role="tabpanel" aria-labelledby="showbar">
+ {% if messages %}
+ {% for message in messages %}
+ <div class="alert alert-dismissible alert-info">
+ <button type="button" class="close" data-dismiss="alert">
+ <i class="fa fa-close"></i>
+ </button>
+ <strong>{{ message }}</strong>
+ </div>
+ {% endfor %}
+ {% endif %}
<div class="card">
<div class="card-body">
- <!-- Filtering Questions -->
- <div id="selectors">
- <h4>Filters Questions: </h4>
- <div class="dropdown">
- <div class="col-md-4">
- {{ form.question_type }}
- </div>
- <div class="col-md-4">
- {{ form.language }}
- </div>
- <div class="col-md-4">
- {{ form.marks }}
- </div>
+ <!-- Filter Questions -->
+ <h4>Filters Questions: </h4>
+ <form method="GET" action="{% url 'yaksh:questions_filter' %}">
+
+ <div class="row">
+ <div class="col-md-4">{{ form.question_type }}</div>
+ <div class="col-md-4">{{ form.language }}</div>
+ <div class="col-md-4">{{ form.marks }}</div>
+ <br><br>
+ <div class="col">
+ <button class="btn btn-outline-success">
+ <i class="fa fa-filter"></i>&nbsp;Filter
+ </button>
+ </div>
</div>
- </div>
+ </form>
+ <!-- End Filter Questions -->
<hr>
- <h4 >Or Search using Tags: </h4>
- <!-- Searching Tags -->
- {% csrf_token %}
- <div class="col-md-14">
- <div class="input-group">
- <div class="col-md-6">
+ <!-- Search by Tags -->
+ <h4 >Search using Tags: </h4>
+ <div class="row">
+ <div class="col">
+ <form method="GET" action="{% url 'yaksh:search_questions_by_tags' %}">
<div class="input-group">
- <div class="input-group-prepend">
- <span class="input-group-text" id="basic-addon1">Search Questions</span>
- </div>
- <input type="text" name="question_tags" id="question_tags" class="form-control" type="search" placeholder="Search using comma separated Tags">
+ <input type="text" name="question_tags" id="question_tags" class="form-control" type="search" placeholder="Search questions using comma separated Tags">
<span class="input-group-append">
- <a class="btn btn-outline-secondary" type="submit"><i class="fa fa-search yakshred"></i></a>
+ <button class="btn btn-outline-success" type="submit">
+ <i class="fa fa-search"></i>&nbsp;Search
+ </button>
</span>
</div>
- </div>
- <div class="col-md-6">
- <select class="form-control" id="sel1" onchange="append_tag(this);">
- {% if all_tags %}
- <option value="" disabled selected>Available Tags</option>
- {% for tag in all_tags %}
- <option>
- {{tag}}
- </option>
- {% endfor %}
- {% else %}
- <option value="" disabled selected>No Available Tags</option>
- {% endif %}
- </select>
- </div>
- <br><br>
- <div class="col-md-6">
- <a class="btn btn-primary" href="{% url 'yaksh:show_questions' %}">
- Clear Filters
- </a>
- </div>
+ </form>
+ </div>
+ <div class="col">
+ <select class="form-control" id="sel1" onchange="append_tag(this);">
+ {% if all_tags %}
+ <option value="" disabled selected>Available Tags</option>
+ {% for tag in all_tags %}
+ <option>
+ {{tag}}
+ </option>
+ {% endfor %}
+ {% else %}
+ <option value="" disabled selected>No Available Tags</option>
+ {% endif %}
+ </select>
</div>
</div>
+ <br>
+ <!-- End Search by Tags -->
+ <a class="btn btn-outline-danger" href="{% url 'yaksh:show_questions' %}">
+ <i class="fa fa-times"></i>&nbsp;Clear
+ </a>
</div>
+ <!-- End Card body -->
</div>
- <div id="filtered-questions">
+ <!-- End card filters and search -->
+ <form name=frm action="{% url 'yaksh:show_questions' %}" method="post">
+ {% csrf_token %}
+ <div id="filtered-questions">
+ <br>
+ <a class="btn btn-lg btn-success" href="{% url 'yaksh:add_question' %}">
+ <i class="fa fa-plus-circle"></i>&nbsp;Add Question</a>
+ {% if objects %}
+ <div>
+ <br>
+ {% include "yaksh/paginator.html" %}
+ <br>
+ <h5><input id="checkall" type="checkbox"> Select All </h5>
+ <div class="table-wrapper-2">
+ <table id="questions-table" class="tablesorter table table-striped table-responsive-sm">
+ <thead>
+ <tr>
+ <th> Select </th>
+ <th> Sr No. </th>
+ <th> Summary&nbsp;<i class="fa fa-sort"></i> </th>
+ <th> Language&nbsp;<i class="fa fa-sort"></i> </th>
+ <th> Type&nbsp;<i class="fa fa-sort"></i> </th>
+ <th> Marks&nbsp;<i class="fa fa-sort"></i> </th>
+ <th>Test</th>
+ <th>Download</th>
+ <th>Delete</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for question in objects %}
+ <tr>
+ <td>
+ <input type="checkbox" name="question" value="{{ question.id }}">
+ </td>
+ <td>{{forloop.counter}}</td>
+ <td><a href="{% url 'yaksh:add_question' question.id %}">{{question.summary|capfirst}}</a></td>
+ <td>{{question.language|capfirst}}</td>
+ <td>{{question.type|capfirst}}</td>
+ <td>{{question.points}}</td>
+ <td>
+ <a href="{% url 'yaksh:test_question' question.id %}" class="btn btn-info">
+ Test
+ </a>
+ </td>
+ <td><a href="{% url 'yaksh:download_question' question.id %}" class="btn btn-primary">
+ <i class="fa fa-download"></i>&nbsp;Download</a></td>
+ <td><a href="{% url 'yaksh:delete_question' question.id %}" class="btn btn-danger" onclick="return confirm('Are you sure you want to delete {{question.summary|capfirst}}?')">
+ <i class="fa fa-trash"></i>&nbsp;Delete</a></td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ </div>
+ </div>
+ {% include "yaksh/paginator.html" %}
+ {% else %}
+ <br><br>
+ <div class="alert alert-info">
+ <center><h3>No Questions found</h3></center>
+ </div>
+ {% endif %}
+ </div>
<br>
- <a class="btn btn-lg btn-success" href="{% url 'yaksh:add_question' %}">
- <i class="fa fa-plus-circle"></i>&nbsp;Add Question</a>
- {% if questions %}
- <div>
- <br>
- {% include "yaksh/paginator.html" %}
- <br>
- <h5><input id="checkall" type="checkbox"> Select All </h5>
- <div class="table-wrapper-2">
- <table id="questions-table" class="tablesorter table table-striped table-responsive-sm">
- <thead>
- <tr class="yakshred">
- <th> Select </th>
- <th> Summary&nbsp;<i class="fa fa-sort"></i> </th>
- <th> Language&nbsp;<i class="fa fa-sort"></i> </th>
- <th> Type&nbsp;<i class="fa fa-sort"></i> </th>
- <th> Marks&nbsp;<i class="fa fa-sort"></i> </th>
- </tr>
- </thead>
- <tbody>
- {% for question in questions %}
- <tr>
- <td>
- <input type="checkbox" name="question" value="{{ question.id }}">
- </td>
- <td><a href="{% url 'yaksh:add_question' question.id %}">{{question.summary|capfirst}}</a></td>
- <td>{{question.language|capfirst}}</td>
- <td>{{question.type|capfirst}}</td>
- <td>{{question.points}}</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
- </div>
- {% include "yaksh/paginator.html" %}
- {% else %}
- <br><br>
- <div class="alert alert-info">
- <center><h3>No Questions created</h3></center>
- </div>
- {% endif %}
- </div>
- <br>
- <center>
- {% if questions %}
- <button class="btn btn-lg btn-primary" type="submit" name='download' value='download'><i class="fa fa-download"></i>&nbsp;Download Selected</button>
- <button class="btn btn-lg btn-primary" type="submit" name="test" value="test">Test Selected</button>
- <button class="btn btn-lg btn-danger" type="submit" onClick="return confirm_delete(frm);" name='delete' value='delete'>
- <i class="fa fa-trash"></i>&nbsp;Delete Selected</button>
- {% endif %}
- </center>
- </form>
- </div>
- <!-- End of Show questions -->
+ <center>
+ {% if objects %}
+ <button class="btn btn-lg btn-primary" type="submit" name='download' value='download'><i class="fa fa-download"></i>&nbsp;Download Selected</button>
+ <button class="btn btn-lg btn-primary" type="submit" name="test" value="test">Test Selected</button>
+ <button class="btn btn-lg btn-danger" type="submit" onClick="return confirm_delete(frm);" name='delete' value='delete'>
+ <i class="fa fa-trash"></i>&nbsp;Delete Selected</button>
+ {% endif %}
+ </center>
+ </form>
+ </div>
</div>
-</div>
+ </div>
{% endblock %}