Skip to content
Permalink
Browse files

MDL-45763 question: Correct random question text if set to true or false

  • Loading branch information...
merrill-oakland committed Jun 10, 2014
1 parent a871a7a commit 516a3ddc76cab540ca7b185fd6475bc00639156f
Showing with 5 additions and 4 deletions.
  1. +5 −4 question/type/random/questiontype.php
@@ -151,12 +151,13 @@ protected function set_selected_question_name($question, $randomname) {
public function save_question($question, $form) {
$form->name = '';
if ($form->questiontext) {
$form->questiontext = '1';
// In case someone set the question text to true/false in the old style, set it properly.
if ($form->questiontext['text']) {
$form->questiontext['text'] = '1';
} else {
$form->questiontext = '0';
$form->questiontext['text'] = '0';
}
$form->questiontextformat = FORMAT_MOODLE;
$form->tags = array();
// Name is not a required field for random questions, but

0 comments on commit 516a3dd

Please sign in to comment.
You can’t perform that action at this time.