Skip to content

Commit 752c5fb

Browse files
committed
Fix issues raised by Copilot
1 parent 8bdfcd1 commit 752c5fb

File tree

34 files changed

+184
-184
lines changed

34 files changed

+184
-184
lines changed

docs/apis/plugintypes/format/_examples/renderer.php

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,37 @@
55
use moodle_page;
66

77
/**
8-
* Basic renderer for pluginname format.
9-
*
10-
* @copyright 2022 Someone <[email protected]>
11-
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
12-
*/
13-
class renderer extends section_renderer {
8+
* Basic renderer for pluginname format.
9+
*
10+
* @copyright 2022 Someone <[email protected]>
11+
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
12+
*/
13+
class renderer extends section_renderer {
1414
// Override any necessary renderer method here.
1515

1616
/**
17-
* Generate the section title, wraps it in a link to the section page if page is to be displayed on a separate page.
18-
*
19-
* This method is required to enable the inplace section title editor.
20-
*
21-
* @param section_info|stdClass $section The course_section entry from DB
22-
* @param stdClass $course The course entry from DB
23-
* @return string HTML to output.
24-
*/
17+
* Generate the section title, wraps it in a link to the section page if page is to be displayed on a separate page.
18+
*
19+
* This method is required to enable the inplace section title editor.
20+
*
21+
* @param section_info|stdClass $section The course_section entry from DB
22+
* @param stdClass $course The course entry from DB
23+
* @return string HTML to output.
24+
*/
2525
public function section_title($section, $course) {
26-
return $this->render(format_base::instance($course)->inplace_editable_render_section_name($section));
26+
return $this->render(format_base::instance($course)->inplace_editable_render_section_name($section));
2727
}
2828

2929
/**
30-
* Generate the section title to be displayed on the section page, without a link.
31-
*
32-
* This method is required to enable the inplace section title editor.
33-
*
34-
* @param section_info|stdClass $section The course_section entry from DB
35-
* @param int|stdClass $course The course entry from DB
36-
* @return string HTML to output.
37-
*/
30+
* Generate the section title to be displayed on the section page, without a link.
31+
*
32+
* This method is required to enable the inplace section title editor.
33+
*
34+
* @param section_info|stdClass $section The course_section entry from DB
35+
* @param int|stdClass $course The course entry from DB
36+
* @return string HTML to output.
37+
*/
3838
public function section_title_without_link($section, $course) {
39-
return $this->render(format_base::instance($course)->inplace_editable_render_section_name($section, false));
40-
}
39+
return $this->render(format_base::instance($course)->inplace_editable_render_section_name($section, false));
4140
}
41+
}

docs/apis/plugintypes/format/migration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ tags:
1212

1313
import { getExample } from '@site/src/moodleBridge';
1414

15-
The new course editor introduced n Moodle 4.0 reimplements most of the previous webservices, AMD modules, and internal logic of the course rendering. However, all formats since 3.11 will use the previous libraries by default until its final deprecation in Moodle 4.3. This document collects the main adaptations any 3.11 course format will require to continue working when this happens.
15+
The new course editor introduced in Moodle 4.0 reimplements most of the previous webservices, AMD modules, and internal logic of the course rendering. However, all formats since 3.11 will use the previous libraries by default until its final deprecation in Moodle 4.3. This document collects the main adaptations any 3.11 course format will require to continue working when this happens.
1616

1717
## Changes summary
1818

docs/apis/plugintypes/mod_forum/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ tags:
77
documentationDraft: true
88
---
99

10-
The `mod_fporum` activity can be extended using the `forumreport` sub-plugin type. This hasn't been documented yet - perhaps you are able to help us.
10+
The `mod_forum` activity can be extended using the `forumreport` sub-plugin type. This hasn't been documented yet - perhaps you are able to help us.

docs/apis/plugintypes/qtype/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ Question types have to do many things:
2525
12. `renderer.php` - to display the key bits of this question types for the `core_question_renderer` to combine into the overall question display.
2626
13. Implements Backup and restore, and all the other standard parts of a Moodle plugin like DB tables.
2727
- [Restore code](restore.md) requires some special considerations to avoid question duplication.
28-
14. Track [users preferences for the settings used for newly created questions](./qtype/newquestiondefaults).
28+
14. Track [user preferences for the settings used for newly created questions](./qtype/newquestiondefaults).

docs/apis/plugintypes/repository/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,13 +405,13 @@ The File Picker uses Ajax calls to present the repository content. In order to i
405405
- To retrieve the file that the user selected from a remote server, the plugin must rewrite the `get_file()` method.
406406
- To provide search feature the plugin must rewrite the `search()` method.
407407

408-
All those methods are descrived below.
408+
All those methods are described below.
409409

410410
### Functions you MUST override
411411

412412
These functions cover the basics of initialising your plugin each time the repository is accessed and listing the files available to the user from within the plugin.
413413

414-
#### __construct($respoitoryid, $context=SYSCONTEXTID, $options=array(), $readonly=0)
414+
#### __construct($repositoryid, $context=SYSCONTEXTID, $options=array(), $readonly=0)
415415

