mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
Fixed two places where course->shortname was harcoded to 15. MDL-10026
This commit is contained in:
parent
d4795a0792
commit
5ba3928959
@ -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++;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user