Permalink
Browse files

MDL-28132 truncate very long category names before using them in rand…

…om question names.
  • Loading branch information...
1 parent ff555b5 commit 7cf99377240d68b6edb5eac018735fd3f125a81d @timhunt timhunt committed Jun 30, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 question/type/random/questiontype.php
@@ -114,7 +114,7 @@ function question_name($category, $includesubcategories) {
} 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) {

0 comments on commit 7cf9937

Please sign in to comment.