match display

match display

by Tia J -
Number of replies: 0
Hello, I am trying to edit the match display so that the image appears to the left of the choices. As of right now it appears at the top. Below is the code I've edited, but it shows only one dropdown to the right cell and still displays the others below the image.

        // Shuffle the answers
        $answers = draw_rand_array($answers, count($answers));
        echo '<table border="0" cellpadding="10" align="right">';
        echo '<tr><td align="left" valign="top">';

        // Print question text and possible image
        if (!empty($question->questiontext)) {
            echo format_text($question->questiontext,
                             $question->questiontextformat,
                             NULL, $quiz->course);
                             echo '<br />';
        }
        quiz_print_possible_question_image($quiz->id, $question);
            echo '</td>';
        ///// Print the input controls //////
        foreach ($subquestions as $key => $subquestion) {
            /// Subquestion text:
            echo '<td align="left" valign="top">';
            echo format_text($subquestion->questiontext,
                $question->questiontextformat, NULL, $quiz->course);
            echo '</td>';

            /// Drop-down list:
            $menuname = $nameprefix.$subquestion->id;
            $response = isset($state->responses[$subquestion->id])
                        ? $state->responses[$subquestion->id] : '0';
            if ($options->readonly
                and $options->correct_responses
                and isset($correctanswers[$subquestion->id])
                and ($correctanswers[$subquestion->id] == $response)) {
                $class = ' class="highlight" ';
            } else {
                $class = '';
            }
            echo "<td align=\"right\" valign=\"top\" $class>";

            choose_from_menu($answers, $menuname, $response, 'choose', '', 0,
             false, $options->readonly);

            // Neither the editing interface or the database allow to provide
            // fedback for this question type.
            // However (as was pointed out in bug bug 3294) the randomsamatch
            // type which reuses this method can have feedback defined for
            // the wrapped shortanswer questions.
            if ($options->feedback
             && !empty($subquestion->options->answers[$responses[$key]]->feedback)) {
                quiz_print_comment($subquestion->options->answers[$responses[$key]]->feedback);
            }
            echo '</td></tr>';
        }
        echo '</table>';
    }


I'm unsure what further step to take. Please help! mixed
Average of ratings: -