diff --git a/lms/lms/doctype/lms_course/lms_course.py b/lms/lms/doctype/lms_course/lms_course.py index 855c4034..76b8e097 100644 --- a/lms/lms/doctype/lms_course/lms_course.py +++ b/lms/lms/doctype/lms_course/lms_course.py @@ -195,7 +195,7 @@ def submit_for_review(course): @frappe.whitelist() -def save_course(tags, title, short_introduction, video_link, image, description, course): +def save_course(tags, title, short_introduction, video_link, description, course, image=None): if course: doc = frappe.get_doc("LMS Course", course) else: diff --git a/lms/public/css/style.css b/lms/public/css/style.css index 4060b8d6..dda47d98 100644 --- a/lms/public/css/style.css +++ b/lms/public/css/style.css @@ -1620,3 +1620,13 @@ li { display: flex; align-items: center; } + +.preview-video-header { + position: relative; +} + +.preview-info { + position: absolute; + top: 0; + right: -30px; +} diff --git a/lms/www/batch/learn.html b/lms/www/batch/learn.html index b7de690b..47b1bca1 100644 --- a/lms/www/batch/learn.html +++ b/lms/www/batch/learn.html @@ -180,7 +180,7 @@
diff --git a/lms/www/batch/quiz.html b/lms/www/batch/quiz.html index a09d96d1..97f8a435 100644 --- a/lms/www/batch/quiz.html +++ b/lms/www/batch/quiz.html @@ -69,7 +69,7 @@
+ {% if not quiz.name %} hide {% endif %}"> {{ _("Save Quiz") }}
{% endmacro %} diff --git a/lms/www/courses/course.html b/lms/www/courses/course.html index 252eb8ba..dd10db86 100644 --- a/lms/www/courses/course.html +++ b/lms/www/courses/course.html @@ -82,15 +82,22 @@ {% endif %} id="intro" >{% if course.short_introduction %} {{ course.short_introduction }} {% endif %} {% if course.edit_mode %} - +
+ + + {{ _("If you have a video that provides a teaser or preview of the course, you can add it here. Upload the video on youtube. When you share a youtube video, it shows an option called Embed. On clicking it, it provides an iframe. Copy the source of the iframe and paste it here.") }} + + +
+ + {% if course.image %}
{{ course.image }}
- - {% if not course.image %} + {% else %} {{ _("Attach Image") }} {% endif %} {% endif %}