From: thepurpleblob Date: Fri, 1 Dec 2006 16:06:06 +0000 (+0000) Subject: Improved regep for category switching X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=6575b04f25796a3f98a0a377eeffad1dfeee2392;p=moodle.git Improved regep for category switching --- diff --git a/question/format/gift/format.php b/question/format/gift/format.php index c48b6d4bb9..6d23a28dd7 100755 --- a/question/format/gift/format.php +++ b/question/format/gift/format.php @@ -143,7 +143,7 @@ class qformat_gift extends qformat_default { $text = $this->escapedchar_pre($text); // Look for category modifier - if (ereg( '^\$CATEGORY:(.+)', $text, $matches)) { + if (ereg( '^\$CATEGORY: *([A-Za-z0-9/]+)[[:space:]]', $text, $matches)) { $newcategory = $matches[1]; // build fake question to contain category