Bug 6239 - Allow questions to have some teacher-supplied commentary.
While implementing this, I removed the ~100 lines of very similar code from the top of each question type's editquestion.html template, and moved this to a the function print_question_form_start() in the base class, which uses the template question/type/editquestionstart.html. This is described in more detail here: http://moodle.org/mod/forum/discuss.php?d=51590, and is why this patch makes the codebase 523 lines smaller.
This commit is contained in:
@@ -339,18 +339,19 @@ function question_list($course, $categoryid, $quizid=0,
|
||||
echo "<a title=\"$straddtoquiz\" href=\"edit.php?addquestion=$question->id&quizid=$quizid&sesskey=$USER->sesskey\"><img
|
||||
src=\"$CFG->pixpath/t/moveleft.gif\" border=\"0\" alt=\"$straddtoquiz\" /></a> ";
|
||||
}
|
||||
echo "<a title=\"$strpreview\" href=\"javascript:void();\" onClick=\"openpopup('/question/preview.php?id=$question->id&quizid=$quizid','$strpreview','scrollbars=yes,resizable=yes,width=700,height=480', false)\"><img
|
||||
src=\"$CFG->pixpath/t/preview.gif\" border=\"0\" alt=\"$strpreview\" /></a> ";
|
||||
echo "<a title=\"$strpreview\" href=\"javascript:void();\" onClick=\"openpopup('/question/preview.php?id=$question->id&quizid=$quizid','$strpreview', " .
|
||||
QUESTION_PREVIEW_POPUP_OPTIONS . ", false)\"><img
|
||||
src=\"$CFG->pixpath/t/preview.gif\" border=\"0\" alt=\"$strpreview\" /></a> ";
|
||||
if ($canedit) {
|
||||
echo "<a title=\"$stredit\" href=\"$CFG->wwwroot/question/question.php?id=$question->id\"><img
|
||||
src=\"$CFG->pixpath/t/edit.gif\" border=\"0\" alt=\"$stredit\" /></a> ";
|
||||
src=\"$CFG->pixpath/t/edit.gif\" border=\"0\" alt=\"$stredit\" /></a> ";
|
||||
// hide-feature
|
||||
if($question->hidden) {
|
||||
echo "<a title=\"$strrestore\" href=\"edit.php?courseid=$course->id&unhide=$question->id&sesskey=$USER->sesskey\"><img
|
||||
src=\"$CFG->pixpath/t/restore.gif\" border=\"0\" alt=\"$strrestore\" /></a>";
|
||||
src=\"$CFG->pixpath/t/restore.gif\" border=\"0\" alt=\"$strrestore\" /></a>";
|
||||
} else {
|
||||
echo "<a title=\"$strdelete\" href=\"edit.php?courseid=$course->id&deleteselected=$question->id&q$question->id=1\"><img
|
||||
src=\"$CFG->pixpath/t/delete.gif\" border=\"0\" alt=\"$strdelete\" /></a>";
|
||||
src=\"$CFG->pixpath/t/delete.gif\" border=\"0\" alt=\"$strdelete\" /></a>";
|
||||
}
|
||||
}
|
||||
echo " <input title=\"$strselect\" type=\"checkbox\" name=\"q$question->id\" value=\"1\" />";
|
||||
|
||||
Reference in New Issue
Block a user