function print_question_formulation_and_controls(&$question, &$state, $cmoptions, $options) { global $CFG; // global feedback if ($options->feedback) { if ($state->raw_grade >= $question->options->feedbackfraction * $question->maxgrade) { if (!empty($question->options->feedbackok)) { $feedback = $question->options->feedbackok; } } else { if (!empty($question->options->feedbackmissed)) { $feedback = $question->options->feedbackmissed; } } if ($feedback) { echo '<table border="1" width="100%"><tr><td><b>'; echo get_string('feedbackoverall', 'qtype_dragdrop') . ':</b> '; echo $feedback; echo '</td></tr></table>'; } } // the actual rendering is handled by the dragdrop class include_once "{$CFG->dirroot}/question/type/dragdrop/dragdrop.php"; $dd = new dragdrop($CFG, $question->id, $cmoptions->course, 0, 0, $options, $question, $state); $dd->display_question(); }