Skip to content

Commit

Permalink
Merge branch 'wip-86264-m310' into MOODLE_310_STABLE
Browse files Browse the repository at this point in the history
# Conflicts:
#	local/o365/classes/feature/coursesync/main.php
#	local/o365/classes/feature/coursesync/utils.php
  • Loading branch information
weilai-irl committed Sep 29, 2022
2 parents 13f4471 + 0052eff commit 24f6fff
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/coursesync/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -951,8 +951,8 @@ public function process_course_reset(stdClass $course, stdClass $o365object, boo
$resetgroupnameprefix = 'disconnected-';
}
$updatedmailnickname = $resetgroupnameprefix . utils::get_group_mail_alias($course);
if (strlen($updatedmailnickname) > 60) {
$updatedmailnickname = substr($updatedmailnickname, 0, 60);
if (strlen($updatedmailnickname) > 59) {
$updatedmailnickname = substr($updatedmailnickname, 0, 59);
}
$updatedexistinggroup = [
'id' => $existinggroup['id'],
Expand Down
2 changes: 1 addition & 1 deletion local/o365/classes/feature/coursesync/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ public static function get_group_mail_alias(stdClass $course) : string {

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

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

0 comments on commit 24f6fff

Please sign in to comment.