diff --git a/changes.txt b/changes.txt index 22c8b52..4cb0e6d 100644 --- a/changes.txt +++ b/changes.txt @@ -1,5 +1,10 @@ CHANGES LOG +Version 4.1.2 +=============. +Tweak - UI improvements in Label activitity. +Tweak - Multilang support added in header in course page. + Version 4.1.1 ============= Fix - Input field editable text visibility when background image is available on section cards. diff --git a/classes/course_format_data_common_trait.php b/classes/course_format_data_common_trait.php index 938c3d1..72fa7d3 100644 --- a/classes/course_format_data_common_trait.php +++ b/classes/course_format_data_common_trait.php @@ -741,6 +741,7 @@ public function course_section_cm_text(cm_info $mod, $displayoptions = array()) } $content = $mod->get_formatted_content(array('overflowdiv' => true, 'noclean' => true)); list($linkclasses, $textclasses) = $this->course_section_cm_classes($mod); + if ($mod->url && $mod->uservisible) { if ($content) { // If specified, display extra content after link. @@ -958,8 +959,10 @@ private function get_activities_details($section, $course, $courserenderer, $set $settings ); if ($mod->modname == 'label') { - $activitydetails->title = $activitydetails->summary; + $activitydetails->title .= $this->course_section_cm_text($mod, $displayoptions); + $activitydetails->displayasblock = true; $activitydetails->summary = ''; + } } else { $activitydetails->summary = ''; diff --git a/lib.php b/lib.php index 1e98cf4..92bb378 100644 --- a/lib.php +++ b/lib.php @@ -893,8 +893,8 @@ function get_extra_header_context(&$export, $course, $percentage, $imgurl) { } $coursesettings = course_get_format($course)->get_settings(); $export->generalsection['teachers'] = get_enrolled_teachers_context_formate($course->id, true); - $export->generalsection['coursefullname'] = $coursedetails->fullname; - $export->generalsection['coursecategoryname'] = $categorydetails->name; + $export->generalsection['coursefullname'] = format_text($coursedetails->fullname); + $export->generalsection['coursecategoryname'] = format_text($categorydetails->name); $export->generalsection['rnrdesign'] = $rnrshortdesign; if (gettype($imgurl) != "object") { $imgurl = formate_get_course_image($course); diff --git a/scss/card-layout.scss b/scss/card-layout.scss index db3dfde..4d08487 100644 --- a/scss/card-layout.scss +++ b/scss/card-layout.scss @@ -26,6 +26,9 @@ } } .activity { + &.label { + grid-column: 1/-1; + } .title { margin-bottom: 30px; } @@ -636,6 +639,23 @@ } } } + &.modtype_label{ + grid-column: 1/-1 !important; + .single-card{ + background-color: transparent; + + .toggle-row-column{ + display: none; + } + .completion-info{ + display: flex; + justify-content: flex-end; + .btn{ + width: fit-content; + } + } + } + } } } } diff --git a/scss/list-layout.scss b/scss/list-layout.scss index 02ec1ff..84110e7 100644 --- a/scss/list-layout.scss +++ b/scss/list-layout.scss @@ -64,6 +64,7 @@ .modtype_label { .contentwithoutlink { + max-height: 100%; padding: 0px; } } diff --git a/scss/styles.scss b/scss/styles.scss index cecb2d3..af2cd2c 100644 --- a/scss/styles.scss +++ b/scss/styles.scss @@ -437,16 +437,60 @@ body#page-course-view-remuiformat { margin: 0px; max-width: unset; .activity { - padding: $pad-24; - background: $white; - border: $border-height solid $light-border; - border-radius: $border-radius-8; - min-height: 350px; - transition: all 0.5s ease; - &:hover{ - box-shadow: $card-box-shadow; + &:not(.modtype_label) { + padding: $pad-24; + background: $white; + border: $border-height solid $light-border; + border-radius: $border-radius-8; + min-height: 350px; + transition: all 0.5s ease; + &:hover{ + box-shadow: $card-box-shadow; + } + .actions { + display: flex; + position: relative; + justify-content: start; + margin-top: $margin-8; + padding: 0px; + + .spinner { + position: relative; + left: 0; + } + + .cm_action_menu.actions { + margin: 0px; + width: 100%; + position: unset !important; + justify-content: flex-end; + } + + .activity-information { + width: 100%; + + .completion-info { + width: 100%; + float: left; + + .btn { + width: 100%; + } + } + } + } } + &.modtype_label { + grid-column: 1/-1; + text-align: left ; + .actions{ + position: relative !important; + justify-content: flex-end; + align-items: center; + gap: 16px; + } + } .activitytitle { display: flex; flex-direction: column; @@ -466,38 +510,7 @@ body#page-course-view-remuiformat { } } - .actions { - display: flex; - position: relative; - justify-content: start; - margin-top: $margin-8; - padding: 0px; - - .spinner { - position: relative; - left: 0; - } - - .cm_action_menu.actions { - margin: 0px; - width: 100%; - position: unset; - justify-content: flex-end; - } - .activity-information { - width: 100%; - - .completion-info { - width: 100%; - float: left; - - .btn { - width: 100%; - } - } - } - } .editing_move { position: absolute; diff --git a/styles.css b/styles.css index 72216b4..3f6ba6b 100755 --- a/styles.css +++ b/styles.css @@ -47,6 +47,10 @@ body#page-course-view-remuiformat.editing .remui-format-card.single-section-form margin-bottom: 1.5rem !important; } +body#page-course-view-remuiformat.editing .remui-format-card.single-section-format .activity.label { + grid-column: 1/-1; +} + body#page-course-view-remuiformat.editing .remui-format-card.single-section-format .activity .title { margin-bottom: 30px; } @@ -523,7 +527,6 @@ body#page-course-view-remuiformat .remui-format-card.single-section-format .acti body#page-course-view-remuiformat .remui-format-card.single-section-format .activity-cards.section .activity .editing_move { position: relative; width: -webkit-fit-content; - width: -moz-fit-content; width: fit-content; top: -15px; left: -15px; @@ -574,7 +577,6 @@ body#page-course-view-remuiformat .remui-format-card.single-section-format .acti body#page-course-view-remuiformat .remui-format-card.single-section-format .activity-cards .activity .completion-container .automatic-completion-conditions .badge, body#page-course-view-remuiformat .remui-format-card.single-section-format .activity-cards.section .activity .completion-container .automatic-completion-conditions .badge { width: -webkit-fit-content; - width: -moz-fit-content; width: fit-content; } @@ -662,6 +664,33 @@ body#page-course-view-remuiformat .remui-format-card.single-section-format .acti display: none; } +body#page-course-view-remuiformat .remui-format-card.single-section-format .activity-cards .activity.modtype_label, +body#page-course-view-remuiformat .remui-format-card.single-section-format .activity-cards.section .activity.modtype_label { + grid-column: 1/-1 !important; +} + +body#page-course-view-remuiformat .remui-format-card.single-section-format .activity-cards .activity.modtype_label .single-card, +body#page-course-view-remuiformat .remui-format-card.single-section-format .activity-cards.section .activity.modtype_label .single-card { + background-color: transparent; +} + +body#page-course-view-remuiformat .remui-format-card.single-section-format .activity-cards .activity.modtype_label .single-card .toggle-row-column, +body#page-course-view-remuiformat .remui-format-card.single-section-format .activity-cards.section .activity.modtype_label .single-card .toggle-row-column { + display: none; +} + +body#page-course-view-remuiformat .remui-format-card.single-section-format .activity-cards .activity.modtype_label .single-card .completion-info, +body#page-course-view-remuiformat .remui-format-card.single-section-format .activity-cards.section .activity.modtype_label .single-card .completion-info { + display: flex; + justify-content: flex-end; +} + +body#page-course-view-remuiformat .remui-format-card.single-section-format .activity-cards .activity.modtype_label .single-card .completion-info .btn, +body#page-course-view-remuiformat .remui-format-card.single-section-format .activity-cards.section .activity.modtype_label .single-card .completion-info .btn { + width: -webkit-fit-content; + width: fit-content; +} + body#page-course-view-remuiformat .remui-format-card .contentwithoutlink { padding: 0; } @@ -785,6 +814,7 @@ body#page-course-view-remuiformat.editing .remui-format-list.one-section-format } body#page-course-view-remuiformat .modtype_label .contentwithoutlink { + max-height: 100%; padding: 0px; } @@ -974,7 +1004,6 @@ body#page-course-view-remuiformat .remui-format-list .sections .section ul.secti body#page-course-view-remuiformat .remui-format-list .sections .section .right.side { width: -webkit-max-content; - width: -moz-max-content; width: max-content; } @@ -1374,7 +1403,6 @@ body#page-course-view-remuiformat .card-section-leftnav { background-color: #0051F9; border-radius: 5px; height: -webkit-fit-content; - height: -moz-fit-content; height: fit-content; } @@ -1438,7 +1466,6 @@ body#page-course-view-remuiformat .automatic-completion-conditions .badge { background-color: #EBF0F9; border-radius: 4px; width: -webkit-fit-content; - width: -moz-fit-content; width: fit-content; } @@ -1624,7 +1651,7 @@ body#page-course-view-remuiformat .course-content .sections #section-0 .general- } } -body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity { +body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity:not(.modtype_label) { padding: 24px; background: #fff; border: 1px solid #EBF0F9; @@ -1633,29 +1660,11 @@ body#page-course-view-remuiformat .course-content .sections #section-0 .general- transition: all 0.5s ease; } -body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity:hover { +body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity:not(.modtype_label):hover { box-shadow: 0px 13px 37px rgba(92, 107, 121, 0.1); } -body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity .activitytitle { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - width: 100%; - gap: 16px; -} - -body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity .availabilityinfo .description-inner { - color: #4C5A73; - text-align: left; -} - -body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity .availabilityinfo .description-inner .icon { - margin: unset; -} - -body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity .actions { +body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity:not(.modtype_label) .actions { display: flex; position: relative; justify-content: start; @@ -1663,29 +1672,59 @@ body#page-course-view-remuiformat .course-content .sections #section-0 .general- padding: 0px; } -body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity .actions .spinner { +body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity:not(.modtype_label) .actions .spinner { position: relative; left: 0; } -body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity .actions .cm_action_menu.actions { +body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity:not(.modtype_label) .actions .cm_action_menu.actions { margin: 0px; width: 100%; - position: unset; + position: unset !important; justify-content: flex-end; } -body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity .actions .activity-information { +body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity:not(.modtype_label) .actions .activity-information { width: 100%; } -body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity .actions .activity-information .completion-info { +body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity:not(.modtype_label) .actions .activity-information .completion-info { width: 100%; float: left; } -body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity .actions .activity-information .completion-info .btn { +body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity:not(.modtype_label) .actions .activity-information .completion-info .btn { + width: 100%; +} + +body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity.modtype_label { + grid-column: 1/-1; + text-align: left; +} + +body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity.modtype_label .actions { + position: relative !important; + justify-content: flex-end; + align-items: center; + gap: 16px; +} + +body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity .activitytitle { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; width: 100%; + gap: 16px; +} + +body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity .availabilityinfo .description-inner { + color: #4C5A73; + text-align: left; +} + +body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity .availabilityinfo .description-inner .icon { + margin: unset; } body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity .editing_move { diff --git a/templates/optional_secheader.mustache b/templates/optional_secheader.mustache index a9c3b2c..e239b4b 100644 --- a/templates/optional_secheader.mustache +++ b/templates/optional_secheader.mustache @@ -11,12 +11,12 @@
- {{coursecategoryname}} + {{{coursecategoryname}}}
-

{{coursefullname}}

+

{{{coursefullname}}}

diff --git a/version.php b/version.php index 93f874d..741b0bd 100644 --- a/version.php +++ b/version.php @@ -23,8 +23,8 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2023032000; // The current plugin version (Date: YYYYMMDDXX). -$plugin->release = '4.1.1'; +$plugin->version = 2023041300; // The current plugin version (Date: YYYYMMDDXX). +$plugin->release = '4.1.2'; $plugin->requires = 2022041900; // Requires this Moodle version (Moodle V4.0). $plugin->maturity = MATURITY_STABLE; $plugin->component = 'format_remuiformat'; // Full name of the plugin (used for diagnostics).