summaryrefslogtreecommitdiff
path: root/yaksh
diff options
context:
space:
mode:
authoradityacp2020-02-20 16:11:05 +0530
committeradityacp2020-02-20 16:11:05 +0530
commit0d189e0156741685e6f6f1c605bf99b44d082b0b (patch)
tree8d6aead87df9da2cb33d48625b591dc2a0f68367 /yaksh
parentfcfd868e44f0c768d05ef0dd58c72e46f9cbee61 (diff)
downloadonline_test-0d189e0156741685e6f6f1c605bf99b44d082b0b.tar.gz
online_test-0d189e0156741685e6f6f1c605bf99b44d082b0b.tar.bz2
online_test-0d189e0156741685e6f6f1c605bf99b44d082b0b.zip
Change complete, grade_user template and add_question js
- Add tinymce js editor for question description - Add safe option in grade user while showing question description - Add generice title in the complete template
Diffstat (limited to 'yaksh')
-rw-r--r--yaksh/static/yaksh/js/add_question.js13
-rw-r--r--yaksh/templates/yaksh/complete.html2
-rw-r--r--yaksh/templates/yaksh/grade_user.html2
3 files changed, 15 insertions, 2 deletions
diff --git a/yaksh/static/yaksh/js/add_question.js b/yaksh/static/yaksh/js/add_question.js
index 4d134cd..6cd8b48 100644
--- a/yaksh/static/yaksh/js/add_question.js
+++ b/yaksh/static/yaksh/js/add_question.js
@@ -161,6 +161,19 @@ function textareaformat()
$(this).find('textarea').addClass("form-control");
$(this).find('input[type=number]').addClass("form-control");
});
+
+ $(function() {
+ tinymce.init({
+ selector: 'textarea#id_description',
+ setup : function(ed) {
+ ed.on('change', function(e) {
+ tinymce.triggerSave();
+ });
+ },
+ max_height: 200,
+ height: 200
+ });
+ });
}
function autosubmit()
diff --git a/yaksh/templates/yaksh/complete.html b/yaksh/templates/yaksh/complete.html
index df76e13..2b3897e 100644
--- a/yaksh/templates/yaksh/complete.html
+++ b/yaksh/templates/yaksh/complete.html
@@ -1,7 +1,7 @@
{% extends "base.html" %}
{% load static %}
-{% block title %} Complete Quiz {% endblock %}
+{% block title %} Complete {% endblock %}
{% block nav %}
<nav class="navbar navbar-expand-lg navbar-dark bg-primary fixed-top">
diff --git a/yaksh/templates/yaksh/grade_user.html b/yaksh/templates/yaksh/grade_user.html
index e3888b8..7206525 100644
--- a/yaksh/templates/yaksh/grade_user.html
+++ b/yaksh/templates/yaksh/grade_user.html
@@ -262,7 +262,7 @@ $(document).ready(function()
<h5>
<span class="badge badge-pill badge-primary">Question:</span>
</h5>
- <strong>{{ question.description }}</strong>
+ <strong>{{ question.description|safe }}</strong>
<br><br>
{% if question.type == "mcq" or question.type == "mcc" %}
<h5>