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:
Petr Skoda
2011-09-25 09:59:55 +02:00
parent dab8148fde
commit aff24313be
50 changed files with 264 additions and 142 deletions
+2 -2
View File
@@ -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);