diff --git a/course/classes/management_renderer.php b/course/classes/management_renderer.php index 838e7fcdf2f..60a4844b548 100644 --- a/course/classes/management_renderer.php +++ b/course/classes/management_renderer.php @@ -640,7 +640,7 @@ class core_course_management_renderer extends plugin_renderer_base { $viewcourseurl = new moodle_url($this->page->url, array('courseid' => $course->id)); $html = html_writer::start_tag('li', $attributes); - $html .= html_writer::start_div('clearfix'); + $html .= html_writer::start_div('d-flex flex-wrap'); if ($category->can_resort_courses()) { // In order for dnd to be available the user must be able to resort the category children.. @@ -656,8 +656,10 @@ class core_course_management_renderer extends plugin_renderer_base { 'for' => 'courselistitem' . $course->id)); $html .= html_writer::end_div(); $html .= html_writer::end_div(); - $html .= html_writer::link($viewcourseurl, $text, array('class' => 'float-left coursename aalink')); - $html .= html_writer::start_div('float-right'); + $html .= html_writer::link( + $viewcourseurl, $text, array('class' => 'text-break col pl-0 mb-2 coursename aalink') + ); + $html .= html_writer::start_div('flex-shrink-0 ml-auto'); if ($course->idnumber) { $html .= html_writer::tag('span', s($course->idnumber), array('class' => 'text-muted idnumber')); } @@ -766,7 +768,7 @@ class core_course_management_renderer extends plugin_renderer_base { $action['attributes']['role'] = 'button'; $actionshtml[] = $this->output->action_icon($action['url'], $action['icon'], null, $action['attributes']); } - return html_writer::span(join('', $actionshtml), 'course-item-actions item-actions'); + return html_writer::span(join('', $actionshtml), 'course-item-actions item-actions mr-0'); } /** @@ -967,6 +969,9 @@ class core_course_management_renderer extends plugin_renderer_base { } $yuigridclass = "col-sm"; + if (in_array($size, [4, 5, 7])) { + $yuigridclass = "col-12 col-lg-6"; + } if (is_null($class)) { $class = $yuigridclass . ' ' . $bootstrapclass; diff --git a/theme/boost/scss/moodle/course.scss b/theme/boost/scss/moodle/course.scss index 88a7478d77b..64f077246d9 100644 --- a/theme/boost/scss/moodle/course.scss +++ b/theme/boost/scss/moodle/course.scss @@ -1003,6 +1003,7 @@ span.editinstructions { .coursename { display: inline-block; + flex-basis: 10rem; } } diff --git a/theme/boost/style/moodle.css b/theme/boost/style/moodle.css index bd9fb0909f7..470b5565579 100644 --- a/theme/boost/style/moodle.css +++ b/theme/boost/style/moodle.css @@ -14576,7 +14576,8 @@ span.editinstructions { margin-left: 1em; color: #a1a1a8; } #course-category-listings #course-listing .listitem .coursename { - display: inline-block; } + display: inline-block; + flex-basis: 10rem; } #course-category-listings #course-listing > .firstpage .listitem:first-child > div .item-actions .action-moveup, #course-category-listings #course-listing > .lastpage .listitem:last-child > div .item-actions .action-movedown { display: none; } diff --git a/theme/classic/style/moodle.css b/theme/classic/style/moodle.css index fd379ddcd67..f7f65d1fbd7 100644 --- a/theme/classic/style/moodle.css +++ b/theme/classic/style/moodle.css @@ -14576,7 +14576,8 @@ span.editinstructions { margin-left: 1em; color: #a1a1a8; } #course-category-listings #course-listing .listitem .coursename { - display: inline-block; } + display: inline-block; + flex-basis: 10rem; } #course-category-listings #course-listing > .firstpage .listitem:first-child > div .item-actions .action-moveup, #course-category-listings #course-listing > .lastpage .listitem:last-child > div .item-actions .action-movedown { display: none; }