mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-76145 course: Avoid long course names that exceed available space
Co-authored-by: Stephen Sharpe <stephen.sharpe@synergy-learning.com>
This commit is contained in:
parent
57c1e97bf1
commit
ed5db9e301
4 changed files with 14 additions and 6 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue