Merge branch 'MDL-71410-311' of git://github.com/rezaies/moodle into MOODLE_311_STABLE

This commit is contained in:
Jun Pataleta
2021-04-27 12:36:29 +08:00
32 changed files with 1542 additions and 30 deletions
+3 -1
View File
@@ -1121,7 +1121,9 @@ class completion_info {
// Custom activity module completion data.
// Cast custom data to array before checking for custom completion rules.
$customdata = (array)$cm->customdata;
// We call ->get_custom_data() instead of ->customdata here because there is the chance of recursive calling,
// and we cannot call a getter from a getter in PHP.
$customdata = (array) $cm->get_custom_data();
// Return early if the plugin does not define custom completion rules.
if (empty($customdata['customcompletionrules'])) {
return $data;