You are here

function qformat_xml::import_text in Quiz 6.6

Same name and namespace in other branches
  1. 6.5 includes/moodle/question/format/xml/format.php \qformat_xml::import_text()

process text string from xml file

Parameters

array $text bit of xml tree after ['text']:

Return value

string processed text

3 calls to qformat_xml::import_text()
qformat_xml::import_calculated in includes/moodle/question/format/xml/format.php
qformat_xml::import_category in includes/moodle/question/format/xml/format.php
this is not a real question type. It's a dummy type used to specify the import category format is: <question type="category"> <category>tom/dick/harry</category> </question>
qformat_xml::import_multianswer in includes/moodle/question/format/xml/format.php
import cloze type question

File

includes/moodle/question/format/xml/format.php, line 77

Class

qformat_xml

Code

function import_text($text) {

  // quick sanity check
  if (empty($text)) {
    return '';
  }
  $data = $text[0]['#'];
  return addslashes(trim($data));
}