MDL-29401 introduce new frankenstyle PARAM types
New PARAM_COMPONENT, PARAM_AREA and PARAM_PLUGIN + fixing of hopefully all current incorrect parameter types. This should help with diagnosing of incorrectly named 3rd party plugins too.
This commit is contained in:
+2
-2
@@ -248,7 +248,7 @@ if ($mform->is_cancelled()) {
|
||||
}
|
||||
|
||||
$fromform->course = $course->id;
|
||||
$fromform->modulename = clean_param($fromform->modulename, PARAM_SAFEDIR); // For safety
|
||||
$fromform->modulename = clean_param($fromform->modulename, PARAM_PLUGIN); // For safety
|
||||
|
||||
$addinstancefunction = $fromform->modulename."_add_instance";
|
||||
$updateinstancefunction = $fromform->modulename."_update_instance";
|
||||
@@ -342,7 +342,7 @@ if ($mform->is_cancelled()) {
|
||||
set_coursemodule_idnumber($fromform->coursemodule, $fromform->cmidnumber);
|
||||
}
|
||||
|
||||
// Now that module is fully updated, also update completion data if
|
||||
// Now that module is fully updated, also update completion data if
|
||||
// required (this will wipe all user completion data and recalculate it)
|
||||
if ($completion->is_enabled() && !empty($fromform->completionunlocked)) {
|
||||
$completion->reset_all_state($cm);
|
||||
|
||||
Reference in New Issue
Block a user