You are here

function get_question_options in Quiz 6.5

Same name and namespace in other branches
  1. 6.6 includes/moodle/lib/questionlib.php \get_question_options()

Updates the question objects with question type specific information by calling {@link get_question_options()}

Can be called either with an array of question objects or with a single question object.


mixed $questions Either an array of question objects to be updated: or just a single question object

Return value

bool Indicates success or failure.


includes/moodle/lib/questionlib.php, line 780


function get_question_options(&$questions) {
  if (is_array($questions)) {

    // deal with an array of questions
    foreach ($questions as $i => $notused) {
      if (!_tidy_question($questions[$i])) {
        return false;
    return true;
  else {

    // deal with single question
    return _tidy_question($questions);