diff --git a/questtypes/choiceinput/html/quest.tpl b/questtypes/choiceinput/html/quest.tpl index 88074135..1f9979ec 100644 --- a/questtypes/choiceinput/html/quest.tpl +++ b/questtypes/choiceinput/html/quest.tpl @@ -1,32 +1,17 @@
diff --git a/questtypes/choiceinput/html/submission.tpl b/questtypes/choiceinput/html/submission.tpl index c9c2ef41..3f51f9a8 100644 --- a/questtypes/choiceinput/html/submission.tpl +++ b/questtypes/choiceinput/html/submission.tpl @@ -1,29 +1,14 @@- t($task['text']); - - // Insert comboboxes - foreach(array_reverse($choiceLists) as &$list) - { - // Get positions - $posStart = mb_strrpos($text, '[choiceinput]', 0, 'UTF-8'); - $posEnd = $posStart + mb_strlen('[choiceinput]', 'UTF-8'); - - // Create combobox - $combobox = ''; - - // Insert input field - $text = mb_substr($text, 0, $posStart, 'UTF-8') . $combobox . mb_substr($text, $posEnd, mb_strlen($text)-$posEnd, 'UTF-8'); - } - ?> - =$text?> + + + + =$t->t(mb_substr($task['text'], $posStart, $posEnd-$posStart, 'UTF-8'))?> + + + + =$t->t(mb_substr($task['text'], $posStart, mb_strlen($task['text'], 'UTF-8')-$posStart, 'UTF-8'))?>
diff --git a/questtypes/textinput/html/quest.tpl b/questtypes/textinput/html/quest.tpl index 6dc79b37..9aaf010b 100644 --- a/questtypes/textinput/html/quest.tpl +++ b/questtypes/textinput/html/quest.tpl @@ -1,29 +1,13 @@ diff --git a/questtypes/textinput/html/submission.tpl b/questtypes/textinput/html/submission.tpl index e75b2c4d..20abb2bb 100644 --- a/questtypes/textinput/html/submission.tpl +++ b/questtypes/textinput/html/submission.tpl @@ -1,24 +1,10 @@- t($task['text']); - - // Insert Character answers - foreach(array_reverse($fields) as &$field) - { - // Get positions - $posStart = mb_strrpos($text, '[textinput]', 0, 'UTF-8'); - $posEnd = $posStart + mb_strlen('[textinput]', 'UTF-8'); - - // Create field for Character answer - $answerField = sprintf( - '%s%s', - $field['answer'], - ($field['right']) ? '✓' : '✕' - ); - - // Insert input field - $text = mb_substr($text, 0, $posStart, 'UTF-8') . $answerField . mb_substr($text, $posEnd, mb_strlen($text)-$posEnd, 'UTF-8'); - } - ?> - =$text?> + + + + =$t->t(mb_substr($task['text'], $posStart, $posEnd-$posStart, 'UTF-8'))?> + =$field['answer']?>=($field['right']) ? '✓' : '✕'?> + + + =$t->t(mb_substr($task['text'], $posStart, mb_strlen($task['text'], 'UTF-8')-$posStart, 'UTF-8'))?>