You are here

function hotpot_xml_tree::hotpot_xml_tree in Quiz 6.5

Same name and namespace in other branches
  1. 6.6 includes/moodle/question/format/hotpot/format.php \hotpot_xml_tree::hotpot_xml_tree()

File

includes/moodle/question/format/hotpot/format.php, line 536

Class

hotpot_xml_tree

Code

function hotpot_xml_tree($str, $xml_root = '') {
  if (empty($str)) {
    $this->xml = array();
  }
  else {

    // encode htmlentities in JCloze
    $this
      ->encode_cdata($str, 'gap-fill');

    // xmlize (=convert xml to tree)
    $this->xml = xmlize($str, 0);
  }
  $this->xml_root = $xml_root;
}