Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
09d7812
Updated travis
mdjnelson Nov 13, 2017
60398c4
Bumped version for 3.4
mdjnelson Nov 13, 2017
52d1613
Coding style fixes
mdjnelson Dec 4, 2017
b14ccbb
#166 Fixed encoding content links
mdjnelson Feb 22, 2018
666ed6b
#169 Ensure we backup the 'verifyany' setting
mdjnelson Feb 22, 2018
7893185
#173 Fix race condition on certificate issues in scheduled task
euven Mar 27, 2018
787e370
Bumped to PHP 7.2 in travis.yml
mdjnelson May 15, 2018
1e977bb
#189 Implemented privacy provider for GDPR compliance
mdjnelson May 15, 2018
4958b07
Updated CHANGES.md
mdjnelson May 17, 2018
b43d7d3
Bump version
mdjnelson May 17, 2018
f773269
#148 Increase size limit on fonts
mdjnelson May 17, 2018
f28c232
Changed icon for downloading certificate from reports
mdjnelson May 21, 2018
adb17cf
Added helper function to issue certificates
mdjnelson May 23, 2018
45494e3
Fixed PHPDoc
mdjnelson May 24, 2018
b93a12a
#192 Fixed report fields for download
bobopinna May 24, 2018
c80fee3
Fixed typo in PHPDoc
mdjnelson Jun 6, 2018
9bf0fc4
#170 Elements now respect filters
mdjnelson Jun 6, 2018
2fa7191
#70 Added mobile app support
mdjnelson May 23, 2018
2406885
Updated CHANGES.md
mdjnelson Jun 6, 2018
a42bc9e
#196 Use FORMAT_HTML when calling format_text()
mdjnelson Jun 7, 2018
0e5ef79
Add example JSON context to templates
mdjnelson Jun 7, 2018
9bfaa5d
Updated CHANGES.md
mdjnelson Jun 7, 2018
ff31b4b
Bumped version
mdjnelson Jun 7, 2018
743d1fb
#196 Use FORMAT_HTML when calling format_text() (again)
mdjnelson Jun 7, 2018
7038b60
#202 Make web service accessible by 'local_mobile'
mdjnelson Jun 13, 2018
fab998e
#197 Respect filters in 'My certificates' and 'Verify certificate' pages
mdjnelson Jun 12, 2018
9c633f1
#203 Removed confusing 'summaryofissue' string
mdjnelson Jun 18, 2018
aeee01b
#203 Removed 'issued' string and replaced with 'receiveddate'
mdjnelson Jun 18, 2018
3f4e2be
#203 Make mobile layout friendly on small screens
mdjnelson Jun 19, 2018
9f4492e
Fixed reference to 'mod/certificate' capability
mdjnelson Jun 19, 2018
5b56aca
#203 Don't show 'Awarded on' date to managers
mdjnelson Jun 19, 2018
75a9357
#203 Don't display group select on activity view page
mdjnelson Jun 19, 2018
18ce8da
#203 Added new string for list of awarded certificates
mdjnelson Jun 19, 2018
3680c45
#203 Added heading to activity view page in browser
mdjnelson Jun 20, 2018
930850a
#203 Changed 'listofissues' string to avoid confusion
mdjnelson Jun 20, 2018
2e14637
#203 Make report heading/title consistent with core activities
mdjnelson Jun 25, 2018
e5939c8
#203 Improved 'listofissues' string
mdjnelson Jun 26, 2018
9d27015
#203 Removed 'code' column
mdjnelson Jun 26, 2018
c1a70c7
#203 Consistency among headings/titles on all pages
mdjnelson Jun 26, 2018
6fafe6a
Updated CHANGES.md
mdjnelson Jun 26, 2018
bb627df
#203 Added missing consistency changes for headings/titles
mdjnelson Jun 26, 2018
7f12ab8
Bumped version
mdjnelson Jun 26, 2018
752c7d1
Removed unnecessary new lines
mdjnelson Jun 26, 2018
9589bad
Fixed reference to tool_mobile in CHANGES.md
mdjnelson Jun 27, 2018
2736ece
#207 Follow-up UX improvements
mdjnelson Jul 1, 2018
f63d61d
#207 Changed font-size for awarded time in the report in mobile view
mdjnelson Jul 9, 2018
520d6a2
#207 No need to use a table/list when displaying only one issue
mdjnelson Jul 9, 2018
b928fd3
#207 Changed download button between managers and non-managers on mobile
mdjnelson Jul 10, 2018
7b35bce
#211 Use custom fonts if present
mdjnelson Jul 12, 2018
7e94143
#187 Fix broken SQL on Oracle
mdjnelson Jul 12, 2018
83f337f
#154 Don't display 'Add page' link for unsaved templates
mdjnelson Jul 12, 2018
3f082b7
#210 Improve code for adding date strings to select
mdjnelson Jul 12, 2018
5f80f24
#210 Allow short dates with leading zeros
mdjnelson Jul 13, 2018
ed24576
#176 Only get users details who are enrolled within the course
tristanmurdoch Apr 10, 2018
0d68d48
#171 Only get teachers who are enrolled within the course
mdjnelson Jul 13, 2018
0f5aaff
Updated CHANGES.md
mdjnelson Jul 13, 2018
928e70d
Bumped version
mdjnelson Jul 13, 2018
2731008
#213 Allow element plugins to have admin settings
dmitriim Jul 17, 2018
7118f79
Added LICENSE.md
mdjnelson Aug 4, 2018
65dbda6
#179 Add possibility to selectively disable activity instance settings
dmitriim Jul 19, 2018
67aa5a7
#180 Add possibility to set default values of activity instance
dmitriim Jul 23, 2018
5b369e8
#179 Don't display form elements if a user doesn't have capabilities
dmitriim Jul 30, 2018
04b0fde
Add tests to support new permissions and default activity options
dmitriim Jul 25, 2018
64e91c2
#223 Removed incorrect course reset logic
mdjnelson Aug 6, 2018
ce4da8c
Update travis (#250)
marinaglancy Oct 30, 2018
2cdbc60
Changed reference to moodlerooms (#250)
mdjnelson Dec 17, 2018
e9ed3b2
#225 Allow element plugins to control if they can be added
abias Aug 8, 2018
1793465
#225 Renamed static function
mdjnelson Aug 23, 2018
c8ab936
#252 Privacy API update
sarjona Dec 13, 2018
1e30f4d
Matched up prevent x description strings (#254)
james-cnz Nov 20, 2018
93b00b2
Added plaintext lang variants for email bodies and updated template (…
parkeyparker Aug 24, 2018
30f80d7
Change field 'element' to character rather than text (#241)
mdjnelson Dec 17, 2018
149e3cf
Reduce code nesting level in task (#237)
mwithheld Oct 5, 2018
0771ec8
Removed boolean return and added a comment (#237)
mdjnelson Dec 17, 2018
3bed3b8
Move creating the temp directory out of the emailing for loop (#238)
mwithheld Dec 17, 2018
d06da09
Hide completion date option if not applicable (#160)
mdjnelson Dec 17, 2018
d9576aa
Fixed logic so site templates work as expected (#160)
mdjnelson Dec 17, 2018
1d27bec
Report now respects the setting 'Show user identity' (#224)
mdjnelson Dec 18, 2018
83f3fce
Allow verification of deleted users (#159)
mdjnelson Dec 18, 2018
74a8a2f
Make use of the decimal value setting
mdjnelson Dec 19, 2018
6f7ad60
Fixed issue when scales are used (#242)
mdjnelson Dec 19, 2018
cddc2c4
Add ability to set transparency on images (#186)
mdjnelson Dec 20, 2018
af3121f
Updated CHANGES.md
mdjnelson Dec 20, 2018
9f9ce2a
Bumped version
mdjnelson Dec 24, 2018
922389b
Added missing implementation for privacy provider (#260)
mdjnelson Dec 26, 2018
c85d7e0
Added missing details to CHANGES.md
mdjnelson Dec 26, 2018
61e18a6
Prevent exception when adding 'teachername' element to site template …
mdjnelson Dec 27, 2018
ff0652e
Use course module context when calling format_string/text (#200)
mdjnelson Dec 27, 2018
bb5bce9
Make it clear what element values are just an example (#144)
mdjnelson Dec 31, 2018
f28b698
Updated CHANGES.md
mdjnelson Dec 31, 2018
d451ed8
Bumped version
mdjnelson Dec 31, 2018
cc0d7c3
Add vertical spacing after certificate download button
Nov 6, 2018
62615cd
Update test classes for T19 compatibility
Apr 3, 2025
ad03446
Merge branch 'MOODLE_34_STABLE' of github.com:aneno-m-e/moodle-mod_cu…
Apr 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ cache:
- $HOME/.npm

php:
- 5.6
- 7.1
- 7.0
- 7.2

addons:
firefox: 47.0.1
Expand All @@ -22,7 +22,7 @@ addons:

env:
global:
- MOODLE_BRANCH=MOODLE_33_STABLE
- MOODLE_BRANCH=MOODLE_34_STABLE
- IGNORE_NAMES=mobile_*.mustache # Mobile mustache has specific syntax, ignore their templates
matrix:
- DB=pgsql
Expand Down
14 changes: 8 additions & 6 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

All notable changes to this project will be documented in this file.
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/markn86/moodle-mod_customcert/issues/169.

Expand All @@ -18,12 +18,14 @@ Note - All hash comments refer to the issue number. Eg. #169 refers to https://g

### Fixed

- Missing implementation for privacy provider (#260).
- Use course module context when calling format_string/text (#200).
- Exception being thrown when adding the 'teachername' element to site template (#261).

## [3.3.15] - 2018-12-20
## [3.4.6] - 2018-12-20
### Added

- GDPR: Add support for removal of users from a context (see MDL-62560) (#252).
- Images can be made transparent (#186).
- Set default values of activity instance settings (#180).
- Allow element plugins to control if they can be added to a certificate (#225).
Expand Down Expand Up @@ -85,15 +87,15 @@ Note - All hash comments refer to the issue number. Eg. #169 refers to https://g
their certificate. It also allows teachers to view the
list of issued certificates, with the ability to revoke
any.
This is for the soon-to-be released Moodle Mobile v3.5.0

This is for the soon-to-be released Moodle Mobile v3.5.0
(not to be confused with your Moodle site version) and
will not work on Mobile versions earlier than this.

If you are running a Moodle site on version 3.4 or below
you will need to install the local_mobile plugin in order
for this to work.

If you are running a Moodle site on version 3.0 or below
then you will need to upgrade.
```
Expand Down
2 changes: 1 addition & 1 deletion classes/element_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ public static function get_courseid($elementid) {
* @param int $elementid The element id
* @return \context The context
*/
public static function get_context($elementid) {
public static function get_context(int $elementid) : \context {
global $DB;

$sql = "SELECT ct.contextid
Expand Down
2 changes: 1 addition & 1 deletion classes/output/mobile.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ private static function update_active_group($groupmode, $groupid, $allowedgroups
* @param \context $context
* @param string $cap
*/
protected static function require_capability(\stdClass $cm, \context $context, $cap) {
protected static function require_capability(\stdClass $cm, \context $context, string $cap) {
require_login($cm->course, false, $cm, true, true);
require_capability($cap, $context);
}
Expand Down
67 changes: 64 additions & 3 deletions classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@

use core_privacy\local\metadata\collection;
use core_privacy\local\request\approved_contextlist;
use core_privacy\local\request\approved_userlist;
use core_privacy\local\request\contextlist;
use core_privacy\local\request\helper;
use core_privacy\local\request\transform;
use core_privacy\local\request\userlist;
use core_privacy\local\request\writer;

defined('MOODLE_INTERNAL') || die();
Expand All @@ -40,15 +42,16 @@
*/
class provider implements
\core_privacy\local\metadata\provider,
\core_privacy\local\request\plugin\provider {
\core_privacy\local\request\plugin\provider,
\core_privacy\local\request\core_userlist_provider {

/**
* Return the fields which contain personal data.
*
* @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) {
public static function get_metadata(collection $items) : collection {
$items->add_database_table(
'customcert_issues',
[
Expand All @@ -70,7 +73,7 @@ public static function get_metadata(collection $items) {
* @param int $userid the userid.
* @return contextlist the list of contexts containing user info for the user.
*/
public static function get_contexts_for_userid($userid) {
public static function get_contexts_for_userid(int $userid) : contextlist {
$sql = "SELECT c.id
FROM {context} c
INNER JOIN {course_modules} cm
Expand All @@ -96,6 +99,37 @@ public static function get_contexts_for_userid($userid) {
return $contextlist;
}

/**
* Get the list of users who have data within a context.
*
* @param userlist $userlist The userlist containing the list of users who have data in this context/plugin combination.
*/
public static function get_users_in_context(userlist $userlist) {
$context = $userlist->get_context();

if (!$context instanceof \context_module) {
return;
}

// Fetch all users who have a custom certificate.
$sql = "SELECT customcertissues.userid
FROM {course_modules} cm
JOIN {modules} m
ON m.id = cm.module AND m.name = :modname
JOIN {customcert} customcert
ON customcert.id = cm.instance
JOIN {customcert_issues} customcertissues
ON customcertissues.customcertid = customcert.id
WHERE cm.id = :cmid";

$params = [
'cmid' => $context->instanceid,
'modname' => 'customcert',
];

$userlist->add_from_sql('userid', $sql, $params);
}

/**
* Export personal data for the given approved_contextlist. User and context information is contained within the contextlist.
*
Expand Down Expand Up @@ -182,6 +216,33 @@ public static function delete_data_for_user(approved_contextlist $contextlist) {
}
}

/**
* Delete multiple users within a single context.
*
* @param approved_userlist $userlist The approved context and user information to delete information for.
*/
public static function delete_data_for_users(approved_userlist $userlist) {
global $DB;

$context = $userlist->get_context();
if (!$context instanceof \context_module) {
return;
}

$cm = get_coursemodule_from_id('customcert', $context->instanceid);
if (!$cm) {
// Only customcert module will be handled.
return;
}

$userids = $userlist->get_userids();
list($usersql, $userparams) = $DB->get_in_or_equal($userids, SQL_PARAMS_NAMED);

$select = "customcertid = :customcertid AND userid $usersql";
$params = ['customcertid' => $cm->instance] + $userparams;
$DB->delete_records_select('customcert_issues', $select, $params);
}

/**
* Return a list of Customcert IDs mapped to their course module ID.
*
Expand Down
22 changes: 1 addition & 21 deletions db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,27 +143,7 @@ function xmldb_customcert_upgrade($oldversion) {
$dbman->change_field_type($table, $field);

// Savepoint reached.
upgrade_mod_savepoint(true, 2017050515, 'customcert');
}

if ($oldversion < 2017050518.01) {
$table = new xmldb_table('customcert');
$index = new xmldb_index('templateid', XMLDB_INDEX_UNIQUE, ['templateid']);
if ($dbman->index_exists($table, $index)) {
$dbman->drop_index($table, $index);
}
$key = new xmldb_key('templateid', XMLDB_KEY_FOREIGN, array('templateid'), 'customcert_templates', array('id'));
$dbman->add_key($table, $key);

$table = new xmldb_table('customcert_pages');
$index = new xmldb_index('templateid', XMLDB_INDEX_UNIQUE, ['templateid']);
if ($dbman->index_exists($table, $index)) {
$dbman->drop_index($table, $index);
}
$key = new xmldb_key('templateid', XMLDB_KEY_FOREIGN, array('templateid'), 'customcert_templates', array('id'));
$dbman->add_key($table, $key);

upgrade_mod_savepoint(true, 2017050518.01, 'customcert');
upgrade_mod_savepoint(true, 2017111306, 'customcert');
}

return true;
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 @@ -40,7 +40,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() {
public static function get_reason() : string {
return 'privacy:metadata';
}
}
4 changes: 2 additions & 2 deletions element/bgimage/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@

defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');

$plugin->version = 2017050500; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version (3.3).
$plugin->version = 2017111300; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2017111300; // Requires this Moodle version (3.4).
$plugin->component = 'customcertelement_bgimage';
2 changes: 1 addition & 1 deletion element/border/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() {
public static function get_reason() : string {
return 'privacy:metadata';
}
}
4 changes: 2 additions & 2 deletions element/border/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@

defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');

$plugin->version = 2017050500; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version (3.3).
$plugin->version = 2017111300; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2017111300; // Requires this Moodle version (3.4).
$plugin->component = 'customcertelement_border';
2 changes: 1 addition & 1 deletion element/categoryname/classes/element.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function render_html() {
*
* @return string
*/
protected function get_category_name() {
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 @@ -40,7 +40,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() {
public static function get_reason() : string {
return 'privacy:metadata';
}
}
4 changes: 2 additions & 2 deletions element/categoryname/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@

defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');

$plugin->version = 2017050500; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version (3.3).
$plugin->version = 2017111300; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2017111300; // Requires this Moodle version (3.4).
$plugin->component = 'customcertelement_categoryname';
2 changes: 1 addition & 1 deletion element/code/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() {
public static function get_reason() : string {
return 'privacy:metadata';
}
}
4 changes: 2 additions & 2 deletions element/code/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@

defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');

$plugin->version = 2017050500; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version (3.3).
$plugin->version = 2017111300; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2017111300; // Requires this Moodle version (3.4).
$plugin->component = 'customcertelement_code';
2 changes: 1 addition & 1 deletion element/coursename/classes/element.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function render_html() {
*
* @return string
*/
protected function get_course_name() {
protected function get_course_name() : string {
$courseid = \mod_customcert\element_helper::get_courseid($this->get_id());
$course = get_course($courseid);
$context = \mod_customcert\element_helper::get_context($this->get_id());
Expand Down
2 changes: 1 addition & 1 deletion element/coursename/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() {
public static function get_reason() : string {
return 'privacy:metadata';
}
}
4 changes: 2 additions & 2 deletions element/coursename/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@

defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');

$plugin->version = 2017050500; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version (3.3).
$plugin->version = 2017111300; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2017111300; // Requires this Moodle version (3.4).
$plugin->component = 'customcertelement_coursename';
2 changes: 1 addition & 1 deletion element/date/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() {
public static function get_reason() : string {
return 'privacy:metadata';
}
}
4 changes: 2 additions & 2 deletions element/date/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@

defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');

$plugin->version = 2017050500; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version (3.3).
$plugin->version = 2017111300; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2017111300; // Requires this Moodle version (3.4).
$plugin->component = 'customcertelement_date';
2 changes: 1 addition & 1 deletion element/digitalsignature/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() {
public static function get_reason() : string {
return 'privacy:metadata';
}
}
4 changes: 2 additions & 2 deletions element/digitalsignature/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@

defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');

$plugin->version = 2017050500; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version (3.3).
$plugin->version = 2017111300; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2017111300; // Requires this Moodle version (3.4).
$plugin->component = 'customcertelement_digitalsignature';
2 changes: 1 addition & 1 deletion element/grade/classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class provider implements \core_privacy\local\metadata\null_provider {
*
* @return string
*/
public static function get_reason() {
public static function get_reason() : string {
return 'privacy:metadata';
}
}
4 changes: 2 additions & 2 deletions element/grade/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@

defined('MOODLE_INTERNAL') || die('Direct access to this script is forbidden.');

$plugin->version = 2017050500; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2017050500; // Requires this Moodle version (3.3).
$plugin->version = 2017111300; // The current module version (Date: YYYYMMDDXX).
$plugin->requires = 2017111300; // Requires this Moodle version (3.4).
$plugin->component = 'customcertelement_grade';
2 changes: 1 addition & 1 deletion element/gradeitemname/classes/element.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public function definition_after_data($mform) {
*
* @return string
*/
protected function get_grade_item_name() {
protected function get_grade_item_name() : string {
global $DB;

// Get the course module information.
Expand Down
Loading