-
Notifications
You must be signed in to change notification settings - Fork 147
Description
If your Teams fullname is longer than 254 chars the INSERT on the table courses will fail, since that table has a filed size of 354 chars.
Before creating the array for the create_course function, the fields length should be compared to ist counterpart field sizes on the database in ordel to truncate/skip them.
I worked around the fullname error replacing, in funcion runsync in /local/o365/classes/feature/sds/task/sync.php, lines 253-254 with
// Create the course.
$dispname = (strlen($schoolclass['displayName'])<=254)?$schoolclass['displayName']:substr($schoolclass['displayName'],0,254);
$course = static::get_or_create_class_course($schoolclass['id'], $schoolclass['mailNickname'],
$dispname, $coursecat->id);
(original)
// Create the course.
$course = static::get_or_create_class_course($schoolclass['id'], $schoolclass['mailNickname'],
$schoolclass['displayName'], $coursecat->id);