From 7cf99377240d68b6edb5eac018735fd3f125a81d Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Thu, 30 Jun 2011 19:34:44 +0100 Subject: [PATCH] MDL-28132 truncate very long category names before using them in random question names. --- question/type/random/questiontype.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/question/type/random/questiontype.php b/question/type/random/questiontype.php index 0ecefd45778..f9b6bd65f21 100644 --- a/question/type/random/questiontype.php +++ b/question/type/random/questiontype.php @@ -114,7 +114,7 @@ class random_qtype extends default_questiontype { } else { $string = 'randomqname'; } - return get_string($string, 'qtype_random', $category->name); + return get_string($string, 'qtype_random', shorten_text($category->name, 100)); } function save_question($question, $form) {