Skip to content

Commit

Permalink
set type for sessionlength element
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusgreen committed Oct 17, 2023
1 parent 5f1d847 commit 41debab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion driprelease_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 41debab

Please sign in to comment.