diff --git a/course/externallib.php b/course/externallib.php index 3bfbdf1138eae..dcbb80082183e 100644 --- a/course/externallib.php +++ b/course/externallib.php @@ -782,7 +782,7 @@ public static function create_categories($categories) { } } // Check name. - if (textlib::strlen($category['name'])>30) { + if (textlib::strlen($category['name'])>255) { throw new moodle_exception('categorytoolong'); } @@ -1191,7 +1191,7 @@ public static function update_categories($categories) { require_capability('moodle/category:manage', $categorycontext); if (!empty($cat['name'])) { - if (textlib::strlen($cat['name'])>30) { + if (textlib::strlen($cat['name'])>255) { throw new moodle_exception('categorytoolong'); } $category->name = $cat['name'];