MDL-65154 competencies: FF 47 does not digest null/missing JS params

So we are defaulting to 0 when the page is initially called,
instead of current null. That's exactly the same behavior
than when you pick "No filters applied" from the filter menu.

Note that other browsers seems to accept perfectly the missing param
but FF 47.0.1 does not.
This commit is contained in:
Eloy Lafuente (stronk7)
2019-05-07 23:20:38 +02:00
parent e4987f0f58
commit 9b0aec2d65
+1 -1
View File
@@ -25,7 +25,7 @@
require_once(__DIR__ . '/../../../config.php');
$id = required_param('courseid', PARAM_INT);
$currentmodule = optional_param('mod', null, PARAM_INT);
$currentmodule = optional_param('mod', 0, PARAM_INT);
if ($currentmodule > 0) {
$cm = get_coursemodule_from_id('', $currentmodule, 0, false, MUST_EXIST);
}