MDL-58709 registration: Fix incorrect setType

This commit is contained in:
Juan Leyva 2017-04-27 16:57:45 +02:00
parent 5ccddd27df
commit b44e4748d6

View File

@ -422,12 +422,12 @@ class site_registration_form extends moodleform {
$mform->addElement('checkbox', 'badges', '',
" " . get_string('badgesnumber', 'hub', $badges));
$mform->setDefault('badges', $badgesnumber != -1);
$mform->setType('resources', PARAM_INT);
$mform->setType('badges', PARAM_INT);
$mform->addElement('checkbox', 'issuedbadges', '',
" " . get_string('issuedbadgesnumber', 'hub', $issuedbadges));
$mform->setDefault('issuedbadges', $issuedbadgesnumber != -1);
$mform->setType('resources', PARAM_INT);
$mform->setType('issuedbadges', PARAM_INT);
$mform->addElement('checkbox', 'participantnumberaverage', '',
" " . get_string('participantnumberaverage', 'hub', $participantnumberaverage));