From ce39323a0afb06ec3391659f4f3305f6c91bbdbf Mon Sep 17 00:00:00 2001 From: madar2020 <59777434+madar2020@users.noreply.github.com> Date: Mon, 28 Sep 2020 15:06:25 +0300 Subject: [PATCH] feat: Allow rich text edit for questions (#23402) * rich text * Update question.json As to make sense for rich text * Update quiz_question.json * Update question.json * Update quiz_question.json * Update macros.html fix: cards in second row of homepage section overlapps the row before. * Revert "Update macros.html" This reverts commit b649b507e5d546b5b4a78fbf68053493a71c7af2. Co-authored-by: Rucha Mahabal --- erpnext/education/doctype/question/question.json | 6 +++--- erpnext/education/doctype/quiz_question/quiz_question.json | 6 +++--- erpnext/public/js/education/lms/quiz.js | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/erpnext/education/doctype/question/question.json b/erpnext/education/doctype/question/question.json index b3a161daa0..e396760616 100644 --- a/erpnext/education/doctype/question/question.json +++ b/erpnext/education/doctype/question/question.json @@ -13,7 +13,7 @@ "fields": [ { "fieldname": "question", - "fieldtype": "Small Text", + "fieldtype": "Text Editor", "in_list_view": 1, "label": "Question", "reqd": 1 @@ -34,7 +34,7 @@ "read_only": 1 } ], - "modified": "2019-05-30 18:39:21.880974", + "modified": "2020-09-24 18:39:21.880974", "modified_by": "Administrator", "module": "Education", "name": "Question", @@ -77,4 +77,4 @@ "quick_entry": 1, "sort_field": "modified", "sort_order": "DESC" -} \ No newline at end of file +} diff --git a/erpnext/education/doctype/quiz_question/quiz_question.json b/erpnext/education/doctype/quiz_question/quiz_question.json index 0564482516..aab07a3e6b 100644 --- a/erpnext/education/doctype/quiz_question/quiz_question.json +++ b/erpnext/education/doctype/quiz_question/quiz_question.json @@ -20,14 +20,14 @@ { "fetch_from": "question_link.question", "fieldname": "question", - "fieldtype": "Data", + "fieldtype": "Text Editor", "in_list_view": 1, "label": "Question", "read_only": 1 } ], "istable": 1, - "modified": "2019-06-12 12:24:02.312577", + "modified": "2020-09-24 12:24:02.312577", "modified_by": "Administrator", "module": "Education", "name": "Quiz Question", @@ -37,4 +37,4 @@ "sort_field": "modified", "sort_order": "DESC", "track_changes": 1 -} \ No newline at end of file +} diff --git a/erpnext/public/js/education/lms/quiz.js b/erpnext/public/js/education/lms/quiz.js index 91cbbf4d66..4a9d1e34e6 100644 --- a/erpnext/public/js/education/lms/quiz.js +++ b/erpnext/public/js/education/lms/quiz.js @@ -140,7 +140,7 @@ class Question { make_question() { let question_wrapper = document.createElement('h5'); question_wrapper.classList.add('mt-3'); - question_wrapper.innerText = this.question; + question_wrapper.innerHTML = this.question; this.wrapper.appendChild(question_wrapper); }