+++ /dev/null
-<?php
-$QTYPES[$question->qtype]->print_question_form_start($question, array(), $course, $usehtmleditor);
-?>
- <tr valign="top">
- <td align="right"><b><?php print_string("answerhowmany", "qtype_multichoice") ?>:</b></td>
- <td align="left">
- <?php
- $menu[0] = get_string("answersingleno", "qtype_multichoice");
- $menu[1] = get_string("answersingleyes", "qtype_multichoice");
- choose_from_menu($menu, "single", "$options->single", "");
- unset($menu);
- ?>
- </td>
- </tr>
-<tr valign="top">
- <td align="right"><b><?php print_string("shuffleanswers", "qtype_multichoice") ?>:</b></td>
- <td align="left">
- <?php
- choose_from_menu($yesnooptions, "shuffleanswers", "$options->shuffleanswers", "");
- helpbutton("multichoiceshuffle", get_string("shuffleanswers","qtype_multichoice"), "quiz");
- ?>
- </td>
-</tr>
- <tr valign="top">
- <td align="right"><b><?php print_string("choices", "qtype_multichoice") ?></b>:</td>
- <td align="left"><?php print_string("fillouttwochoices", "qtype_multichoice") ?></td>
- </tr>
-
-<?php
-for ($i=1; $i<=count($answers); $i++) {
- if (!isset($answers[$i-1]->fraction)) {
- $answers[$i-1]->answer = '';
- $answers[$i-1]->fraction = 0;
- $answers[$i-1]->feedback = '';
- }
-?>
-
- <tr valign="top">
- <td align="right"><b><?php print_string("choiceno", "qtype_multichoice", $i); ?>:</b></td>
- <td align="left">
- <input type="text" name="answer[]" size="50" value="<?php p($answers[$i-1]->answer) ?>" />
- <?php
- print_string("grade");
- echo ": ";
- choose_from_menu($gradeoptionsfull, "fraction[]", $answers[$i-1]->fraction, "");
- ?>
- <br />
- </td>
- </tr>
-
- <tr valign="top">
- <td align="right"><b><?php print_string("feedback", "qtype_multichoice") ?>:</b></td>
- <td align="left">
- <textarea name="feedback[]" rows="2" cols="50"><?php p($answers[$i-1]->feedback) ?></textarea>
- </td>
- </tr>
-
- <tr valign="top">
- <td colspan="2"> </td>
- </tr>
-
-<?php
-} /// End of loop, printing answers
-?>
- <tr valign="top">
- <td align="right"><b><?php print_string("overallcorrectfeedback", "qtype_multichoice") ?>:</b></td>
- <td align="left">
- <textarea name="correctfeedback" rows="4" cols="50"><?php p($options->correctfeedback) ?></textarea>
- </td>
- </tr>
-
- <tr valign="top">
- <td align="right"><b><?php print_string("overallpartiallycorrectfeedback", "qtype_multichoice") ?>:</b></td>
- <td align="left">
- <textarea name="partiallycorrectfeedback" rows="4" cols="50"><?php p($options->partiallycorrectfeedback) ?></textarea>
- </td>
- </tr>
-
- <tr valign="top">
- <td align="right"><b><?php print_string("overallincorrectfeedback", "qtype_multichoice") ?>:</b></td>
- <td align="left">
- <textarea name="incorrectfeedback" rows="4" cols="50"><?php p($options->incorrectfeedback) ?></textarea>
- </td>
- </tr>
-
- <tr valign="top">
- <td colspan="2"> </td>
- </tr>
-
-<?php
-$QTYPES[$question->qtype]->print_replacement_options($question, $course, $contextquiz);
-$QTYPES[$question->qtype]->print_question_form_end($question);
-?>
+++ /dev/null
-<?php // $Id$
-
- if (!empty($question->id)) {
- $options = get_record("question_multichoice", "question", $question->id);
- } else {
- $options->single = 1;
- $options->shuffleanswers = 1;
- $options->correctfeedback = '';
- $options->partiallycorrectfeedback = '';
- $options->incorrectfeedback = '';
- }
- if (!empty($options->answers)) {
- $answersraw = get_records_list("question_answers", "id", $options->answers);
-
- }
-
- $answers = array();
- if (!empty($answersraw)) {
- foreach ($answersraw as $answer) {
- $answers[] = $answer; // insert answers into slots
- }
- }
-
- $i = count($answers);
- $limit = QUESTION_NUMANS;
- $limit = $limit <= $i ? $i+1 : $limit;
- for (; $i < $limit; $i++) {
- $answers[] = ""; // Make answer slots, default as blank
- }
-
- $yesnooptions = array();
- $yesnooptions[0] = get_string("no");
- $yesnooptions[1] = get_string("yes");
-
- print_heading_with_help(get_string("editingmultichoice", "qtype_multichoice"), "multichoice", "quiz");
- require("$CFG->dirroot/question/type/multichoice/editquestion.html");
-
-?>