summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authorprathamesh2017-09-01 17:50:14 +0530
committerprathamesh2017-09-01 17:50:14 +0530
commit82b71b1500dfee256c41f64c34c3a753d151f08e (patch)
treeb0148bc65fc6a153dc04ce9d416f1ccfc4878824 /yaksh/templates
parent1e3bb9e325214be0105f8b907badc84b2dbbeb91 (diff)
parent97a96d1678cb55b95ed14eb9a2b2790415d30abc (diff)
downloadonline_test-82b71b1500dfee256c41f64c34c3a753d151f08e.tar.gz
online_test-82b71b1500dfee256c41f64c34c3a753d151f08e.tar.bz2
online_test-82b71b1500dfee256c41f64c34c3a753d151f08e.zip
Merge branch 'master' of https://github.com/FOSSEE/online_test into improve-code-server
Conflicts Resolved: .travis.yml yaksh/views.py
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/quizzes_user.html11
-rw-r--r--yaksh/templates/yaksh/showquestions.html53
2 files changed, 49 insertions, 15 deletions
diff --git a/yaksh/templates/yaksh/quizzes_user.html b/yaksh/templates/yaksh/quizzes_user.html
index 90d7f8e..b90db18 100644
--- a/yaksh/templates/yaksh/quizzes_user.html
+++ b/yaksh/templates/yaksh/quizzes_user.html
@@ -28,8 +28,9 @@ No Courses to display
<div class="col-md-4">
<h4><b><u> {{ course.name }} by {{ course.creator.get_full_name }}</u></b></h4>
</div>
- <div class="col-md-4">
- {% if course.hidden %}<span class="label label-info">Open Course</span>
+ <div class="col-md-4">
+ {% if not course.active %}
+ <span class="label label-danger">Closed</span>
{% endif %}
{% if user in course.requests.all %} <span class="label label-warning">Request Pending </span>
{% elif user in course.rejected.all %}<span class="label label-danger">Request Rejected</span>
@@ -45,8 +46,8 @@ No Courses to display
<span class="label label-danger">Enrollment Closed</span>
{% endif %}
{% endif %}
- </div>
- </div>
+ </div>
+ </div>
<div class="row">
{% if user in course.students.all %}
@@ -57,7 +58,7 @@ No Courses to display
{% for quiz in course.get_quizzes %}
{% if quiz.active and quiz.course_id == course.id %}
<tr>
- {% if not quiz.is_expired %}
+ {% if not quiz.is_expired and course.active %}
<td>
<a href="{{ URL_ROOT }}/exam/start/{{quiz.questionpaper_set.get.id}}">{{ quiz.description }}</a><br>
</td>
diff --git a/yaksh/templates/yaksh/showquestions.html b/yaksh/templates/yaksh/showquestions.html
index 78be301..a8983bd 100644
--- a/yaksh/templates/yaksh/showquestions.html
+++ b/yaksh/templates/yaksh/showquestions.html
@@ -58,8 +58,11 @@ Upload File <span class="glyphicon glyphicon-open"/></button>
{{ msg }}
</div>
{% endif %}
+<br><br>
+<form name=frm action="" method="post">
+<!-- Filtering Questions -->
<div class="row" id="selectors">
- <h5 style="padding-left: 20px;">Filters</h5>
+ <h4 style="padding-left: 20px;">Filters Questions: </h4>
<div class="col-md-3">
{{ form.question_type }}
</div>
@@ -69,10 +72,40 @@ Upload File <span class="glyphicon glyphicon-open"/></button>
<div class="col-md-3">
{{ form.marks }}
</div>
-</div>
-<br>
- <button class="btn btn-primary" type="button" onClick='location.replace("{{URL_ROOT}}");'>Clear Filters</button>
<br>
+<h4 style="padding-left: 20px;">Or</h4>
+
+<h4 style="padding-left: 20px;">Search using Tags: </h4>
+</div>
+<!-- Searching Tags -->
+{% csrf_token %}
+ <div class="col-md-14">
+ <div class="input-group">
+ <span class="input-group-addon" id="basic-addon1">Search Questions </span>
+ <input type="text" id="question_tags" name="question_tags" class="form-control"
+ placeholder="Search using comma separated Tags">
+ <span class="input-group-btn">
+ <button class="btn btn-default" type="submit">Search</button>
+ </span>
+ <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>
+ </div>
+ </div>
+<br><br>
+<button class="btn btn-primary" type="button" onClick='location.replace("{{URL_ROOT}}");'>
+ Clear Filters</button>
<div id="filtered-questions">
{% if questions %}
@@ -90,15 +123,15 @@ Upload File <span class="glyphicon glyphicon-open"/></button>
</thead>
<tbody>
-{% for i in questions %}
+{% for question in questions %}
<tr>
<td>
-<input type="checkbox" name="question" value="{{ i.id }}">
+<input type="checkbox" name="question" value="{{ question.id }}">
</td>
-<td><a href="{{URL_ROOT}}/exam/manage/addquestion/{{ i.id }}">{{i.summary|capfirst}}</a></td>
-<td>{{i.language|capfirst}}</td>
-<td>{{i.type|capfirst}}</td>
-<td>{{i.points}}</td>
+<td><a href="{{URL_ROOT}}/exam/manage/addquestion/{{ question.id }}">{{question.summary|capfirst}}</a></td>
+<td>{{question.language|capfirst}}</td>
+<td>{{question.type|capfirst}}</td>
+<td>{{question.points}}</td>
</tr>
{% endfor %}
</tbody>