mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +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 = new stdClass();
|
||||||
$a->name = $groupname;
|
$a->name = $groupname;
|
||||||
$a->increment = '';
|
$a->increment = '';
|
||||||
$groupname = get_string('defaultgroupnametext', 'enrol_cohort', $a);
|
$groupname = trim(get_string('defaultgroupnametext', 'enrol_cohort', $a));
|
||||||
$inc = 1;
|
$inc = 1;
|
||||||
// Check to see if the cohort group name already exists. Add an incremented number if it does.
|
// 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))) {
|
while ($DB->record_exists('groups', array('name' => $groupname, 'courseid' => $courseid))) {
|
||||||
$a->increment = '(' . (++$inc) . ')';
|
$a->increment = '(' . (++$inc) . ')';
|
||||||
$newshortname = get_string('defaultgroupnametext', 'enrol_cohort', $a);
|
$newshortname = trim(get_string('defaultgroupnametext', 'enrol_cohort', $a));
|
||||||
$groupname = $newshortname;
|
$groupname = $newshortname;
|
||||||
}
|
}
|
||||||
// Create a new group for the cohort.
|
// Create a new group for the cohort.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue