function qformat_qti2::objects_to_array in Quiz 6.6
Same name and namespace in other branches
- 6.5 includes/moodle/question/format/qti2/format.php \qformat_qti2::objects_to_array()
converts an array of objects to an array of arrays (not recursively)
Parameters
array $objectarray:
Return value
array - an array of answer arrays
4 calls to qformat_qti2::objects_to_array()
- qformat_qti2::exportprocess in includes/
moodle/ question/ format/ qti2/ format.php - exports the questions in a question category to the given location
- qformat_qti2::get_cloze_answers_array in includes/
moodle/ question/ format/ qti2/ format.php - gets a question's cloze answer objects as arrays containing only arrays and basic data types
- qformat_qti2::quiz_export_prepare_questions in includes/
moodle/ question/ format/ qti2/ format.php - Prepares questions for quiz export
- qformat_qti2::writequestion in includes/
moodle/ question/ format/ qti2/ format.php - Creates the export text for a question
File
- includes/
moodle/ question/ format/ qti2/ format.php, line 701
Class
Code
function objects_to_array($objectarray) {
$arrayarray = array();
foreach ($objectarray as $object) {
$arrayarray[] = (array) $object;
}
return $arrayarray;
}