]> git.mjollnir.org Git - moodle.git/commitdiff
removing redundant files after migration to formslib and some further bug fixing...
authorjamiesensei <jamiesensei>
Sun, 7 Jan 2007 16:36:38 +0000 (16:36 +0000)
committerjamiesensei <jamiesensei>
Sun, 7 Jan 2007 16:36:38 +0000 (16:36 +0000)
question/type/description/editquestion.html [deleted file]
question/type/description/editquestion.php [deleted file]
question/type/essay/editquestion.html [deleted file]
question/type/essay/editquestion.php [deleted file]
question/type/match/edit_match_form.php
question/type/match/editquestion.html [deleted file]
question/type/match/editquestion.php [deleted file]

diff --git a/question/type/description/editquestion.html b/question/type/description/editquestion.html
deleted file mode 100644 (file)
index 45b0f3c..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<?php
-$QTYPES[$question->qtype]->print_question_form_start($question, array(), $course, $usehtmleditor,
-        array('defaultgrade', 'penalty'));
-?>
-      <input type="hidden" name="defaultgrade" value="0" />
-<?php
-$QTYPES[$question->qtype]->print_question_form_end($question);
-?>
diff --git a/question/type/description/editquestion.php b/question/type/description/editquestion.php
deleted file mode 100644 (file)
index c636345..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php // $Id$
-
-    print_heading_with_help(get_string("editingdescription", "quiz"), "description", "quiz");
-    require("$CFG->dirroot/question/type/description/editquestion.html");
-
-?>
diff --git a/question/type/essay/editquestion.html b/question/type/essay/editquestion.html
deleted file mode 100644 (file)
index a5de8dd..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<?php
-$QTYPES[$question->qtype]->print_question_form_start($question, array(), $course, $usehtmleditor);
-?>
-<tr valign="top">
-    <td align="right">
-        <b><?php print_string("feedback", "quiz") ?>:</b>
-    </td>
-    <td>
-        <?php print_textarea(false, 10, 60, 630, 200, "feedback", $options->answer->feedback); ?>
-    </td>
-</tr>
-
-<?php
-$QTYPES[$question->qtype]->print_replacement_options($question, $course, $contextquiz);
-$QTYPES[$question->qtype]->print_question_form_end($question, '',
-        '<input type="hidden" name="fraction" value="0" />'); // 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 (file)
index 26d6263..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php // $Id$
-
-    if (!empty($question->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");
-
-?>
index e36beefd9c5cb33c09bc601ed81f7ad800db0b47..3684075d85c298f566a8308b24ff5b5d11884554 100644 (file)
@@ -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 (file)
index 23c3a76..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-$QTYPES[$question->qtype]->print_question_form_start($question, array(), $course, $usehtmleditor);
-?>
-  <tr valign="top">
-    <td align="right"><b><?php print_string("choices", "quiz") ?></b>:</td>
-    <td align="left">
-      <div style="width: 30em">
-        <?php print_string("filloutthreequestions", "quiz") ?>
-      </div>
-    </td>
-  </tr>
-  <tr valign="top">
-    <td align="right"><b><?php print_string("shuffle", "quiz") ?>:</b></td>
-    <td align="left">
-    <?php
-      choose_from_menu($yesnooptions, "shuffleanswers", "$options->shuffleanswers", "");
-      helpbutton("matchshuffle", get_string("shuffle","quiz"), "quiz");
-    ?>
-    </td>
-  </tr>
-<?php
-for ($i=1; $i <= count($subquestions); $i++) {
-?>
-  <tr valign="top">
-    <td colspan="2">&nbsp;</td>
-  </tr>
-
-  <tr valign="top">
-    <td align="right"><b><?php print_string("questionno", "quiz", $i) ?>:</b></td>
-    <td align="left">
-      <textarea name="subquestions[]" rows="3" cols="50"><?php p($subquestions[$i-1]) ?></textarea>
-    </td>
-  </tr>
-
-  <tr valign="top">
-    <td align="right"><b><?php print_string("matchanswerno", "quiz", $i) ?>:</b></td>
-    <td align="left">
-      <input type="text" name="subanswers[]" size="50" value="<?php p($subanswers[$i-1]) ?>" alt="<?php print_string("matchanswerno", "quiz", $i) ?>" />
-    </td>
-  </tr>
-<?php
-}
-
-$QTYPES[$question->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 (file)
index bd85367..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php // $Id$
-
-    if (!empty($question->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");
-
-?>