-
Bug
-
Resolution: Fixed
-
Minor
-
3.4, 3.5.3
-
MOODLE_34_STABLE, MOODLE_35_STABLE
-
MOODLE_35_STABLE
-
As a developer (of the CodeRunner question type) I am finding the following code in lib/outputrequirementslib.php a bit troublesome:
{{ if ($CFG->debugdeveloper) {}}
$toomanyparamslimit = 1024;
if (strlen($strparams) > $toomanyparamslimit) {
debugging('Too many params passed to js_call_amd("' . $fullmodule . '", "' . $func . '")', DEBUG_DEVELOPER);
{{ }}}
{{ }}}
Is there a good reason for this check? The error message itself is confusing as it's not the number of parameters that's the issue, but the lengths of the JSON-encoded parameter list. I am passing an array of selected language strings to my AMD modules and often triggering this error. Since it only affects developers, it's not a major problem and I've simply commented it out but I would like to know if there is a potential problem with passing an array of strings to AMD modules.