From 41debab764d40aadc6411828a03054b62065858f Mon Sep 17 00:00:00 2001 From: Marcus Green Date: Tue, 17 Oct 2023 22:05:14 +0100 Subject: [PATCH] set type for sessionlength element --- driprelease_form.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/driprelease_form.php b/driprelease_form.php index 629bac9..52fc2df 100644 --- a/driprelease_form.php +++ b/driprelease_form.php @@ -113,10 +113,11 @@ public function definition() { $driprelease->sessionlength = $driprelease->sessionlength ?? get_config('tool_driprelease', 'tool_driprelease'); $group[] = $mform->createElement('text', 'sessionlength', get_string('sessionlength', 'tool_driprelease'), - ['value' => $driprelease->sessionlength, 'size' => 3]); + ['value' => $driprelease->sessionlength, 'size' => 3] ); $mform->addGroup($group, 'sessiongroup', get_string('sessionlength', 'tool_driprelease') . '  ', '', false, []); $mform->addRule('sessiongroup', null, 'required', null, 'client'); + $mform->setType('sessionlength', PARAM_INT); $mform->setType('sessiongroup', PARAM_RAW); $mform->addHelpButton('sessiongroup', 'session', 'tool_driprelease');