function get_html_head_contributions in Quiz 6.6
Same name and namespace in other branches
- 6.5 includes/moodle/lib/questionlib.php \get_html_head_contributions()
Get the HTML that needs to be included in the head tag when the questions in $questionlist are printed in the gives states.
Parameters
array $questionlist a list of questionids of the questions what will appear on this page.:
array $questions an array of question objects, whose keys are question ids.: Must contain all the questions in $questionlist
array $states an array of question state objects, whose keys are question ids.: Must contain the state of all the questions in $questionlist
Return value
string some HTML code that can go inside the head tag.
File
- includes/
moodle/ lib/ questionlib.php, line 1683
Code
function get_html_head_contributions(&$questionlist, &$questions, &$states) {
global $QTYPES;
$contributions = array();
foreach ($questionlist as $questionid) {
$question = $questions[$questionid];
$contributions = array_merge($contributions, $QTYPES[$question->qtype]
->get_html_head_contributions($question, $states[$questionid]));
}
return implode("\n", array_unique($contributions));
}