You are here

function qformat_xml::get_single in Quiz 6.5

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

Convert internal single question code into human readable form

Parameters

int id single question code:

Return value

string single question string

1 call to qformat_xml::get_single()
qformat_xml::writequestion in includes/moodle/question/format/xml/format.php
Turns question into an xml segment

File

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

Class

qformat_xml

Code

function get_single($id) {
  switch ($id) {
    case 0:
      $name = "false";
      break;
    case 1:
      $name = "true";
      break;
    default:
      $name = "unknown";
  }
  return $name;
}