From b38a14fcb224295d6c96a0c6672a713bcf0ab5bb Mon Sep 17 00:00:00 2001 From: Kim Coleman Date: Tue, 12 Nov 2024 15:08:46 -0500 Subject: [PATCH 1/2] Displaying if a lesson in the syllabus has a quiz, assignment, or both --- assets/scss/frontend/_syllabus.scss | 9 +++++++++ templates/course/lesson-preview.php | 25 +++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/assets/scss/frontend/_syllabus.scss b/assets/scss/frontend/_syllabus.scss index 7810dd3946..3c561b44a2 100644 --- a/assets/scss/frontend/_syllabus.scss +++ b/assets/scss/frontend/_syllabus.scss @@ -91,6 +91,15 @@ .llms-main { flex-grow: 1; + + span.llms-lesson-has-quiz, + span.llms-lesson-has-assignment { + font-size: 14px; + } + + span.llms-lesson-has-quiz + span.llms-lesson-has-assignment { + margin-left: 10px; + } } .llms-extra { min-width: 50px; diff --git a/templates/course/lesson-preview.php b/templates/course/lesson-preview.php index 15ed7cd36f..3c7383a91d 100644 --- a/templates/course/lesson-preview.php +++ b/templates/course/lesson-preview.php @@ -63,6 +63,31 @@ do_action( 'llms_lesson_preview_before_title', $lesson ) ?>
get( 'id' ) ) ); ?>
+ + is_quiz_enabled(); + if ( $has_quiz ) { + ?> + + + + + + + get( 'id' ) ) ) { + ?> + + + + + + Date: Tue, 12 Nov 2024 15:12:53 -0500 Subject: [PATCH 2/2] Adding Changelog entry --- .changelogs/syllabus-lesson-has-quiz-assignment.yml | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .changelogs/syllabus-lesson-has-quiz-assignment.yml diff --git a/.changelogs/syllabus-lesson-has-quiz-assignment.yml b/.changelogs/syllabus-lesson-has-quiz-assignment.yml new file mode 100644 index 0000000000..faa1c324cf --- /dev/null +++ b/.changelogs/syllabus-lesson-has-quiz-assignment.yml @@ -0,0 +1,3 @@ +significance: minor +type: added +entry: Showing 'Has Quiz' or 'Has Assignment' in the Course Syllabus.