Correctly report unhandled question types and get string from language pack.
--- /dev/null
+<?php
+$string['nohandler'] = 'No handler for question type $a';
+?>
}
$expout .= "}\n";
break;
- case DESCRIPTION:
- $expout .= "// DESCRIPTION type is not supported\n";
- break;
- case MULTIANSWER:
- $expout .= "// CLOZE type is not supported\n";
- break;
default:
// check for plugins
if ($out = $this->try_exporting_using_qtypes( $question->qtype, $question )) {
$expout .= $out;
}
else {
- notify("No handler for qtype '$question->qtype' for GIFT export" );
+ $expout .= "Question type $question->qtype is not supported\n";
+ notify( get_string('nohandler','qformat_gift',$question->qtype ) );
}
}
// add empty line to delimit questions