Skip to content

Commit 3b0c4b7

Browse files
committed
Merge branch 'master' into moodle_500_use_set_sectionid_not_num_mdl-83857
2 parents ac2e586 + 1bcbafe commit 3b0c4b7

17 files changed

Lines changed: 72 additions & 38 deletions

File tree

.github/workflows/moodle-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ jobs:
100100
if: ${{ !cancelled() }}
101101
run: moodle-plugin-ci phpmd
102102

103-
- name: Moodle Code Checker
104-
if: ${{ !cancelled() }}
105-
run: moodle-plugin-ci phpcs --max-warnings 0
103+
#- name: Moodle Code Checker
104+
# if: ${{ !cancelled() }}
105+
# run: moodle-plugin-ci phpcs --max-warnings 0
106106

107107
- name: Moodle PHPDoc Checker
108108
if: ${{ !cancelled() }}

amd/build/courseformat/content.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

amd/build/courseformat/content.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

amd/build/courseformat/content/section/header.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

amd/build/courseformat/content/section/header.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

amd/src/courseformat/content.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,10 @@ export default class Component extends BaseComponent {
244244
}
245245
}
246246

247+
if (element.component) {
248+
return;
249+
}
250+
247251
// Update subtitle.
248252
target.querySelector(".section_subtitle").textContent = element.subtitle;
249253
}

amd/src/courseformat/content/section/header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default class extends HeaderBase {
3636
*/
3737
_isSectionBulkEnabled(bulk) {
3838
return super._isSectionBulkEnabled(bulk)
39-
&& (this.section.levelsan >= 2); // ADDED.
39+
&& (this.section.component || this.section.levelsan >= 2); // ADDED.
4040
}
4141

4242
}

classes/courseformat/stateactions.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@ public function fmt_section_move_before(
8080
foreach ($ids as $id) {
8181
$originextra = $allsectionsextra[$id];
8282
$origins[] = $originextra;
83-
for (/* ... */
83+
for (
8484
$originsubextra = $originextra; /* ... */
8585
$originsubextra && ($originsubextra->id == $originextra->id
8686
|| $originsubextra->levelsan > $originextra->levelsan); /* ... */
8787
$originsubextra = $originsubextra->nextanyid ? $allsectionsextra[$originsubextra->nextanyid] : null
88-
/* ... */) {
88+
) {
8989
$subids[] = $originsubextra->id;
9090
}
9191
}
@@ -158,12 +158,12 @@ public function section_move_after(
158158
foreach ($ids as $id) {
159159
$originextra = $allsectionsextra[$id];
160160
$origins[] = $originextra;
161-
for (/* ... */
161+
for (
162162
$originsubextra = $originextra; /* ... */
163163
$originsubextra && ($originsubextra->id == $originextra->id
164164
|| $originsubextra->levelsan > $originextra->levelsan); /* ... */
165165
$originsubextra = $originsubextra->nextanyid ? $allsectionsextra[$originsubextra->nextanyid] : null
166-
/* ... */) {
166+
) {
167167
$subids[] = $originsubextra->id;
168168
}
169169
}
@@ -236,12 +236,12 @@ public function fmt_section_move_into(
236236
foreach ($ids as $id) {
237237
$originextra = $allsectionsextra[$id];
238238
$origins[] = $originextra;
239-
for (/* ... */
239+
for (
240240
$originsubextra = $originextra; /* ... */
241241
$originsubextra && ($originsubextra->id == $originextra->id
242242
|| $originsubextra->levelsan > $originextra->levelsan); /* ... */
243243
$originsubextra = $originsubextra->nextanyid ? $allsectionsextra[$originsubextra->nextanyid] : null
244-
/* ... */) {
244+
) {
245245
$subids[] = $originsubextra->id;
246246
}
247247
}
@@ -303,12 +303,12 @@ protected function set_section_visibility(
303303
continue;
304304
}
305305
if (!$visible && $sectionextra->section || $visible && $sectionextra->parentvisiblesan) {
306-
for (/* ... */
306+
for (
307307
$subsectionextra = $sectionextra; /* ... */
308308
$subsectionextra && (($subsectionextra->id == $sectionextra->id)
309309
|| ($subsectionextra->levelsan > $sectionextra->levelsan)); /* ... */
310310
$subsectionextra = $subsectionextra->nextanyid ? $allsectionsextra[$subsectionextra->nextanyid] : null
311-
/* ... */) {
311+
) {
312312
if (($subsectionextra->id == $sectionextra->id) || !$visible) {
313313
course_update_section($course, $subsectionextra->sectionbase, ['visible' => $visible]);
314314
}

0 commit comments

Comments
 (0)