From 04786f082d90c042910329eb1e729e7e1d9d52bc Mon Sep 17 00:00:00 2001 From: jamiesensei Date: Sun, 7 Jan 2007 16:36:38 +0000 Subject: [PATCH] removing redundant files after migration to formslib and some further bug fixing in question type forms. --- question/type/description/editquestion.html | 8 ---- question/type/description/editquestion.php | 6 --- question/type/essay/editquestion.html | 17 -------- question/type/essay/editquestion.php | 12 ------ question/type/match/edit_match_form.php | 3 +- question/type/match/editquestion.html | 46 --------------------- question/type/match/editquestion.php | 37 ----------------- 7 files changed, 2 insertions(+), 127 deletions(-) delete mode 100644 question/type/description/editquestion.html delete mode 100644 question/type/description/editquestion.php delete mode 100644 question/type/essay/editquestion.html delete mode 100644 question/type/essay/editquestion.php delete mode 100644 question/type/match/editquestion.html delete mode 100644 question/type/match/editquestion.php diff --git a/question/type/description/editquestion.html b/question/type/description/editquestion.html deleted file mode 100644 index 45b0f3c84e077..0000000000000 --- a/question/type/description/editquestion.html +++ /dev/null @@ -1,8 +0,0 @@ -qtype]->print_question_form_start($question, array(), $course, $usehtmleditor, - array('defaultgrade', 'penalty')); -?> - -qtype]->print_question_form_end($question); -?> diff --git a/question/type/description/editquestion.php b/question/type/description/editquestion.php deleted file mode 100644 index c6363451bd65f..0000000000000 --- a/question/type/description/editquestion.php +++ /dev/null @@ -1,6 +0,0 @@ -dirroot/question/type/description/editquestion.html"); - -?> diff --git a/question/type/essay/editquestion.html b/question/type/essay/editquestion.html deleted file mode 100644 index a5de8dd1934fd..0000000000000 --- a/question/type/essay/editquestion.html +++ /dev/null @@ -1,17 +0,0 @@ -qtype]->print_question_form_start($question, array(), $course, $usehtmleditor); -?> - - - : - - - answer->feedback); ?> - - - -qtype]->print_replacement_options($question, $course, $contextquiz); -$QTYPES[$question->qtype]->print_question_form_end($question, '', - ''); // dont think there would ever be a different value other than 1... -?> diff --git a/question/type/essay/editquestion.php b/question/type/essay/editquestion.php deleted file mode 100644 index 26d62635459af..0000000000000 --- a/question/type/essay/editquestion.php +++ /dev/null @@ -1,12 +0,0 @@ -id)) { - $options->answer = get_record("question_answers", "question", $question->id); - } else { - $options->answer->feedback = ''; - } - - print_heading_with_help(get_string("editingessay", "quiz"), "essay", "quiz"); - require("$CFG->dirroot/question/type/essay/editquestion.html"); - -?> diff --git a/question/type/match/edit_match_form.php b/question/type/match/edit_match_form.php index e36beefd9c5cb..3684075d85c29 100644 --- a/question/type/match/edit_match_form.php +++ b/question/type/match/edit_match_form.php @@ -18,8 +18,9 @@ class question_edit_match_form extends question_edit_form { * @param object $mform the form being built. */ function definition_inner(&$mform) { - $mform->addElement('selectyesno', 'shuffleanswers', get_string('shuffle', 'quiz')); + $mform->addElement('advcheckbox', 'shuffleanswers', get_string('shuffle', 'quiz'), null, array(0,1)); $mform->setHelpButton('shuffleanswers', array('matchshuffle', get_string('shuffle','quiz'), 'quiz')); + $mform->setDefault('shuffleanswers', 1); $mform->addElement('static', 'answersinstruct', get_string('choices', 'quiz'), get_string('filloutthreequestions', 'quiz')); $mform->closeHeaderBefore('answersinstruct'); diff --git a/question/type/match/editquestion.html b/question/type/match/editquestion.html deleted file mode 100644 index 23c3a7696dd8b..0000000000000 --- a/question/type/match/editquestion.html +++ /dev/null @@ -1,46 +0,0 @@ -qtype]->print_question_form_start($question, array(), $course, $usehtmleditor); -?> - - : - -
- -
- - - - : - - shuffleanswers", ""); - helpbutton("matchshuffle", get_string("shuffle","quiz"), "quiz"); - ?> - - - - -   - - - - : - - - - - - - : - - " /> - - -qtype]->print_replacement_options($question, $course, $contextquiz); -$QTYPES[$question->qtype]->print_question_form_end($question); -?> diff --git a/question/type/match/editquestion.php b/question/type/match/editquestion.php deleted file mode 100644 index bd85367fef6cd..0000000000000 --- a/question/type/match/editquestion.php +++ /dev/null @@ -1,37 +0,0 @@ -id)) { - $options = get_record("question_match", "question", $question->id); - if (!empty($options->subquestions)) { - $oldsubquestions = get_records_list("question_match_sub", "id", $options->subquestions); - } - } else { - $options->shuffleanswers = 1; - } - - $subquestions = array(); - $subanswers = array(); - - if (!empty($oldsubquestions)) { - foreach ($oldsubquestions as $oldsubquestion) { - $subquestions[] = $oldsubquestion->questiontext; // insert questions into slots - $subanswers[] = $oldsubquestion->answertext; // insert answers into slots - } - } - - $i = count($subquestions); - $limit = QUESTION_NUMANS; - $limit = $limit <= $i ? $i+1 : $limit; - for (; $i < $limit; $i++) { - $subquestions[] = ""; // Make question slots, default as blank - $subanswers[] = ""; // Make answer slots, default as blank - } - - $yesnooptions = array(); - $yesnooptions[0] = get_string("no"); - $yesnooptions[1] = get_string("yes"); - - print_heading_with_help(get_string("editingmatch", "quiz"), "match", "quiz"); - require("$CFG->dirroot/question/type/match/editquestion.html"); - -?>