416416
Should be overridden to do any initialisation required by the repository, including:
417417

docs/apis/plugintypes/theme/images.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ A placeholder is used within the CSS to allow use of a pix icon. During the CSS
7272

7373
:::note
7474

75-
Notice that the image file extension included. The reason for this leads us into the next topic, how to override images.
75+
Notice that the image file extension is not included. The reason for this leads us into the next topic, how to override images.
7676

7777
:::
7878

versioned_docs/version-4.1/apis/plugintypes/format/_examples/renderer.php

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,37 @@
55
use moodle_page;
66

77
/**
8-
* Basic renderer for pluginname format.
9-
*
10-
* @copyright 2022 Someone <[email protected]>
11-
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
12-
*/
13-
class renderer extends section_renderer {
8+
* Basic renderer for pluginname format.
9+
*
10+
* @copyright 2022 Someone <[email protected]>
11+
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
12+
*/
13+
class renderer extends section_renderer {
1414
// Override any necessary renderer method here.
1515

1616
/**
17-
* Generate the section title, wraps it in a link to the section page if page is to be displayed on a separate page.
18-
*
19-
* This method is required to enable the inplace section title editor.
20-
*
21-
* @param section_info|stdClass $section The course_section entry from DB
22-
* @param stdClass $course The course entry from DB
23-
* @return string HTML to output.
24-
*/
17+
* Generate the section title, wraps it in a link to the section page if page is to be displayed on a separate page.
18+
*
19+
* This method is required to enable the inplace section title editor.
20+
*
21+
* @param section_info|stdClass $section The course_section entry from DB
22+
* @param stdClass $course The course entry from DB
23+
* @return string HTML to output.
24+
*/
2525
public function section_title($section, $course) {
26-
return $this->render(format_base::instance($course)->inplace_editable_render_section_name($section));
26+
return $this->render(format_base::instance($course)->inplace_editable_render_section_name($section));
2727
}
2828

2929
/**
30-
* Generate the section title to be displayed on the section page, without a link.
31-
*
32-
* This method is required to enable the inplace section title editor.
33-
*
34-
* @param section_info|stdClass $section The course_section entry from DB
35-
* @param int|stdClass $course The course entry from DB
36-
* @return string HTML to output.
37-
*/
30+
* Generate the section title to be displayed on the section page, without a link.
31+
*
32+
* This method is required to enable the inplace section title editor.
33+
*
34+
* @param section_info|stdClass $section The course_section entry from DB
35+
* @param int|stdClass $course The course entry from DB
36+
* @return string HTML to output.
37+
*/
3838
public function section_title_without_link($section, $course) {
39-
return $this->render(format_base::instance($course)->inplace_editable_render_section_name($section, false));
40-
}
39+
return $this->render(format_base::instance($course)->inplace_editable_render_section_name($section, false));
4140
}
41+
}

versioned_docs/version-4.1/apis/plugintypes/format/migration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ tags:
1212

1313
import { getExample } from '@site/src/moodleBridge';
1414

15-
The new course editor introduced n Moodle 4.0 reimplements most of the previous webservices, AMD modules, and internal logic of the course rendering. However, all formats since 3.11 will use the previous libraries by default until its final deprecation in Moodle 4.3. This document collects the main adaptations any 3.11 course format will require to continue working when this happens.
15+
The new course editor introduced in Moodle 4.0 reimplements most of the previous webservices, AMD modules, and internal logic of the course rendering. However, all formats since 3.11 will use the previous libraries by default until its final deprecation in Moodle 4.3. This document collects the main adaptations any 3.11 course format will require to continue working when this happens.
1616

1717
## Changes summary
1818

versioned_docs/version-4.1/apis/plugintypes/mod_forum/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ tags:
77
documentationDraft: true
88
---
99

10-
The `mod_fporum` activity can be extended using the `forumreport` sub-plugin type. This hasn't been documented yet - perhaps you are able to help us.
10+
The `mod_forum` activity can be extended using the `forumreport` sub-plugin type. This hasn't been documented yet - perhaps you are able to help us.

versioned_docs/version-4.1/apis/plugintypes/repository/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,13 +403,13 @@ The File Picker uses Ajax calls to present the repository content. In order to i
403403
- To retrieve the file that the user selected from a remote server, the plugin must rewrite the `get_file()` method.
404404
- To provide search feature the plugin must rewrite the `search()` method.
405405

406-
All those methods are descrived below.
406+
All those methods are described below.
407407

408408
### Functions you MUST override
409409

410410
These functions cover the basics of initialising your plugin each time the repository is accessed and listing the files available to the user from within the plugin.
411411

412-
#### __construct($respoitoryid, $context=SYSCONTEXTID, $options=array(), $readonly=0)
412+
#### __construct($repositoryid, $context=SYSCONTEXTID, $options=array(), $readonly=0)
413413

414414
Should be overridden to do any initialisation required by the repository, including:
415415

0 commit comments

Comments
 (0)