From 6485d1ec95cda20e44b74f81e0fc825e0b43e9d0 Mon Sep 17 00:00:00 2001 From: "abhishek.kushwah" Date: Tue, 4 Apr 2023 09:59:01 +0530 Subject: [PATCH 1/5] label activity improvement and multilang issue in header --- classes/course_format_data_common_trait.php | 5 +- lib.php | 4 +- scss/card-layout.scss | 20 ++++ scss/list-layout.scss | 1 + scss/styles.scss | 91 +++++++++-------- styles.css | 103 ++++++++++++++------ templates/optional_secheader.mustache | 4 +- 7 files changed, 152 insertions(+), 76 deletions(-) mode change 100755 => 100644 styles.css 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 old mode 100755 new mode 100644 index 72216b4..3f6ba6b --- 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}}}

From 8689c9338ec41e50f6b4c312f822e5243198b8c6 Mon Sep 17 00:00:00 2001 From: "abhishek.kushwah" Date: Tue, 11 Apr 2023 09:28:20 +0530 Subject: [PATCH 2/5] Er523 --- scss/card-layout.scss | 3 ++- scss/styles.scss | 22 ++++++++++++++++++++++ styles.css | 18 ++++++++++++++++-- 3 files changed, 40 insertions(+), 3 deletions(-) mode change 100644 => 100755 styles.css diff --git a/scss/card-layout.scss b/scss/card-layout.scss index 4d08487..e0e88b2 100644 --- a/scss/card-layout.scss +++ b/scss/card-layout.scss @@ -651,7 +651,8 @@ display: flex; justify-content: flex-end; .btn{ - width: fit-content; + // width: fit-content; + max-width: 262px; } } } diff --git a/scss/styles.scss b/scss/styles.scss index af2cd2c..b34bf75 100644 --- a/scss/styles.scss +++ b/scss/styles.scss @@ -232,6 +232,18 @@ body#page-course-view-remuiformat { padding-top: 0.714rem; } } + &.modtype_label { + .actions{ + .activity-information{ + .completion-info{ + .btn{ + width: 100%; + max-width: 126px !important; + } + } + } + } + } } } } @@ -489,6 +501,16 @@ body#page-course-view-remuiformat { justify-content: flex-end; align-items: center; gap: 16px; + .activity-information{ + width: 100%; + text-align: right; + .completion-info{ + .btn{ + width: 100%; + max-width: 262px; + } + } + } } } .activitytitle { diff --git a/styles.css b/styles.css old mode 100644 new mode 100755 index 3f6ba6b..7471ed5 --- a/styles.css +++ b/styles.css @@ -687,8 +687,7 @@ 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.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; + max-width: 262px; } body#page-course-view-remuiformat .remui-format-card .contentwithoutlink { @@ -1434,6 +1433,11 @@ body#page-course-view-remuiformat.editing .general-section-activities .activity. padding-top: 0.714rem; } +body#page-course-view-remuiformat.editing .general-section-activities .activity.modtype_label .actions .activity-information .completion-info .btn { + width: 100%; + max-width: 126px !important; +} + body#page-course-view-remuiformat .activity.activity-wrapper .activity-item .description .activity-dates .description-inner div { line-height: 22px; } @@ -1709,6 +1713,16 @@ body#page-course-view-remuiformat .course-content .sections #section-0 .general- gap: 16px; } +body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity.modtype_label .actions .activity-information { + width: 100%; + text-align: right; +} + +body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity.modtype_label .actions .activity-information .completion-info .btn { + width: 100%; + max-width: 262px; +} + body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity .activitytitle { display: flex; flex-direction: column; From 72f26c282f0ddd334a8d28cc05bbc51cd35d3a7a Mon Sep 17 00:00:00 2001 From: "abhishek.kushwah" Date: Tue, 11 Apr 2023 16:19:53 +0530 Subject: [PATCH 3/5] changing button width in label activity --- scss/styles.scss | 2 +- styles.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scss/styles.scss b/scss/styles.scss index b34bf75..16261bc 100644 --- a/scss/styles.scss +++ b/scss/styles.scss @@ -507,7 +507,7 @@ body#page-course-view-remuiformat { .completion-info{ .btn{ width: 100%; - max-width: 262px; + max-width: 252px; } } } diff --git a/styles.css b/styles.css index 7471ed5..cc59133 100755 --- a/styles.css +++ b/styles.css @@ -1720,7 +1720,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.modtype_label .actions .activity-information .completion-info .btn { width: 100%; - max-width: 262px; + max-width: 252px; } body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity .activitytitle { From daf3e468aada743382224d93a5a03eaa0e8bd6ca Mon Sep 17 00:00:00 2001 From: "abhishek.kushwah" Date: Thu, 13 Apr 2023 16:13:54 +0530 Subject: [PATCH 4/5] qa demo changes:button width keeping it default --- scss/card-layout.scss | 3 +-- scss/styles.scss | 22 ---------------------- styles.css | 18 ++---------------- 3 files changed, 3 insertions(+), 40 deletions(-) diff --git a/scss/card-layout.scss b/scss/card-layout.scss index e0e88b2..4d08487 100644 --- a/scss/card-layout.scss +++ b/scss/card-layout.scss @@ -651,8 +651,7 @@ display: flex; justify-content: flex-end; .btn{ - // width: fit-content; - max-width: 262px; + width: fit-content; } } } diff --git a/scss/styles.scss b/scss/styles.scss index 16261bc..af2cd2c 100644 --- a/scss/styles.scss +++ b/scss/styles.scss @@ -232,18 +232,6 @@ body#page-course-view-remuiformat { padding-top: 0.714rem; } } - &.modtype_label { - .actions{ - .activity-information{ - .completion-info{ - .btn{ - width: 100%; - max-width: 126px !important; - } - } - } - } - } } } } @@ -501,16 +489,6 @@ body#page-course-view-remuiformat { justify-content: flex-end; align-items: center; gap: 16px; - .activity-information{ - width: 100%; - text-align: right; - .completion-info{ - .btn{ - width: 100%; - max-width: 252px; - } - } - } } } .activitytitle { diff --git a/styles.css b/styles.css index cc59133..3f6ba6b 100755 --- a/styles.css +++ b/styles.css @@ -687,7 +687,8 @@ 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.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 { - max-width: 262px; + width: -webkit-fit-content; + width: fit-content; } body#page-course-view-remuiformat .remui-format-card .contentwithoutlink { @@ -1433,11 +1434,6 @@ body#page-course-view-remuiformat.editing .general-section-activities .activity. padding-top: 0.714rem; } -body#page-course-view-remuiformat.editing .general-section-activities .activity.modtype_label .actions .activity-information .completion-info .btn { - width: 100%; - max-width: 126px !important; -} - body#page-course-view-remuiformat .activity.activity-wrapper .activity-item .description .activity-dates .description-inner div { line-height: 22px; } @@ -1713,16 +1709,6 @@ body#page-course-view-remuiformat .course-content .sections #section-0 .general- gap: 16px; } -body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity.modtype_label .actions .activity-information { - width: 100%; - text-align: right; -} - -body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity.modtype_label .actions .activity-information .completion-info .btn { - width: 100%; - max-width: 252px; -} - body#page-course-view-remuiformat .course-content .sections #section-0 .general-section .activities-wrapper .general-section-activities .activity .activitytitle { display: flex; flex-direction: column; From 344ffde4d47155a8ec2c25f07072d68b727474f4 Mon Sep 17 00:00:00 2001 From: "abhishek.kushwah" Date: Thu, 13 Apr 2023 18:41:57 +0530 Subject: [PATCH 5/5] Changes.txt and version updated - 4.1.2 --- changes.txt | 5 +++++ version.php | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) 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/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).