forked from netspotau/moodle-mod_groupselect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlimits_form.php
30 lines (22 loc) · 846 Bytes
/
limits_form.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php // $Id: mod_form.php,v 1.1.2.3 2009/03/06 15:47:04 mudrd8mz Exp $
require_once ($CFG->dirroot.'/course/moodleform_mod.php');
class mod_groupselect_limits_form extends moodleform {
function mod_groupselect_limits_form ($groups) {
$this->groups = $groups;
parent::moodleform();
}
function definition() {
global $COURSE;
$mform =& $this->_form;
$strlimit = get_string('limit', 'groupselect');
$mform->addElement('hidden', 'id');
$mform->setType('id', PARAM_INT);
foreach ($this->groups as $group) {
$elname = 'limit[' . $group->id . ']';
$mform->addElement('text', $elname, $group->name . ' ' . $strlimit, array('size' => 4));
$mform->setType($elname, PARAM_INT);
}
$this->add_action_buttons();
}
}
?>