From: thepurpleblob Date: Mon, 15 Oct 2007 13:50:57 +0000 (+0000) Subject: MDL-11769: X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=0db7823cf938978d51f1f7a18fcded11aaf37dbe;p=moodle.git MDL-11769: question name is properly truncated to less than 255 characters tom stop PostGRES choking. --- diff --git a/question/format/gift/format.php b/question/format/gift/format.php index b6a722e0eb..16ce9e54ce 100755 --- a/question/format/gift/format.php +++ b/question/format/gift/format.php @@ -220,7 +220,8 @@ class qformat_gift extends qformat_default { } // ensure name is not longer than 250 characters - $question->name = shorten_text( $question->name, 250 ); + $question->name = shorten_text( $question->name, 200 ); + $question->name = strip_tags(substr( $question->name, 0, 250 )); // determine QUESTION TYPE $question->qtype = NULL;