From ab70110a74e41baa0a7ec00f775f0216e25ce2fa Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Thu, 18 Feb 2021 10:10:08 +0800 Subject: [PATCH] MDL-64554 core_form: CI fixes --- lib/form/classes/dynamic_form.php | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/lib/form/classes/dynamic_form.php b/lib/form/classes/dynamic_form.php index ee328457632..a60a304a070 100644 --- a/lib/form/classes/dynamic_form.php +++ b/lib/form/classes/dynamic_form.php @@ -47,15 +47,18 @@ abstract class dynamic_form extends \moodleform { * @param array $ajaxformdata Forms submitted via ajax, must pass their data here, instead of relying on _GET and _POST. * @param bool $isajaxsubmission whether the form is called from WS and it needs to validate user access and set up context */ - final public function __construct(?string $action = null, - ?array $customdata = null, - string $method = 'post', - string $target = '', - ?array $attributes = [], - bool $editable = true, - ?array $ajaxformdata = null, - bool $isajaxsubmission = false) { + final public function __construct( + ?string $action = null, + ?array $customdata = null, + string $method = 'post', + string $target = '', + ?array $attributes = [], + bool $editable = true, + ?array $ajaxformdata = null, + bool $isajaxsubmission = false + ) { global $PAGE, $CFG; + $this->_ajaxformdata = $ajaxformdata; if ($isajaxsubmission) { require_once($CFG->libdir . '/externallib.php'); @@ -73,7 +76,7 @@ abstract class dynamic_form extends \moodleform { /** * Returns context where this form is used * - * This context is validated in {@link \external_api::validate_context()} + * This context is validated in {@see \external_api::validate_context()} * * If context depends on the form data, it is available in $this->_ajaxformdata or * by calling $this->optional_param()