From d04f623be4b9da74717871c22ba0a1a6a986d824 Mon Sep 17 00:00:00 2001 From: Tim Hunt Date: Wed, 11 Aug 2010 19:38:16 +0000 Subject: [PATCH] quiz editing MDL-23705 the edit icon after the question name disappears some times. It is worse with some themes and some browsers. You can still edit by clicking the question name, but that is not obvious. I moved the edit icon to the left. --- mod/quiz/locallib.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mod/quiz/locallib.php b/mod/quiz/locallib.php index 04051a1185a..20beeba7fd5 100644 --- a/mod/quiz/locallib.php +++ b/mod/quiz/locallib.php @@ -764,7 +764,7 @@ function quiz_question_action_icons($quiz, $cmid, $question, $returnurl) { * @param string $contentbeforeicon some HTML content to be added inside the link, before the icon. * @return the HTML for an edit icon, view icon, or nothing for a question (depending on permissions). */ -function quiz_question_edit_button($cmid, $question, $returnurl, $contentbeforeicon = '') { +function quiz_question_edit_button($cmid, $question, $returnurl, $contentaftericon = '') { global $CFG, $OUTPUT; // Minor efficiency saving. Only get strings once, even if there are a lot of icons on one page. @@ -790,10 +790,11 @@ function quiz_question_edit_button($cmid, $question, $returnurl, $contentbeforei if ($action) { $questionparams = array('returnurl' => $returnurl, 'cmid' => $cmid, 'id' => $question->id); $questionurl = new moodle_url("$CFG->wwwroot/question/question.php", $questionparams); - return '' . $contentbeforeicon . - '' . $action . ''; + return '' . $action . '' . $contentaftericon . + ''; } else { - return $contentbeforeicon; + return $contentaftericon; } }