mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
Merge branch 'MDL-41305-master' of git://github.com/FMCorz/moodle
This commit is contained in:
commit
89cb942c6d
@ -46,7 +46,30 @@ class autogroup_form extends moodleform {
|
||||
|
||||
$mform =& $this->_form;
|
||||
|
||||
$mform->addElement('header', 'autogroup', get_string('autocreategroups', 'group'));
|
||||
$mform->addElement('header', 'autogroup', get_string('general'));
|
||||
|
||||
$mform->addElement('text', 'namingscheme', get_string('namingscheme', 'group'));
|
||||
$mform->addHelpButton('namingscheme', 'namingscheme', 'group');
|
||||
$mform->addRule('namingscheme', get_string('required'), 'required', null, 'client');
|
||||
$mform->setType('namingscheme', PARAM_TEXT);
|
||||
// There must not be duplicate group names in course.
|
||||
$template = get_string('grouptemplate', 'group');
|
||||
$gname = groups_parse_name($template, 0);
|
||||
if (!groups_get_group_by_name($COURSE->id, $gname)) {
|
||||
$mform->setDefault('namingscheme', $template);
|
||||
}
|
||||
|
||||
$options = array('groups' => get_string('numgroups', 'group'),
|
||||
'members' => get_string('nummembers', 'group'));
|
||||
$mform->addElement('select', 'groupby', get_string('groupby', 'group'), $options);
|
||||
|
||||
$mform->addElement('text', 'number', get_string('number', 'group'),'maxlength="4" size="4"');
|
||||
$mform->setType('number', PARAM_INT);
|
||||
$mform->addRule('number', null, 'numeric', null, 'client');
|
||||
$mform->addRule('number', get_string('required'), 'required', null, 'client');
|
||||
|
||||
$mform->addElement('header', 'groupmembershdr', get_string('groupmembers', 'group'));
|
||||
$mform->setExpanded('groupmembershdr', true);
|
||||
|
||||
$options = array(0=>get_string('all'));
|
||||
$options += $this->_customdata['roles'];
|
||||
@ -76,20 +99,6 @@ class autogroup_form extends moodleform {
|
||||
$mform->setType('cohortid', PARAM_INT);
|
||||
$mform->setConstant('cohortid', '0');
|
||||
}
|
||||
|
||||
$options = array('groups' => get_string('numgroups', 'group'),
|
||||
'members' => get_string('nummembers', 'group'));
|
||||
$mform->addElement('select', 'groupby', get_string('groupby', 'group'), $options);
|
||||
|
||||
$mform->addElement('text', 'number', get_string('number', 'group'),'maxlength="4" size="4"');
|
||||
$mform->setType('number', PARAM_INT);
|
||||
$mform->addRule('number', null, 'numeric', null, 'client');
|
||||
$mform->addRule('number', get_string('required'), 'required', null, 'client');
|
||||
|
||||
$mform->addElement('checkbox', 'nosmallgroups', get_string('nosmallgroups', 'group'));
|
||||
$mform->disabledIf('nosmallgroups', 'groupby', 'noteq', 'members');
|
||||
$mform->setAdvanced('nosmallgroups');
|
||||
|
||||
$options = array('no' => get_string('noallocation', 'group'),
|
||||
'random' => get_string('random', 'group'),
|
||||
'firstname' => get_string('byfirstname', 'group'),
|
||||
@ -97,20 +106,13 @@ class autogroup_form extends moodleform {
|
||||
'idnumber' => get_string('byidnumber', 'group'));
|
||||
$mform->addElement('select', 'allocateby', get_string('allocateby', 'group'), $options);
|
||||
$mform->setDefault('allocateby', 'random');
|
||||
$mform->setAdvanced('allocateby');
|
||||
|
||||
$mform->addElement('text', 'namingscheme', get_string('namingscheme', 'group'));
|
||||
$mform->addHelpButton('namingscheme', 'namingscheme', 'group');
|
||||
$mform->addRule('namingscheme', get_string('required'), 'required', null, 'client');
|
||||
$mform->setType('namingscheme', PARAM_TEXT);
|
||||
// there must not be duplicate group names in course
|
||||
$template = get_string('grouptemplate', 'group');
|
||||
$gname = groups_parse_name($template, 0);
|
||||
if (!groups_get_group_by_name($COURSE->id, $gname)) {
|
||||
$mform->setDefault('namingscheme', $template);
|
||||
}
|
||||
$mform->addElement('checkbox', 'nosmallgroups', get_string('nosmallgroups', 'group'));
|
||||
$mform->disabledIf('nosmallgroups', 'groupby', 'noteq', 'members');
|
||||
|
||||
$options = array('0' => get_string('no'),
|
||||
$mform->addElement('header', 'groupinghdr', get_string('grouping', 'group'));
|
||||
|
||||
$options = array('0' => get_string('nogrouping', 'group'),
|
||||
'-1'=> get_string('newgrouping', 'group'));
|
||||
if ($groupings = groups_get_all_groupings($COURSE->id)) {
|
||||
foreach ($groupings as $grouping) {
|
||||
|
@ -55,7 +55,6 @@ class group_form extends moodleform {
|
||||
$mform->addElement('text','idnumber', get_string('idnumbergroup'), 'maxlength="100" size="10"');
|
||||
$mform->addHelpButton('idnumber', 'idnumbergroup');
|
||||
$mform->setType('idnumber', PARAM_RAW);
|
||||
$mform->setAdvanced('idnumber');
|
||||
if (!has_capability('moodle/course:changeidnumber', $coursecontext)) {
|
||||
$mform->hardFreeze('idnumber');
|
||||
}
|
||||
|
@ -57,7 +57,6 @@ class grouping_form extends moodleform {
|
||||
$mform->addElement('text','idnumber', get_string('idnumbergrouping'), 'maxlength="100" size="10"');
|
||||
$mform->addHelpButton('idnumber', 'idnumbergrouping');
|
||||
$mform->setType('idnumber', PARAM_RAW);
|
||||
$mform->setAdvanced('idnumber');
|
||||
if (!has_capability('moodle/course:changeidnumber', $coursecontext)) {
|
||||
$mform->hardFreeze('idnumber');
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ class groups_import_form extends moodleform {
|
||||
|
||||
//fill in the data depending on page params
|
||||
//later using set_data
|
||||
$mform->addElement('header', 'general');
|
||||
$mform->addElement('header', 'general', get_string('general'));
|
||||
|
||||
$filepickeroptions = array();
|
||||
$filepickeroptions['filetypes'] = '*';
|
||||
|
@ -42,7 +42,7 @@ $string['createautomaticgrouping'] = 'Create automatic grouping';
|
||||
$string['creategroup'] = 'Create group';
|
||||
$string['creategrouping'] = 'Create grouping';
|
||||
$string['creategroupinselectedgrouping'] = 'Create group in grouping';
|
||||
$string['createingrouping'] = 'Create in grouping';
|
||||
$string['createingrouping'] = 'Grouping of auto-created groups';
|
||||
$string['createorphangroup'] = 'Create orphan group';
|
||||
$string['databaseupgradegroups'] = 'Groups version is now {$a}';
|
||||
$string['defaultgrouping'] = 'Default grouping';
|
||||
@ -80,7 +80,7 @@ $string['filtergroups'] = 'Filter groups by:';
|
||||
$string['group'] = 'Group';
|
||||
$string['groupaddedsuccesfully'] = 'Group {$a} added successfully';
|
||||
$string['groupaddedtogroupingsuccesfully'] = 'Group {$a->groupname} added to grouping {$a->groupingname} successfully';
|
||||
$string['groupby'] = 'Specify';
|
||||
$string['groupby'] = 'Auto create based on';
|
||||
$string['groupdescription'] = 'Group description';
|
||||
$string['groupinfo'] = 'Info about selected group';
|
||||
$string['groupinfomembers'] = 'Info about selected members';
|
||||
@ -149,6 +149,7 @@ $string['newgrouping'] = 'New grouping';
|
||||
$string['newpicture'] = 'New picture';
|
||||
$string['newpicture_help'] = 'Select an image in JPG or PNG format. The image will be cropped to a square and resized to 100x100 pixels.';
|
||||
$string['noallocation'] = 'No allocation';
|
||||
$string['nogrouping'] = 'No grouping';
|
||||
$string['nogroups'] = 'There are no groups set up in this course yet';
|
||||
$string['nogroupsassigned'] = 'No groups assigned';
|
||||
$string['nopermissionforcreation'] = 'Can\'t create group "{$a}" as you don\'t have the required permissions';
|
||||
@ -169,7 +170,7 @@ $string['removefromgroupconfirm'] = 'Do you really want to remove user "{$a->use
|
||||
$string['removegroupingsmembers'] = 'Remove all groups from groupings';
|
||||
$string['removegroupsmembers'] = 'Remove all group members';
|
||||
$string['removeselectedusers'] = 'Remove selected users';
|
||||
$string['selectfromrole'] = 'Select members from role';
|
||||
$string['selectfromrole'] = 'Select members with role';
|
||||
$string['showgroupsingrouping'] = 'Show groups in grouping';
|
||||
$string['showmembersforgroup'] = 'Show members for group';
|
||||
$string['toomanygroups'] = 'Insufficient users to populate this number of groups - there are only {$a} users in the selected role.';
|
||||
|
Loading…
x
Reference in New Issue
Block a user