function qformat_xml::trans_single in Quiz 6.5
Same name and namespace in other branches
- 6.6 includes/moodle/question/format/xml/format.php \qformat_xml::trans_single()
 
Translate human readable single answer option to internal code number
Parameters
string name true/false:
Return value
int internal code number
1 call to qformat_xml::trans_single()
- qformat_xml::import_multichoice in includes/
moodle/ question/ format/ xml/ format.php  - import multiple choice question
 
File
- includes/
moodle/ question/ format/ xml/ format.php, line 63  
Class
Code
function trans_single($name) {
  $name = trim($name);
  if ($name == "false" || !$name) {
    return 0;
  }
  else {
    return 1;
  }
}