You are here

function qformat_qti2::add_qti_info in Quiz 6.6

Same name and namespace in other branches
  1. 6.5 includes/moodle/question/format/qti2/format.php \qformat_qti2::add_qti_info()

adds qti metadata properties to the questions

The passed array of questions is altered by this function

Parameters

&questions an array of question objects:

2 calls to qformat_qti2::add_qti_info()
qformat_qti2::exportprocess in includes/moodle/question/format/qti2/format.php
exports the questions in a question category to the given location
qformat_qti2::quiz_export_prepare_questions in includes/moodle/question/format/qti2/format.php
Prepares questions for quiz export

File

includes/moodle/question/format/qti2/format.php, line 796

Class

qformat_qti2

Code

function add_qti_info(&$questions) {
  foreach ($questions as $key => $question) {
    $questions[$key]->qtiinteractiontype = $this
      ->get_qti_interaction_type($question->qtype);
    $questions[$key]->qtiscoreable = $this
      ->get_qti_scoreable($question);
    $questions[$key]->qtisolutionavailable = $this
      ->get_qti_solution_available($question);
  }
}