function qformat_qti2::questions_with_export_info in Quiz 6.5
Same name and namespace in other branches
- 6.6 includes/moodle/question/format/qti2/format.php \qformat_qti2::questions_with_export_info()
adds exporttext property to the questions
Adds the qti export text to the questions
Parameters
array $questions - an array of question objects:
Return value
an array of question objects
1 call to qformat_qti2::questions_with_export_info()
- 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 484
Class
Code
function questions_with_export_info($questions, $shuffleanswers = null) {
$exportquestions = array();
foreach ($questions as $key => $question) {
$expout = $this
->writequestion($question, $shuffleanswers) . "\n";
$expout = $this
->presave_process($expout);
$key = $this
->get_assesment_item_id($question);
$exportquestions[$key] = $question;
$exportquestions[$key]->exporttext = $expout;
}
return $exportquestions;
}