From eac52e0198000d96b4c84f9fa6b63ea50cc59f1d Mon Sep 17 00:00:00 2001 From: adityacp Date: Tue, 3 Nov 2020 11:32:26 +0530 Subject: Multiple changes - Add tinymce editor to the question description in lesson quiz - Fix katex rendering in the lesson quiz questions - Remove unncessary preview description view function - Keep the fixed height for the lesson table of contents div --- yaksh/templates/yaksh/add_lesson.html | 10 +++++----- yaksh/templates/yaksh/add_video_quiz.html | 6 +++--- yaksh/templates/yaksh/show_lesson_quiz.html | 9 ++++++--- yaksh/templates/yaksh/show_toc.html | 28 +++++++++++++++------------- 4 files changed, 29 insertions(+), 24 deletions(-) (limited to 'yaksh/templates') diff --git a/yaksh/templates/yaksh/add_lesson.html b/yaksh/templates/yaksh/add_lesson.html index 329a8e0..f05fbe0 100644 --- a/yaksh/templates/yaksh/add_lesson.html +++ b/yaksh/templates/yaksh/add_lesson.html @@ -25,8 +25,8 @@ {{error}} {% endif %} -
-
+
+
 Back @@ -143,7 +143,7 @@


-
+

@@ -152,13 +152,13 @@
-
{{toc}}
+
{{toc}}

- Setup Lesson + Create lesson table of contents
{% if lesson_form.instance and lesson_form.instance.video_path %} diff --git a/yaksh/templates/yaksh/add_video_quiz.html b/yaksh/templates/yaksh/add_video_quiz.html index ad087bc..b8a788e 100644 --- a/yaksh/templates/yaksh/add_video_quiz.html +++ b/yaksh/templates/yaksh/add_video_quiz.html @@ -76,9 +76,9 @@ $('#id_type').children("option[value='code']").show(); } }); - function init_editor() { + $(function() { tinymce.init({ - selector : "textarea", + selector: 'textarea#que_description', setup : function(ed) { ed.on('change', function(e) { tinymce.triggerSave(); @@ -89,6 +89,6 @@ plugins: "image code link", convert_urls: false }); - } + }); }); \ No newline at end of file diff --git a/yaksh/templates/yaksh/show_lesson_quiz.html b/yaksh/templates/yaksh/show_lesson_quiz.html index fb5ae6c..2bb51ea 100644 --- a/yaksh/templates/yaksh/show_lesson_quiz.html +++ b/yaksh/templates/yaksh/show_lesson_quiz.html @@ -1,5 +1,8 @@ {% load custom_filters %} {% endif %} - {% if question.type == "mcq" or question.type == "mcc" or question.type == "integer" or question.type == "float" or question.type == "string" %} + {% if question.type == "arrange" %} +
+ {% else %}
- {% elif question.type == "arrange" %} -
{% endif %}
diff --git a/yaksh/templates/yaksh/show_toc.html b/yaksh/templates/yaksh/show_toc.html index 92ea0cd..680c17b 100644 --- a/yaksh/templates/yaksh/show_toc.html +++ b/yaksh/templates/yaksh/show_toc.html @@ -1,20 +1,22 @@ {% load custom_filters %} {% has_lesson_video lesson_id as has_video %} {% if has_video %} -
- -  Download Sample - -

-
- {% csrf_token %} - - -
+
+
+ +  Download Sample + +
+
+ {% csrf_token %} + + +
+
-
+
{% endif %} {% for toc in contents %} -- cgit