From 63637e9dd82b4d5befb417694c3a60d5a930a46f Mon Sep 17 00:00:00 2001 From: "Eloy Lafuente (stronk7)" Date: Fri, 23 Dec 2011 01:10:03 +0100 Subject: [PATCH] MDL-30760 question engine: reduce summary max size MySQL only accepts 65536 (aprox) bytes in default TEXT columns. So we define the max allowed as 32000 to allow 99.9% of utf-8 contents to fit. If some day MDL-19603 is implemented and all current TEXTs are moved (MySQL) to the BIG counterparts, this restriction can be out (MDL-19603). --- question/engine/bank.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/question/engine/bank.php b/question/engine/bank.php index ad4e4930ae1..5a3118b98ee 100644 --- a/question/engine/bank.php +++ b/question/engine/bank.php @@ -42,7 +42,8 @@ require_once(dirname(__FILE__) . '/../type/questiontypebase.php'); * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ abstract class question_bank { - const MAX_SUMMARY_LENGTH = 65000; + // TODO: This limit can be deleted if someday we move all TEXTS to BIG ones. MDL-19603 + const MAX_SUMMARY_LENGTH = 32000; /** @var array question type name => question_type subclass. */ private static $questiontypes = array(); -- 2.43.0