diff --git a/lms/public/css/style.css b/lms/public/css/style.css
index a69010d9..69633fdb 100644
--- a/lms/public/css/style.css
+++ b/lms/public/css/style.css
@@ -661,7 +661,7 @@ input[type=checkbox] {
font-size: var(--text-sm);
display: flex;
flex-direction: column;
- margin-bottom: 3rem;
+ margin-bottom: 2.5rem;
padding-left: 200px;
padding-right: 1rem;
box-shadow: var(--shadow-sm);
@@ -764,7 +764,7 @@ input[type=checkbox] {
}
.education-details {
- margin-top: 3rem;
+ margin-top: 1.25rem;
}
.bold-title {
@@ -1661,3 +1661,9 @@ li {
.help-article {
font-size: var(--text-base);
}
+
+.quiz-row {
+ position: relative;
+ color: var(--text-color);
+ cursor: pointer;
+}
diff --git a/lms/www/batch/learn.html b/lms/www/batch/learn.html
index c3fb460a..12051a81 100644
--- a/lms/www/batch/learn.html
+++ b/lms/www/batch/learn.html
@@ -223,7 +223,7 @@
{% macro HelpArticle() %}
-
{{ _("Help Article") }}
+
{{ _("Embed Components") }}
{{ _("You can add additional content to the lesson using a special syntax. The table below mentions
all types of dynamic content that you can add to the lessons and the syntax for the same.") }}
@@ -239,11 +239,11 @@
{{ _("YouTube Video") }}
- {% raw %} {{ YouTubeVideo("embed_src") }} {% endraw %}
+ {% raw %} {{ YouTubeVideo('Video ID') }} {% endraw %}
|
- {{ _("Copy and paste the syntax in the editor. Replace 'embed_src' with the embed source
+ {{ _("Copy and paste the syntax in the editor. Replace 'Video ID' with the embed source
that YouTube provides. To get the source, follow the steps mentioned below.") }}
@@ -265,11 +265,12 @@
{{ _("Quiz") }}
|
- {% raw %} {{ Quiz("lms_quiz_id") }} {% endraw %}
+ {% raw %} {{ Quiz('Quiz ID') }} {% endraw %}
|
{% set quiz_link = " Quiz List " %}
- {{ _("Copy and paste the syntax in the editor. Replace 'lms_quiz_id' with the ID of the Quiz. You can get the ID of the quiz from the {0}.").format(quiz_link) }}
+ {{ _("Copy and paste the syntax in the editor. Replace 'Quiz ID' with the Id of the Quiz.
+ You can get the Id of the quiz from the {0}.").format(quiz_link) }}
|
@@ -279,8 +280,10 @@
{% macro Discussions() %}
-{% set topics_count = frappe.db.count("Discussion Topic",
- {"reference_doctype": "Course Lesson", "reference_docname": lesson.name}) %}
+{% set topics_count = frappe.db.count("Discussion Topic", {
+ "reference_doctype": "Course Lesson",
+ "reference_docname": lesson.name
+}) %}
{% set is_instructor = frappe.session.user == course.instructor %}
{% set condition = is_instructor if is_instructor else membership %}
{% set doctype, docname = _("Course Lesson"), lesson.name %}
diff --git a/lms/www/batch/learn.js b/lms/www/batch/learn.js
index 2468b741..0fe52cd6 100644
--- a/lms/www/batch/learn.js
+++ b/lms/www/batch/learn.js
@@ -66,7 +66,7 @@ frappe.ready(() => {
$(".btn-back").click((e) => {
window.location.href = window.location.href.split("?")[0];
- })
+ });
$(document).on("click", ".copy-link", (e) => {
frappe.utils.copy_to_clipboard($(e.currentTarget).data("link"));
@@ -540,6 +540,11 @@ const build_attachment_table = (file_doc) => {
const make_editor = () => {
+ let comment = ``
+
this.code_field_group = new frappe.ui.FieldGroup({
fields: [
{
@@ -549,7 +554,7 @@ const make_editor = () => {
wrap: true,
max_lines: Infinity,
min_lines: 20,
- default: $("#body").data("body"),
+ default: $("#body").data("body") || comment,
depends_on: 'eval:doc.type=="Markdown"',
}
],
diff --git a/lms/www/batch/quiz.html b/lms/www/batch/quiz.html
index 97f8a435..28a66e4c 100644
--- a/lms/www/batch/quiz.html
+++ b/lms/www/batch/quiz.html
@@ -52,7 +52,7 @@
{% if option %}{{ option }}{% endif %}
-
{% if explanation %}{{ explanation }}{% endif %}
{% endmacro %}
diff --git a/lms/www/batch/quiz.js b/lms/www/batch/quiz.js
index 10c6698f..a7491fed 100644
--- a/lms/www/batch/quiz.js
+++ b/lms/www/batch/quiz.js
@@ -8,7 +8,11 @@ frappe.ready(() => {
save_question(e);
});
- get_questions()
+ $(".copy-quiz-id").click((e) => {
+ frappe.utils.copy_to_clipboard($(e.currentTarget).data("name"));
+ });
+
+ get_questions();
});
@@ -54,6 +58,7 @@ const save_question = (e) => {
if (!$("#quiz-title").text()) {
frappe.throw(__("Quiz Title is mandatory."));
}
+
frappe.call({
method: "lms.lms.doctype.lms_quiz.lms_quiz.save_quiz",
args: {
diff --git a/lms/www/batch/quiz_list.html b/lms/www/batch/quiz_list.html
index 41891b1d..8a34f17b 100644
--- a/lms/www/batch/quiz_list.html
+++ b/lms/www/batch/quiz_list.html
@@ -15,34 +15,46 @@
{% if quiz_list | length %}
{{ _("Add Quiz") }}
{{ _("Quiz List") }}
+
+
{% else %}
{{ _("You have not created any quiz yet.") }}
{{ _("Create a quiz and add it to your course to engage users.") }}
- {{ _("Add Quiz") }}
+ href="{% if frappe.session.user == 'Guest' %} /login?redirect-to=/quizzes {% else %} /quizzes/new-quiz {% endif %}">
+ {{ _("Add Quiz") }}
+
{% endif %}
@@ -50,3 +62,22 @@
{% endblock %}
+
+{% block script %}
+
+{% endblock %}
diff --git a/lms/www/courses/course.html b/lms/www/courses/course.html
index c7a18944..d049ad31 100644
--- a/lms/www/courses/course.html
+++ b/lms/www/courses/course.html
@@ -114,7 +114,9 @@