blob: 9b406473269ebcb16568da18bee92196d4237db4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
{% extends "manage.html" %}
{% load static %}
{% block title %} My Quizzes {% endblock %}
{% block content %}
<div class="container">
<div class="row">
<div class="col-md-8">
<ul class="nav nav-pills" id="course_tabs">
<li class="nav-item">
<a class="nav-link {% if created %}active{% endif %}" href="{% url 'yaksh:courses' %}">
My Courses
</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'yaksh:add_course' %}">
Add/Edit Course
</a>
</li>
<li class="nav-item dropdown hide">
<a class="nav-link dropdown-toggle active" 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 active" 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" >
Add/View Grading Systems
</a>
</div>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<hr>
<a href="{% url 'yaksh:add_quiz' %}" class="btn btn-primary btn-lg">
<i class="fa fa-plus-circle"></i> Add New Quiz
</a>
<a href="{% url 'yaksh:add_exercise' %}" class="btn btn-info btn-lg">
<i class="fa fa-plus-circle"></i> Add New Exercise
</a>
{% if not quizzes %}
<br><br>
<div class="alert alert-info">
<center><h3> No new Quiz added</h3></center>
</div>
{% else %}
<center><h3> Quizzes </h3></center>
<table class="table table-bordered table-responsive-sm">
<tr>
<th>Sr.No</th>
<th>Quiz/Exercise</th>
<th>QuestionPaper</th>
</tr>
{% for quiz in quizzes %}
<tr>
<td>{{forloop.counter}}</td>
<td width="30%">
<div class="row">
<div class="col-md-7">
{% if quiz.is_exercise %}
<a href="{% url 'yaksh:edit_exercise' quiz.id %}">
{{ quiz.description }}
</a>
{% else %}
<a href="{% url 'yaksh:edit_quiz' quiz.id %}">
{{ quiz.description }}
</a>
{% endif %}
</div>
<div class="col-md-5">
{% if quiz.active %}
<span class="badge badge-success badge-pill">
Active
</span>
{% else %}
<span class="badge badge-danger badge-pill">
Closed
</span>
{% endif %}
</div>
</div>
</td>
<td>
{% if quiz.questionpaper_set.get %}
<div class="row">
<div class="col-md-7">
<a href="{% url 'yaksh:designquestionpaper' quiz.id quiz.questionpaper_set.get.id %}">
Question Paper for {{ quiz.description }}</a>
</div>
<div class="col-md-5">
<a href="{% url 'yaksh:preview_questionpaper' quiz.questionpaper_set.get.id %}" class="btn btn-primary active btn-xs" target="_blank">
<i class="fa fa-eye"></i> Preview
</a>
</div>
</div>
{% else %}
<div class="row">
<div class="col-md-7">
<p>No Question Paper</p>
</div>
<div class="col-md-5">
<a href="{% url 'yaksh:designquestionpaper' quiz.id %}" class="btn btn-success">
<i class="fa fa-plus-circle"></i> Add
</a>
</div>
</div>
{% endif %}
</td>
{% endfor %} <!-- end for quizzes -->
</tr>
</table>
{% endif %}
</div>
{% endblock %}
|