diff --git a/mod/quiz/lib.php b/mod/quiz/lib.php
index 53394e99cd5fa..929b4db0322f1 100644
--- a/mod/quiz/lib.php
+++ b/mod/quiz/lib.php
@@ -204,13 +204,30 @@ function extract_response($rawresponse, $nameprefix) {
}
function print_question_number_and_grading_details
- ($number, $grade, $actualgrade=false, $recentlyadded=false) {
+ ($number, $grade, $actualgrade=false, $recentlyadded=false, $questionid=0, $courseid=0) {
/// Print question number and grade:
- echo '
' . $number . '';
+ global $CFG;
+
+ static $streditquestions, $strmarks, $strrecentlyaddedquestion;
+
+ if (!isset($streditquestions)) {
+ $streditquestions = get_string('editquestions', 'quiz');
+ $strmarks = get_string('marks', 'quiz');
+ $strrecentlyaddedquestion = get_string('recentlyaddedquestion', 'quiz');
+ }
+
+ echo '' . $number . '';
+ if ($questionid and isteacher($courseid)) {
+ echo '
( ';
+ link_to_popup_window ($CFG->wwwroot.'//mod/quiz/question.php?id='.$questionid,
+ 'editquestion', '#'.$questionid, 450, 550, $streditquestions);
+ echo ')';
+ }
+ echo '';
+
if (false !== $grade) {
- $strmarks = get_string("marks", "quiz");
//echo '';
echo '
';
if (false !== $actualgrade) {
@@ -226,9 +243,7 @@ function print_question_number_and_grading_details
if ($recentlyadded) {
echo '';
// Notify the user of this recently added question
- echo '';
- echo get_string('recentlyaddedquestion', 'quiz');
- echo '';
+ echo ''.$strrecentlyaddedquestion.'';
echo ' | | ';
} else { // The normal case
@@ -249,7 +264,8 @@ function print_question($currentnumber, $quiz, $question,
($currentnumber,
$quiz->grade ? $question->maxgrade : false,
empty($resultdetails) ? false : $resultdetails->grade,
- isset($question->recentlyadded) ? $question->recentlyadded : false);
+ isset($question->recentlyadded) ? $question->recentlyadded : false,
+ $question->id, $quiz->course);
$this->print_question_formulation_and_controls(
$question, $quiz, $readonly,
|