]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-11769:
authorthepurpleblob <thepurpleblob>
Mon, 15 Oct 2007 13:50:57 +0000 (13:50 +0000)
committerthepurpleblob <thepurpleblob>
Mon, 15 Oct 2007 13:50:57 +0000 (13:50 +0000)
question name is properly truncated to less than 255 characters tom
stop PostGRES choking.

question/format/gift/format.php

index b6a722e0eb3da5423dd0a5e3a18976cbaf297594..16ce9e54ceed7b7a394342e336f00c3062563ce5 100755 (executable)
@@ -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;