function qformat_qti2::get_qtype in Quiz 6.5
Same name and namespace in other branches
- 6.6 includes/moodle/question/format/qti2/format.php \qformat_qti2::get_qtype()
1 call to qformat_qti2::get_qtype()
- 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 136
Class
Code
function get_qtype($type_id) {
// translates question type code number into actual name
switch ($type_id) {
case TRUEFALSE:
$name = 'truefalse';
break;
case MULTICHOICE:
$name = 'multichoice';
break;
case SHORTANSWER:
$name = 'shortanswer';
break;
case NUMERICAL:
$name = 'numerical';
break;
case MATCH:
$name = 'matching';
break;
case DESCRIPTION:
$name = 'description';
break;
case MULTIANSWER:
$name = 'multianswer';
break;
default:
$name = 'Unknown';
}
return $name;
}