summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authoradityacp2020-09-30 17:02:19 +0530
committeradityacp2020-09-30 17:02:19 +0530
commit86be5fd441b92a7679eb2b8673bfba2c188ba0ba (patch)
treedf989862240f7027b017a44d6a46c0bfe9443cd7 /yaksh/templates
parent2dcaa3847c4faefd14ee88b9a2370e1d83e747f0 (diff)
downloadonline_test-86be5fd441b92a7679eb2b8673bfba2c188ba0ba.tar.gz
online_test-86be5fd441b92a7679eb2b8673bfba2c188ba0ba.tar.bz2
online_test-86be5fd441b92a7679eb2b8673bfba2c188ba0ba.zip
Add table of contents for lesson with yaml upload
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/base.html5
-rw-r--r--yaksh/templates/yaksh/show_lesson_quiz.html2
-rw-r--r--yaksh/templates/yaksh/show_toc.html16
3 files changed, 19 insertions, 4 deletions
diff --git a/yaksh/templates/base.html b/yaksh/templates/base.html
index 093ccf3..7bf70fb 100644
--- a/yaksh/templates/base.html
+++ b/yaksh/templates/base.html
@@ -57,6 +57,11 @@
<script>
new WOW().init();
+ $(document).ready(function() {
+ $(".alert").delay(2000).slideUp(200, function() {
+ $(this).alert('close');
+ });
+ });
</script>
{% block script %}
{% endblock %}
diff --git a/yaksh/templates/yaksh/show_lesson_quiz.html b/yaksh/templates/yaksh/show_lesson_quiz.html
index 2d5184e..fb5ae6c 100644
--- a/yaksh/templates/yaksh/show_lesson_quiz.html
+++ b/yaksh/templates/yaksh/show_lesson_quiz.html
@@ -43,7 +43,7 @@
<small class="text text-muted"><strong>Type:</strong> <span class="badge badge-primary">ARRANGE THE OPTIONS IN CORRECT ORDER</span></small>
{% endif %}
<span class="badge badge-info pull-right">
- <small><strong>Marks: {{ question.points }}</strong></small>
+ <small><strong>Points: {{ question.points }}</strong></small>
</span>
</div>
</div>
diff --git a/yaksh/templates/yaksh/show_toc.html b/yaksh/templates/yaksh/show_toc.html
index b263652..ddaad74 100644
--- a/yaksh/templates/yaksh/show_toc.html
+++ b/yaksh/templates/yaksh/show_toc.html
@@ -1,8 +1,18 @@
+<div>
+ <form action="" method="POST" enctype="multipart/form-data">
+ {% csrf_token %}
+ <input type="file" name="toc" required="">
+ <button class="btn btn-outline-success" id="upload_toc" name="upload_toc">
+ <i class="fa fa-upload"></i>&nbsp;Upload TOC
+ </button>
+ </form>
+</div>
+<hr>
<table class="table table-responsive-sm">
{% for toc in contents %}
{% with toc.get_toc_text as toc_name %}
<tr>
- <td>
+ <td width="30%">
{{ toc_name }}
</td>
<td>
@@ -36,6 +46,7 @@
<span class="badge badge-warning">No Table of contents added</span>
</center>
{% endfor %}
+</table>
<script type="text/javascript">
$(document).ready(function() {
var divs = document.getElementsByClassName("hidden");
@@ -50,5 +61,4 @@
lock_screen();
ajax_call(url, "GET");
}
-</script>
-</table> \ No newline at end of file
+</script> \ No newline at end of file