You are here

function qformat_hotpot::hotpot_get_reading in Quiz 6.6

Same name and namespace in other branches
  1. 6.5 includes/moodle/question/format/hotpot/format.php \qformat_hotpot::hotpot_get_reading()
3 calls to qformat_hotpot::hotpot_get_reading()
qformat_hotpot::process_jcloze in includes/moodle/question/format/hotpot/format.php
qformat_hotpot::process_jmatch in includes/moodle/question/format/hotpot/format.php
qformat_hotpot::process_jmix in includes/moodle/question/format/hotpot/format.php

File

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

Class

qformat_hotpot
@package questionbank @subpackage importexport

Code

function hotpot_get_reading(&$xml) {
  $str = '';
  $tags = 'data,reading';
  if ($xml
    ->xml_value("{$tags},include-reading")) {
    if ($title = $xml
      ->xml_value("{$tags},reading-title")) {
      $str .= "<H3>{$title}</H3>";
    }
    if ($text = $xml
      ->xml_value("{$tags},reading-text")) {
      $str .= "<P>{$text}</P>";
    }
  }
  return $this
    ->hotpot_prepare_str($str);
}