From 715e0fd80d4f56cf3214ac6261e4e5a7cdd2f3ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikel=20Mart=C3=ADn?= Date: Fri, 1 Aug 2025 16:07:59 +0200 Subject: [PATCH 1/3] MDL-86133 courseformat: Update overview buttons style --- public/mod/forum/classes/courseformat/overview.php | 2 +- public/mod/wiki/classes/courseformat/overview.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/mod/forum/classes/courseformat/overview.php b/public/mod/forum/classes/courseformat/overview.php index f545017355d..d4394fe3ace 100644 --- a/public/mod/forum/classes/courseformat/overview.php +++ b/public/mod/forum/classes/courseformat/overview.php @@ -141,7 +141,7 @@ class overview extends \core_courseformat\activityoverviewbase { $content = new action_link( url: new url('/mod/forum/view.php', ['id' => $this->cm->id]), text: $totalreplies .' ' . $badge, - attributes: ['class' => button::SECONDARY_OUTLINE->classes()], + attributes: ['class' => button::BODY_OUTLINE->classes()], ); return new overviewitem( diff --git a/public/mod/wiki/classes/courseformat/overview.php b/public/mod/wiki/classes/courseformat/overview.php index 07d94129e0d..26f73c2f759 100644 --- a/public/mod/wiki/classes/courseformat/overview.php +++ b/public/mod/wiki/classes/courseformat/overview.php @@ -77,7 +77,7 @@ class overview extends \core_courseformat\activityoverviewbase { $content = new action_link( url: $url, text: $text, - attributes: ['class' => button::SECONDARY_OUTLINE->classes()], + attributes: ['class' => button::BODY_OUTLINE->classes()], ); return new overviewitem( From 64f3673ae89461a2315411ce55cfc6528c2c0a1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikel=20Mart=C3=ADn?= Date: Thu, 31 Jul 2025 14:29:57 +0200 Subject: [PATCH 2/3] MDL-86133 courseformat: Standarise activity overview alignments --- public/course/format/classes/activityoverviewbase.php | 2 ++ public/mod/assign/classes/courseformat/overview.php | 2 +- public/mod/choice/classes/courseformat/overview.php | 1 - public/mod/data/classes/courseformat/overview.php | 10 +++++----- public/mod/feedback/classes/courseformat/overview.php | 2 +- public/mod/forum/classes/courseformat/overview.php | 4 +--- .../mod/h5pactivity/classes/courseformat/overview.php | 4 ++-- public/mod/lesson/classes/courseformat/overview.php | 2 +- public/mod/wiki/classes/courseformat/overview.php | 4 ++-- public/mod/workshop/classes/courseformat/overview.php | 8 ++++---- 10 files changed, 19 insertions(+), 20 deletions(-) diff --git a/public/course/format/classes/activityoverviewbase.php b/public/course/format/classes/activityoverviewbase.php index 33dc299ded6..318b47c31f9 100644 --- a/public/course/format/classes/activityoverviewbase.php +++ b/public/course/format/classes/activityoverviewbase.php @@ -18,6 +18,7 @@ namespace core_courseformat; use cm_info; use core\context\module as module_context; +use core\output\local\properties\text_align; use core_completion\cm_completion_details; use core_courseformat\local\overview\overviewitem; use core_courseformat\output\local\overview\activityname; @@ -283,6 +284,7 @@ abstract class activityoverviewbase { name: $itemnames[$item->id], value: $gradegrade->finalgrade, content: grade_format_gradevalue($gradegrade->finalgrade, $item), + textalign: text_align::END, ); } return $result; diff --git a/public/mod/assign/classes/courseformat/overview.php b/public/mod/assign/classes/courseformat/overview.php index f1bec6a3468..48ca12af217 100644 --- a/public/mod/assign/classes/courseformat/overview.php +++ b/public/mod/assign/classes/courseformat/overview.php @@ -149,7 +149,7 @@ class overview extends \core_courseformat\activityoverviewbase { 'core', ['count' => $submissions, 'total' => $total] ), - textalign: text_align::CENTER, + textalign: text_align::END, ); } diff --git a/public/mod/choice/classes/courseformat/overview.php b/public/mod/choice/classes/courseformat/overview.php index 7ade606f0ab..1cbca24d2a9 100644 --- a/public/mod/choice/classes/courseformat/overview.php +++ b/public/mod/choice/classes/courseformat/overview.php @@ -184,7 +184,6 @@ class overview extends \core_courseformat\activityoverviewbase { name: get_string('studentwhoresponded', 'choice'), value: $studentwhoanswered, content: $overviewdialog, - textalign: text_align::CENTER, ); } } diff --git a/public/mod/data/classes/courseformat/overview.php b/public/mod/data/classes/courseformat/overview.php index af3426dc4ef..ac20b69cf08 100644 --- a/public/mod/data/classes/courseformat/overview.php +++ b/public/mod/data/classes/courseformat/overview.php @@ -161,7 +161,7 @@ class overview extends \core_courseformat\activityoverviewbase { name: $this->stringmanager->get_string('totalentries', 'data'), value: $totalentries, content: $totalentries, - textalign: text_align::CENTER, + textalign: text_align::END, ); } @@ -180,7 +180,7 @@ class overview extends \core_courseformat\activityoverviewbase { name: $this->stringmanager->get_string('myentries', 'data'), value: $totalmyentries, content: $totalmyentries, - textalign: text_align::CENTER, + textalign: text_align::END, ); } @@ -198,7 +198,7 @@ class overview extends \core_courseformat\activityoverviewbase { name: $this->stringmanager->get_string('entries', 'data'), value: $totalentries, content: $totalentries, - textalign: text_align::CENTER, + textalign: text_align::END, ); } @@ -216,7 +216,7 @@ class overview extends \core_courseformat\activityoverviewbase { name: $this->stringmanager->get_string('comments', 'data'), value: 0, content: '-', - textalign: text_align::CENTER, + textalign: text_align::END, ); } @@ -227,7 +227,7 @@ class overview extends \core_courseformat\activityoverviewbase { name: $this->stringmanager->get_string('comments', 'data'), value: $totalcomments, content: $totalcomments, - textalign: text_align::CENTER, + textalign: text_align::END, ); } } diff --git a/public/mod/feedback/classes/courseformat/overview.php b/public/mod/feedback/classes/courseformat/overview.php index 71ea278fa1f..e05433442ba 100644 --- a/public/mod/feedback/classes/courseformat/overview.php +++ b/public/mod/feedback/classes/courseformat/overview.php @@ -107,7 +107,7 @@ class overview extends \core_courseformat\activityoverviewbase { return new overviewitem( name: get_string('responses', 'mod_feedback'), value: $submissions, - textalign: text_align::CENTER, + textalign: text_align::END, ); } diff --git a/public/mod/forum/classes/courseformat/overview.php b/public/mod/forum/classes/courseformat/overview.php index d4394fe3ace..d33b1a6da06 100644 --- a/public/mod/forum/classes/courseformat/overview.php +++ b/public/mod/forum/classes/courseformat/overview.php @@ -148,7 +148,6 @@ class overview extends \core_courseformat\activityoverviewbase { name: $this->stringmanager->get_string('posts', 'mod_forum'), value: $totalreplies ? : '0', content: $content, - textalign: text_align::CENTER, alertcount: $unread, alertlabel: $alertlabel, ); @@ -335,7 +334,6 @@ class overview extends \core_courseformat\activityoverviewbase { name: $this->stringmanager->get_string('digesttype', 'mod_forum'), value: $options[$this->forum->maildigest] ?? '-', content: $content ?? '-', - textalign: text_align::CENTER, ); } @@ -352,7 +350,7 @@ class overview extends \core_courseformat\activityoverviewbase { name: $this->stringmanager->get_string('discussions', 'mod_forum'), value: $totaldiscussions, content: $totaldiscussions, - textalign: text_align::CENTER, + textalign: text_align::END, ); } diff --git a/public/mod/h5pactivity/classes/courseformat/overview.php b/public/mod/h5pactivity/classes/courseformat/overview.php index 1cc86f7f6d6..8091470f0ca 100644 --- a/public/mod/h5pactivity/classes/courseformat/overview.php +++ b/public/mod/h5pactivity/classes/courseformat/overview.php @@ -107,7 +107,7 @@ class overview extends \core_courseformat\activityoverviewbase { name: get_string('attempts', 'mod_h5pactivity'), value: $attempts, content: $attempts ?? '-', - textalign: text_align::CENTER, + textalign: text_align::END, ); } @@ -132,7 +132,7 @@ class overview extends \core_courseformat\activityoverviewbase { name: get_string('attempted', 'mod_h5pactivity'), value: count($attempts), content: get_string('count_of_total', 'core', $params), - textalign: text_align::CENTER, + textalign: text_align::END, ); } diff --git a/public/mod/lesson/classes/courseformat/overview.php b/public/mod/lesson/classes/courseformat/overview.php index 21dd8b0e8a0..d831149c6c4 100644 --- a/public/mod/lesson/classes/courseformat/overview.php +++ b/public/mod/lesson/classes/courseformat/overview.php @@ -124,6 +124,7 @@ class overview extends \core_courseformat\activityoverviewbase { 'core', ['count' => $attemptedusers, 'total' => $totalusers] ), + textalign: text_align::END, ); } @@ -161,7 +162,6 @@ class overview extends \core_courseformat\activityoverviewbase { name: $this->stringmanager->get_string('totalattepmts', 'mod_lesson'), value: !empty($overviewdialog) ? $totalattempts : null, content: $overviewdialog ?? $totalattempts, - textalign: text_align::START, ); } } diff --git a/public/mod/wiki/classes/courseformat/overview.php b/public/mod/wiki/classes/courseformat/overview.php index 26f73c2f759..aa9b510db85 100644 --- a/public/mod/wiki/classes/courseformat/overview.php +++ b/public/mod/wiki/classes/courseformat/overview.php @@ -124,7 +124,7 @@ class overview extends \core_courseformat\activityoverviewbase { name: get_string('myentries', 'wiki'), value: $entriescount, content: $entriescount, - textalign: text_align::CENTER, + textalign: text_align::END, ); } @@ -144,7 +144,7 @@ class overview extends \core_courseformat\activityoverviewbase { name: $label, value: $entriescount, content: $entriescount, - textalign: text_align::CENTER, + textalign: text_align::END, ); } } diff --git a/public/mod/workshop/classes/courseformat/overview.php b/public/mod/workshop/classes/courseformat/overview.php index 6f7a674af90..97b9f40e4c4 100644 --- a/public/mod/workshop/classes/courseformat/overview.php +++ b/public/mod/workshop/classes/courseformat/overview.php @@ -189,7 +189,7 @@ class overview extends \core_courseformat\activityoverviewbase { name: get_string('submissions', 'workshop'), value: 0, content: '-', - textalign: text_align::CENTER, + textalign: text_align::END, ); } @@ -203,7 +203,7 @@ class overview extends \core_courseformat\activityoverviewbase { name: get_string('submissions', 'workshop'), value: $submissions, content: $content, - textalign: text_align::CENTER, + textalign: text_align::END, ); } @@ -227,7 +227,7 @@ class overview extends \core_courseformat\activityoverviewbase { name: get_string('assessments', 'workshop'), value: 0, content: '-', - textalign: text_align::CENTER, + textalign: text_align::END, ); } @@ -241,7 +241,7 @@ class overview extends \core_courseformat\activityoverviewbase { name: get_string('assessments', 'workshop'), value: $assessments, content: $content, - textalign: text_align::CENTER, + textalign: text_align::END, ); } } From 5f34fbae1327968d6e1d70927989a5f5f1ba6aa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mikel=20Mart=C3=ADn?= Date: Thu, 31 Jul 2025 14:47:51 +0200 Subject: [PATCH 3/3] MDL-86133 theme_boost: Improve course overview styles --- public/theme/boost/scss/moodle/courseoverview.scss | 13 +++++++++++++ public/theme/boost/style/moodle.css | 8 ++++++++ public/theme/classic/style/moodle.css | 8 ++++++++ 3 files changed, 29 insertions(+) diff --git a/public/theme/boost/scss/moodle/courseoverview.scss b/public/theme/boost/scss/moodle/courseoverview.scss index 782792fae94..f666f441698 100644 --- a/public/theme/boost/scss/moodle/courseoverview.scss +++ b/public/theme/boost/scss/moodle/courseoverview.scss @@ -7,8 +7,21 @@ $overviewdialogmaxwidth: 20rem !default; #course-overview-page { .table { + margin-bottom: 0; border-top: none; + + td, + th { + padding: map-get($spacers, 2) map-get($spacers, 4); + } + + tr:last-child { + td { + border-bottom: none; + } + } } + table tbody td { align-content: center; diff --git a/public/theme/boost/style/moodle.css b/public/theme/boost/style/moodle.css index 21c39a768ea..5f3fe221eed 100644 --- a/public/theme/boost/style/moodle.css +++ b/public/theme/boost/style/moodle.css @@ -31806,8 +31806,16 @@ table.calendartable caption { * Course Overview page styles. */ #course-overview-page .table { + margin-bottom: 0; border-top: none; } +#course-overview-page .table td, +#course-overview-page .table th { + padding: 0.5rem 1.5rem; +} +#course-overview-page .table tr:last-child td { + border-bottom: none; +} #course-overview-page table tbody td { align-content: center; } diff --git a/public/theme/classic/style/moodle.css b/public/theme/classic/style/moodle.css index 40ea688d152..087821fb6bb 100644 --- a/public/theme/classic/style/moodle.css +++ b/public/theme/classic/style/moodle.css @@ -31806,8 +31806,16 @@ table.calendartable caption { * Course Overview page styles. */ #course-overview-page .table { + margin-bottom: 0; border-top: none; } +#course-overview-page .table td, +#course-overview-page .table th { + padding: 0.5rem 1.5rem; +} +#course-overview-page .table tr:last-child td { + border-bottom: none; +} #course-overview-page table tbody td { align-content: center; }