Skip to content

Commit

Permalink
Merge branch 'wip-86264-m39' into MOODLE_39_STABLE
Browse files Browse the repository at this point in the history
# Conflicts:
#	local/o365/classes/feature/usergroups/coursegroups.php
#	local/o365/classes/feature/usergroups/utils.php
  • Loading branch information
weilai-irl committed Sep 29, 2022
2 parents 86d925b + 3617e05 commit f57a6e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions local/o365/classes/feature/usergroups/coursegroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -1488,8 +1488,8 @@ public function process_course_reset_group(\stdClass $course, \stdClass $o365obj
$resetgroupnameprefix);
$timestamp = '_' . time();
$exisinggroupmailnickname = \local_o365\feature\usergroups\utils::get_group_mail_alias($course);
if (strlen($timestamp) + strlen($exisinggroupmailnickname) >= 60) {
$exisinggroupmailnickname = substr($exisinggroupmailnickname, 0, 60 - strlen($timestamp));
if (strlen($timestamp) + strlen($exisinggroupmailnickname) >= 59) {
$exisinggroupmailnickname = substr($exisinggroupmailnickname, 0, 59 - strlen($timestamp));
}
$exisinggroupmailnickname .= $timestamp;
$updatedexistinggroup = [
Expand Down
2 changes: 1 addition & 1 deletion local/o365/classes/feature/usergroups/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ public static function get_group_mail_alias(\stdClass $course, \stdClass $group

$coursepart = static::clean_up_group_mail_alias($coursepart);

$coursepartmaxlength = 60 - strlen($groupmailaliasprefix) - strlen($groupmailaliassuffix) - strlen($grouppart);
$coursepartmaxlength = 59 - strlen($groupmailaliasprefix) - strlen($groupmailaliassuffix) - strlen($grouppart);
if (strlen($coursepart) > $coursepartmaxlength) {
$coursepart = substr($coursepart, 0, $coursepartmaxlength);
}
Expand Down

0 comments on commit f57a6e5

Please sign in to comment.