mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-49953 enrol_cohort: correction to string
This commit is contained in:
parent
42c92eef33
commit
5894432c50
3 changed files with 6 additions and 6 deletions
|
@ -343,12 +343,12 @@ function enrol_cohort_create_new_group($courseid, $cohortid) {
|
|||
$a = new stdClass();
|
||||
$a->name = $groupname;
|
||||
$a->increment = '';
|
||||
$groupname = get_string('defaultgroupnametext', 'enrol_cohort', $a);
|
||||
$groupname = trim(get_string('defaultgroupnametext', 'enrol_cohort', $a));
|
||||
$inc = 1;
|
||||
// Check to see if the cohort group name already exists. Add an incremented number if it does.
|
||||
while ($DB->record_exists('groups', array('name' => $groupname, 'courseid' => $courseid))) {
|
||||
$a->increment = '(' . (++$inc) . ')';
|
||||
$newshortname = get_string('defaultgroupnametext', 'enrol_cohort', $a);
|
||||
$newshortname = trim(get_string('defaultgroupnametext', 'enrol_cohort', $a));
|
||||
$groupname = $newshortname;
|
||||
}
|
||||
// Create a new group for the cohort.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue