diff --git a/backup/restorelib.php b/backup/restorelib.php index c198454c2fc..cb1e8a22dfa 100644 --- a/backup/restorelib.php +++ b/backup/restorelib.php @@ -521,8 +521,8 @@ $suffixshort = ""; } $currentfullname = $fullname.$suffixfull; - // Limit the size of shortname - database column accepts <= 15 chars - $currentshortname = substr($shortname, 0, 15 - strlen($suffixshort)).$suffixshort; + // Limit the size of shortname - database column accepts <= 100 chars + $currentshortname = substr($shortname, 0, 100 - strlen($suffixshort)).$suffixshort; $coursefull = get_record("course","fullname",addslashes($currentfullname)); $courseshort = get_record("course","shortname",addslashes($currentshortname)); $counter++; diff --git a/enrol/database/enrol.php b/enrol/database/enrol.php index 1b3a22af171..f51c7127ff8 100644 --- a/enrol/database/enrol.php +++ b/enrol/database/enrol.php @@ -581,8 +581,8 @@ function create_course ($course,$skip_fix_course_sortorder=0){ // truncate a few key fields $course->idnumber = substr($course->idnumber, 0, 100); - $course->shortname = substr($course->shortname, 0, 15); - + $course->shortname = substr($course->shortname, 0, 100); + // store it and log if ($newcourseid = insert_record("course", addslashes_object($course))) { // Set up new course $section = NULL;