1
0
mirror of https://github.com/moodle/moodle.git synced 2025-04-24 09:55:33 +02:00

MDL-40244 forms: added setType() for groupinfo in forum and wiki

This commit is contained in:
Mary Evans 2013-11-01 23:41:35 +00:00 committed by Marina Glancy
parent 0f57d555a0
commit fe4848110a
2 changed files with 2 additions and 0 deletions
mod

@ -174,6 +174,7 @@ class mod_forum_post_form extends moodleform {
}
$mform->addElement('select','groupinfo', get_string('group'), $groupinfo);
$mform->setDefault('groupinfo', $post->groupid);
$mform->setType('groupinfo', PARAM_INT);
} else {
if (empty($post->groupid)) {
$groupname = get_string('allparticipants');

@ -71,6 +71,7 @@ class mod_wiki_create_form extends moodleform {
if (count($groupinfo) > 1) {
$mform->addElement('select', 'groupinfo', get_string('group'), $groupinfo);
$mform->setDefault('groupinfo', $this->_customdata['groups']->currentgroup);
$mform->setType('groupinfo', PARAM_INT);
} else {
$groupid = key($groupinfo);
$groupname = $groupinfo[$groupid];