Skip to content

Commit

Permalink
Merge branch 'mdjnelson:MOODLE_402_STABLE' into MOODLE_402_STABLE
Browse files Browse the repository at this point in the history
  • Loading branch information
mohamedmohamedatia authored May 5, 2024
2 parents cab71d5 + 39cc0ca commit 11196d1
Show file tree
Hide file tree
Showing 29 changed files with 32 additions and 31 deletions.
4 changes: 2 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ All notable changes to this project will be documented in this file.

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

## [4.2.5] - 2024-XX-YY
## [4.2.5] - 2024-04-23

### Fixed
### Fixed

- Fixed issue when restoring `date`, `daterange`, `gradeitemname` and `grade` that have been linked to a manual grade item (#582).
- Removed unnecessary set_context() call causing a PHP notice to be shown (#443).
Expand Down
2 changes: 1 addition & 1 deletion classes/element_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ public static function get_courseid($elementid) {
* @param int $elementid The element id
* @return \context The context
*/
public static function get_context(int $elementid) : \context {
public static function get_context(int $elementid): \context {
global $DB;

$sql = "SELECT ct.contextid
Expand Down
4 changes: 2 additions & 2 deletions classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class provider implements
* @param collection $items a reference to the collection to use to store the metadata.
* @return collection the updated collection of metadata items.
*/
public static function get_metadata(collection $items) : collection {
public static function get_metadata(collection $items): collection {
$items->add_database_table(
'customcert_issues',
[
Expand All @@ -71,7 +71,7 @@ public static function get_metadata(collection $items) : collection {
* @param int $userid the userid.
* @return contextlist the list of contexts containing user info for the user.
*/
public static function get_contexts_for_userid(int $userid) : contextlist {
public static function get_contexts_for_userid(int $userid): contextlist {
$sql = "SELECT c.id
FROM {context} c
INNER JOIN {course_modules} cm
Expand Down
2 changes: 1 addition & 1 deletion download_all_certificates.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* Handles downloading all certificates on the site.
*
* @package mod_customcert
* @copyright 2013 Mark Nelson <markn@moodle.com>
* @copyright 2024 Mark Nelson <mdjnelson@gmail.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

Expand Down
2 changes: 1 addition & 1 deletion element/bgimage/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() : string {
public static function get_reason(): string {
return 'privacy:metadata';
}
}
2 changes: 1 addition & 1 deletion element/border/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() : string {
public static function get_reason(): string {
return 'privacy:metadata';
}
}
2 changes: 1 addition & 1 deletion element/categoryname/classes/element.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function render_html() {
*
* @return string
*/
protected function get_category_name() : string {
protected function get_category_name(): string {
global $DB, $SITE;

$courseid = \mod_customcert\element_helper::get_courseid($this->get_id());
Expand Down
2 changes: 1 addition & 1 deletion element/categoryname/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() : string {
public static function get_reason(): string {
return 'privacy:metadata';
}
}
2 changes: 1 addition & 1 deletion element/code/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() : string {
public static function get_reason(): string {
return 'privacy:metadata';
}
}
2 changes: 1 addition & 1 deletion element/coursefield/classes/element.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function definition_after_data($mform) {
* @param bool $preview Is this a preview?
* @return string
*/
protected function get_course_field_value(\stdClass $course, bool $preview) : string {
protected function get_course_field_value(\stdClass $course, bool $preview): string {

// The user field to display.
$field = $this->get_data();
Expand Down
2 changes: 1 addition & 1 deletion element/coursefield/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() : string {
public static function get_reason(): string {
return 'privacy:metadata';
}
}
2 changes: 1 addition & 1 deletion element/coursename/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() : string {
public static function get_reason(): string {
return 'privacy:metadata';
}
}
2 changes: 1 addition & 1 deletion element/date/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() : string {
public static function get_reason(): string {
return 'privacy:metadata';
}
}
2 changes: 1 addition & 1 deletion element/daterange/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() : string {
public static function get_reason(): string {
return 'privacy:metadata';
}
}
2 changes: 1 addition & 1 deletion element/digitalsignature/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() : string {
public static function get_reason(): string {
return 'privacy:metadata';
}
}
2 changes: 1 addition & 1 deletion element/grade/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() : string {
public static function get_reason(): string {
return 'privacy:metadata';
}
}
2 changes: 1 addition & 1 deletion element/gradeitemname/classes/element.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public function after_restore($restore) {
*
* @return string
*/
protected function get_grade_item_name() : string {
protected function get_grade_item_name(): string {
global $DB;

$gradeitem = $this->get_data();
Expand Down
2 changes: 1 addition & 1 deletion element/gradeitemname/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() : string {
public static function get_reason(): string {
return 'privacy:metadata';
}
}
2 changes: 1 addition & 1 deletion element/image/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() : string {
public static function get_reason(): string {
return 'privacy:metadata';
}
}
2 changes: 1 addition & 1 deletion element/qrcode/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() : string {
public static function get_reason(): string {
return 'privacy:metadata';
}
}
2 changes: 1 addition & 1 deletion element/studentname/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() : string {
public static function get_reason(): string {
return 'privacy:metadata';
}
}
2 changes: 1 addition & 1 deletion element/teachername/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() : string {
public static function get_reason(): string {
return 'privacy:metadata';
}
}
2 changes: 1 addition & 1 deletion element/text/classes/element.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public function definition_after_data($mform) {
*
* @return string
*/
protected function get_text() : string {
protected function get_text(): string {
$context = \mod_customcert\element_helper::get_context($this->get_id());
return format_text($this->get_data(), FORMAT_HTML, ['context' => $context]);
}
Expand Down
2 changes: 1 addition & 1 deletion element/text/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() : string {
public static function get_reason(): string {
return 'privacy:metadata';
}
}
2 changes: 1 addition & 1 deletion element/userfield/classes/element.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public function definition_after_data($mform) {
* @param bool $preview Is this a preview?
* @return string
*/
protected function get_user_field_value(\stdClass $user, bool $preview) : string {
protected function get_user_field_value(\stdClass $user, bool $preview): string {
global $CFG, $DB;

// The user field to display.
Expand Down
2 changes: 1 addition & 1 deletion element/userfield/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() : string {
public static function get_reason(): string {
return 'privacy:metadata';
}
}
2 changes: 1 addition & 1 deletion element/userpicture/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() : string {
public static function get_reason(): string {
return 'privacy:metadata';
}
}
1 change: 1 addition & 0 deletions lang/en/customcert.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@
$string['showposxy_desc'] = 'This will show the X and Y position when editing of an element, allowing the user to accurately specify the location.
This isn\'t required if you plan on solely using the drag and drop interface for this purpose.';
$string['subplugintype_customcertelement'] = 'Element';
$string['subplugintype_customcertelement_plural'] = 'Elements';
$string['taskemailcertificate'] = 'Handles emailing certificates.';
$string['templatename'] = 'Template name';
Expand Down
4 changes: 2 additions & 2 deletions version.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*
* @package mod_customcert
* @copyright 2013 Mark Nelson <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or late
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/

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

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

0 comments on commit 11196d1

Please sign in to comment.