';
- print '| This matching question is malformed. Please ensure there are no blank answers, no two questions have the same answer, and/or there are correct answers for each question. There must be at least as many subanswers as subquestions, and at least one subquestion. |
';
-
- print "| Question: | ".$quest->QUESTION_BLOCK->text;
- if (isset($quest->QUESTION_BLOCK->file)) {
- print ' There is a subfile contained in the zipfile that has been copied to course files: bb_import/'.basename($quest->QUESTION_BLOCK->file).'';
- if (preg_match('/(gif|jpg|jpeg|png)$/i', $quest->QUESTION_BLOCK->file)) {
- print ' ';
- }
- }
- print " |
";
- print "| Subquestions: | ";
- foreach($quest->responses as $rs) {
- $correct_responses->{$rs->ident} = $rs->correct;
- }
- foreach($quest->RESPONSE_BLOCK->subquestions as $subq) {
- print '- '.$subq->text.'
';
- foreach($subq->choices as $id=>$choice) {
- print '- ';
- if ($choice == $correct_responses->{$subq->ident}) {
- print '';
- }
- else {
- print '';
- }
- print $quest->RIGHT_MATCH_BLOCK->matching_answerset[$id]->text.'
';
- }
- print ' ';
- }
- print ' |
';
-
- print '| Feedback: | ';
- foreach($quest->feedback as $fb) {
- print '- '.$fb->ident.': '.$fb->text.'
';
- }
- print ' |
';
- }
- }
- else {
- print "Matching question types are not handled because the quiz question type 'Rendered Matching' does not exist in this installation of Moodle