From ced1165274aaae2337a62ba470fdf0433ee322af Mon Sep 17 00:00:00 2001 From: Eric Marguin Date: Fri, 23 Nov 2007 16:06:16 +0100 Subject: [PATCH] [svn r13755] fix a pbm when entering a long title and no course code (FS#2072) --- main/create_course/add_course.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main/create_course/add_course.php b/main/create_course/add_course.php index dff2807c35..025035636f 100644 --- a/main/create_course/add_course.php +++ b/main/create_course/add_course.php @@ -1,5 +1,5 @@ validate()) $course_language = $course_values['course_language']; if(trim($wanted_code) == ''){ - $wanted_code = generate_course_code($title); + $wanted_code = generate_course_code(substr($title,0,20)); } $keys = define_course_keys($wanted_code, "", $_configuration['db_prefix']);