diff --git a/.github/workflows/moodle-ci.yml b/.github/workflows/moodle-ci.yml index eaf5eb8..7e6366f 100644 --- a/.github/workflows/moodle-ci.yml +++ b/.github/workflows/moodle-ci.yml @@ -35,10 +35,10 @@ jobs: matrix: include: # Moodle 3.4 (old) version.php $plugin -> requires = 2017111300 - - php: '7.0' # 7.0-7.2 - moodle-branch: 'MOODLE_34_STABLE' - database: mariadb - plugin-ci: ^3 + #- php: '7.0' # 7.0-7.2 + # moodle-branch: 'MOODLE_34_STABLE' + # database: mariadb + # plugin-ci: ^3 # Moodle 3.5 - php: '7.0' # 7.0-7.2 moodle-branch: 'MOODLE_35_STABLE' diff --git a/classes/courseheader.php b/classes/courseheader.php index c4d3f32..5ddcc0c 100644 --- a/classes/courseheader.php +++ b/classes/courseheader.php @@ -97,7 +97,7 @@ public function output(): string { $o = \html_writer::start_tag('div', [ 'id' => 'course-header-banner', 'style' => "background-image: url('{$this->imageurl}'); " - . "background-position: center {$this->bannerslice}%;" + . "background-position: center {$this->bannerslice}%;", ]); $o .= \html_writer::tag('div', $this->coursename, [ 'id' => 'course-header-banner-text', @@ -106,7 +106,7 @@ public function output(): string { // Output the attribution. $o .= \html_writer::start_tag('p', ['id' => 'course-header-banner_attribution', - 'style' => 'visibility: ' . ($this->imageurl ? 'visible' : 'hidden') . ';']); + 'style' => 'visibility: ' . ($this->imageurl ? 'visible' : 'hidden') . ';', ]); $o .= format_multitopic_image_attribution($this->imagename, $this->authorwithurl, $this->licencecode); $o .= \html_writer::end_tag('p'); diff --git a/lib.php b/lib.php index 43fd1a7..0d25eea 100644 --- a/lib.php +++ b/lib.php @@ -617,7 +617,7 @@ public function ajax_section_move() : array { public function get_default_blocks() : array { return [ BLOCK_POS_LEFT => [], - BLOCK_POS_RIGHT => [] + BLOCK_POS_RIGHT => [], ]; } @@ -640,13 +640,13 @@ public function course_format_options($foreditform = false) : array { // INCLUDED /course/format/periods/lib.php function course_format_options 'periodduration'. 'periodduration' => [ 'default' => null, // CHANGED. - 'type' => PARAM_NOTAGS + 'type' => PARAM_NOTAGS, ], // END INCLUDED. // ADDED. 'collapsible' => [ 'default' => '1', - 'type' => PARAM_ALPHANUM + 'type' => PARAM_ALPHANUM, ], // END ADDED. 'hiddensections' => [ @@ -676,7 +676,7 @@ public function course_format_options($foreditform = false) : array { null => new lang_string('period_undefined', 'format_multitopic'), '1 day' => new lang_string('numday', '', 1), '1 week' => new lang_string('numweek', '', 1), - ]], + ], ], // END ADDED. ], // END INCLUDED. @@ -688,7 +688,7 @@ public function course_format_options($foreditform = false) : array { [ '0' => get_string('no'), '1' => get_string('yes'), - ] + ], ], 'help' => 'collapsibledefault', 'help_component' => 'format_multitopic', @@ -702,8 +702,8 @@ public function course_format_options($foreditform = false) : array { 'element_attributes' => [ [ 0 => new lang_string('hiddensectionscollapsed'), - 1 => new lang_string('hiddensectionsinvisible') - ] + 1 => new lang_string('hiddensectionsinvisible'), + ], ], ], // REMOVED: coursedisplay . @@ -724,7 +724,7 @@ public function course_format_options($foreditform = false) : array { '70%', '71%', '72%', '73%', '74%', '75%', '76%', '77%', '78%', '79%', '80%', '81%', '82%', '83%', '84%', '85%', '86%', '87%', '88%', '89%', '90%', '91%', '92%', '93%', '94%', '95%', '96%', '97%', '98%', '99%', - '100%'] + '100%', ], ], ], // END ADDED. @@ -768,19 +768,19 @@ public function section_format_options($foreditform = false) : array { // INCLUDED /course/format/onetopic/lib.php function section_format_options 'level'. 'level' => [ 'default' => FORMAT_MULTITOPIC_SECTION_LEVEL_TOPIC, // CHANGED. - 'type' => PARAM_INT + 'type' => PARAM_INT, ], // END INCLUDED. // INCLUDED /course/format/periods/lib.php function section_format_options 'periodduration'. 'periodduration' => [ 'default' => null, // ADDED. - 'type' => PARAM_NOTAGS + 'type' => PARAM_NOTAGS, ], // END INCLUDED. // ADDED. 'collapsible' => [ 'default' => null, - 'type' => PARAM_ALPHANUM + 'type' => PARAM_ALPHANUM, ], // END ADDED. ]; @@ -796,8 +796,8 @@ public function section_format_options($foreditform = false) : array { [ FORMAT_MULTITOPIC_SECTION_LEVEL_ROOT + 1 => get_string('asprincipal', 'format_multitopic'), // CHANGED. FORMAT_MULTITOPIC_SECTION_LEVEL_ROOT + 2 => get_string('aschild', 'format_multitopic'), // CHANGED. - FORMAT_MULTITOPIC_SECTION_LEVEL_TOPIC => get_string('topic') // ADDED. - ] + FORMAT_MULTITOPIC_SECTION_LEVEL_TOPIC => get_string('topic'), // ADDED. + ], ], 'help' => 'level', 'help_component' => 'format_multitopic', @@ -824,7 +824,7 @@ public function section_format_options($foreditform = false) : array { '2 week' => new lang_string('numweeks', '', 2), '3 week' => new lang_string('numweeks', '', 3), '4 week' => new lang_string('numweeks', '', 4), - ]], + ], ], // END ADDED. ], // END INCLUDED. @@ -837,7 +837,7 @@ public function section_format_options($foreditform = false) : array { null => new lang_string('default'), '0' => get_string('no'), '1' => get_string('yes'), - ] + ], ], 'help' => 'collapsibleoverride', 'help_component' => 'format_multitopic', @@ -1053,7 +1053,7 @@ public function inplace_editable_render_section_name($section, $linkifneeded = t $displayvalue = $title = html_writer::tag('i', '', ['class' => ($section->levelsan < FORMAT_MULTITOPIC_SECTION_LEVEL_TOPIC ? 'icon fa fa-folder-o fa-fw' - : 'icon fa fa-list fa-fw')]) + : 'icon fa fa-list fa-fw'), ]) . ' ' . get_section_name($section->course, $section); // CHANGED. // TODO: Fix collapse icon for AJAX rename, somehow? if ($linkifneeded) { diff --git a/renderer.php b/renderer.php index 8088cd5..8378ebe 100644 --- a/renderer.php +++ b/renderer.php @@ -207,7 +207,7 @@ protected function section_header($section, $course, $onsectionpage, $sectionret 'aria-labelledby' => "sectionid-{$section->id}-title", 'aria-label' => get_section_name($course, $section), // For Sharing Cart. 'data-sectionid' => $section->section, - 'data-sectionreturnid' => $section->section // CHANGED. + 'data-sectionreturnid' => $section->section, // CHANGED. ]); // Create a span that contains the section title to be used to create the keyboard section move menu. @@ -713,7 +713,7 @@ public function print_multiple_section_page($course, $sections, $mods, $modnames . ($thissection->currentnestedlevel >= $level ? ' marker' : '') . ((!$thissection->visible || !$thissection->available) && ($thissection->section != 0) || $level > $thissection->pagedepthdirect ? ' dimmed' : ''), - 'data-itemid' => $thissection->id + 'data-itemid' => $thissection->id, ]), $sectionname); $newtab->level = $level - FORMAT_MULTITOPIC_SECTION_LEVEL_ROOT; diff --git a/settings.php b/settings.php index a18dd4e..9705f26 100644 --- a/settings.php +++ b/settings.php @@ -36,7 +36,7 @@ 0 => new lang_string('sunday', 'calendar'), 1 => new lang_string('monday', 'calendar'), 5 => new lang_string('friday', 'calendar'), - 6 => new lang_string('saturday', 'calendar') + 6 => new lang_string('saturday', 'calendar'), ] )); diff --git a/version.php b/version.php index 867134f..1d029d1 100644 --- a/version.php +++ b/version.php @@ -25,7 +25,7 @@ defined('MOODLE_INTERNAL') || die(); -$plugin->version = 2022053002; // The current plugin version (Date: YYYYMMDDXX). +$plugin->version = 2018051700; // The current plugin version (Date: YYYYMMDDXX). $plugin->requires = 2017111300; // Requires this Moodle version. $plugin->component = 'format_multitopic'; // Full name of the plugin (used for diagnostics). // CHANGED: format name. $plugin->maturity = MATURITY_STABLE;