Skip to content

Commit 11196d1

Browse files
Merge branch 'mdjnelson:MOODLE_402_STABLE' into MOODLE_402_STABLE
2 parents cab71d5 + 39cc0ca commit 11196d1

File tree

29 files changed

+32
-31
lines changed

29 files changed

+32
-31
lines changed

CHANGES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ All notable changes to this project will be documented in this file.
44

55
Note - All hash comments refer to the issue number. Eg. #169 refers to https://github.com/mdjnelson/moodle-mod_customcert/issues/169.
66

7-
## [4.2.5] - 2024-XX-YY
7+
## [4.2.5] - 2024-04-23
88

9-
### Fixed
9+
### Fixed
1010

1111
- Fixed issue when restoring `date`, `daterange`, `gradeitemname` and `grade` that have been linked to a manual grade item (#582).
1212
- Removed unnecessary set_context() call causing a PHP notice to be shown (#443).

classes/element_helper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ public static function get_courseid($elementid) {
477477
* @param int $elementid The element id
478478
* @return \context The context
479479
*/
480-
public static function get_context(int $elementid) : \context {
480+
public static function get_context(int $elementid): \context {
481481
global $DB;
482482

483483
$sql = "SELECT ct.contextid

classes/privacy/provider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class provider implements
4949
* @param collection $items a reference to the collection to use to store the metadata.
5050
* @return collection the updated collection of metadata items.
5151
*/
52-
public static function get_metadata(collection $items) : collection {
52+
public static function get_metadata(collection $items): collection {
5353
$items->add_database_table(
5454
'customcert_issues',
5555
[
@@ -71,7 +71,7 @@ public static function get_metadata(collection $items) : collection {
7171
* @param int $userid the userid.
7272
* @return contextlist the list of contexts containing user info for the user.
7373
*/
74-
public static function get_contexts_for_userid(int $userid) : contextlist {
74+
public static function get_contexts_for_userid(int $userid): contextlist {
7575
$sql = "SELECT c.id
7676
FROM {context} c
7777
INNER JOIN {course_modules} cm

download_all_certificates.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* Handles downloading all certificates on the site.
1919
*
2020
* @package mod_customcert
21-
* @copyright 2013 Mark Nelson <markn@moodle.com>
21+
* @copyright 2024 Mark Nelson <mdjnelson@gmail.com>
2222
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2323
*/
2424

element/bgimage/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/border/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/categoryname/classes/element.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function render_html() {
6161
*
6262
* @return string
6363
*/
64-
protected function get_category_name() : string {
64+
protected function get_category_name(): string {
6565
global $DB, $SITE;
6666

6767
$courseid = \mod_customcert\element_helper::get_courseid($this->get_id());

element/categoryname/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/code/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/coursefield/classes/element.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public function definition_after_data($mform) {
125125
* @param bool $preview Is this a preview?
126126
* @return string
127127
*/
128-
protected function get_course_field_value(\stdClass $course, bool $preview) : string {
128+
protected function get_course_field_value(\stdClass $course, bool $preview): string {
129129

130130
// The user field to display.
131131
$field = $this->get_data();

element/coursefield/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3939
*
4040
* @return string
4141
*/
42-
public static function get_reason() : string {
42+
public static function get_reason(): string {
4343
return 'privacy:metadata';
4444
}
4545
}

element/coursename/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/date/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/daterange/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/digitalsignature/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/grade/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/gradeitemname/classes/element.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public function after_restore($restore) {
144144
*
145145
* @return string
146146
*/
147-
protected function get_grade_item_name() : string {
147+
protected function get_grade_item_name(): string {
148148
global $DB;
149149

150150
$gradeitem = $this->get_data();

element/gradeitemname/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/image/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/qrcode/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/studentname/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/teachername/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/text/classes/element.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function definition_after_data($mform) {
9898
*
9999
* @return string
100100
*/
101-
protected function get_text() : string {
101+
protected function get_text(): string {
102102
$context = \mod_customcert\element_helper::get_context($this->get_id());
103103
return format_text($this->get_data(), FORMAT_HTML, ['context' => $context]);
104104
}

element/text/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/userfield/classes/element.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public function definition_after_data($mform) {
129129
* @param bool $preview Is this a preview?
130130
* @return string
131131
*/
132-
protected function get_user_field_value(\stdClass $user, bool $preview) : string {
132+
protected function get_user_field_value(\stdClass $user, bool $preview): string {
133133
global $CFG, $DB;
134134

135135
// The user field to display.

element/userfield/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

element/userpicture/classes/privacy/provider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
3838
*
3939
* @return string
4040
*/
41-
public static function get_reason() : string {
41+
public static function get_reason(): string {
4242
return 'privacy:metadata';
4343
}
4444
}

lang/en/customcert.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@
198198
$string['showposxy_desc'] = 'This will show the X and Y position when editing of an element, allowing the user to accurately specify the location.
199199
200200
This isn\'t required if you plan on solely using the drag and drop interface for this purpose.';
201+
$string['subplugintype_customcertelement'] = 'Element';
201202
$string['subplugintype_customcertelement_plural'] = 'Elements';
202203
$string['taskemailcertificate'] = 'Handles emailing certificates.';
203204
$string['templatename'] = 'Template name';

version.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*
2020
* @package mod_customcert
2121
* @copyright 2013 Mark Nelson <[email protected]>
22-
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or late
22+
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
2323
*/
2424

2525
defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');
@@ -30,4 +30,4 @@
3030
$plugin->component = 'mod_customcert';
3131

3232
$plugin->maturity = MATURITY_STABLE;
33-
$plugin->release = "4.2.4"; // User-friendly version number.
33+
$plugin->release = "4.2.5"; // User-friendly version number.

0 commit comments

Comments
 (0)