Skip to content

Commit 863156e

Browse files
Fixed some Moodle coding guideline issues.
1 parent d1bcf1c commit 863156e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

classes/output/core/course_renderer.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,8 @@ protected function coursecat_coursebox_content(coursecat_helper $chelper, $cours
223223
// Course name.
224224
$coursename = $chelper->get_course_formatted_name($course);
225225
$courseurl = new moodle_url('/course/view.php', ['id' => $course->id]);
226-
$coursenamelink = html_writer::link($courseurl, $coursename, ['class' => 'aalink h5' . ($course->visible ? '' : ' dimmed')]);
226+
$options = ['class' => 'aalink h5' . ($course->visible ? '' : ' dimmed')];
227+
$coursenamelink = html_writer::link($courseurl, $coursename, $options);
227228

228229
$summarytype = get_config('theme_trema', 'summarytype');
229230
$showcardcontact = get_config('theme_trema', 'cardcontacts');
@@ -293,6 +294,7 @@ protected function coursecat_coursebox_content(coursecat_helper $chelper, $cours
293294
$databs = $CFG->branch >= 500 ? 'bs-' : '';
294295
if (!empty($summarytype) && ($course->has_summary())) {
295296
if ($summarytype == 'popover') { // See more button.
297+
$options = ['noclean' => true, 'para' => false];
296298
$content .= html_writer::start_tag('div', ['class' => 'card-see-more text-center']);
297299
$content .= html_writer::start_tag(
298300
'div',
@@ -304,7 +306,7 @@ protected function coursecat_coursebox_content(coursecat_helper $chelper, $cours
304306
"data-{$databs}region" => 'popover-region-toggle',
305307
"data-{$databs}toggle" => 'popover',
306308
"data-{$databs}placement" => 'right',
307-
"data-{$databs}content" => $chelper->get_course_formatted_summary($course, ['noclean' => true, 'para' => false]),
309+
"data-{$databs}content" => $chelper->get_course_formatted_summary($course, $options),
308310
"data-{$databs}html" => 'true',
309311
"data-{$databs}trigger" => 'focus',
310312
]

tests/behat/addblock.feature

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
@javascript @theme_trema
2-
Feature: Add a block using trema theme
1+
@javascript @theme
2+
Feature: Add a block using Trema theme
33
In order to decide the blocks to display in the Add a block list for a theme
44
As an administrator
55
I need to define them using the unaddableblocks setting

0 commit comments

Comments
 (0)