From 30df42405180f810d1eccc9e3f84ff795d427e68 Mon Sep 17 00:00:00 2001 From: coderkun Date: Sat, 22 Mar 2014 22:32:43 +0100 Subject: [PATCH] correct input fields for Questtype ?Textinput? when marker is at the begin or end of text --- questtypes/textinput/TextinputQuesttypeController.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/questtypes/textinput/TextinputQuesttypeController.inc b/questtypes/textinput/TextinputQuesttypeController.inc index 580de65c..13e48612 100644 --- a/questtypes/textinput/TextinputQuesttypeController.inc +++ b/questtypes/textinput/TextinputQuesttypeController.inc @@ -101,7 +101,7 @@ $task = $this->Textinput->getTextinputQuest($quest['id']); // Process text - $textParts = preg_split('/(\$\$)/', $task['text'], -1, PREG_SPLIT_NO_EMPTY); + $textParts = preg_split('/(\$\$)/', ' '.$task['text'].' ', -1, PREG_SPLIT_NO_EMPTY); // Get Character answers $regexs = null;