summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authoradityacp2020-03-28 16:59:10 +0530
committeradityacp2020-03-28 16:59:10 +0530
commitb835440b1e2ca0059e95b6848cb87cc5724ee967 (patch)
tree9442718781c94d7c2be113283b297620f6f91fd2 /yaksh/templates
parente8573822d3ed25306d5d2faf946633f2c17997b0 (diff)
downloadonline_test-b835440b1e2ca0059e95b6848cb87cc5724ee967.tar.gz
online_test-b835440b1e2ca0059e95b6848cb87cc5724ee967.tar.bz2
online_test-b835440b1e2ca0059e95b6848cb87cc5724ee967.zip
Fix workflow for creating modules, lessons, quizzes
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_quiz.html14
-rw-r--r--yaksh/templates/yaksh/course_added_modules.html127
-rw-r--r--yaksh/templates/yaksh/courses.html16
-rw-r--r--yaksh/templates/yaksh/design_questionpaper.html9
7 files changed, 103 insertions, 105 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_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/course_added_modules.html b/yaksh/templates/yaksh/course_added_modules.html
index c70eb7a..7ea55e8 100644
--- a/yaksh/templates/yaksh/course_added_modules.html
+++ b/yaksh/templates/yaksh/course_added_modules.html
@@ -1,46 +1,99 @@
{% 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">
+ {{module.name}}
+ </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 %}
+ <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>
+ </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/courses.html b/yaksh/templates/yaksh/courses.html
index 084d0f6..bce005f 100644
--- a/yaksh/templates/yaksh/courses.html
+++ b/yaksh/templates/yaksh/courses.html
@@ -32,22 +32,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>
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>