mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
When teachers view quizzes (attempting or reviewing) they see a small
link with the actual question id of that question. The link creates a popup so that they can edit that question directly.
This commit is contained in:
parent
c9a945caed
commit
a7ca4cd150
1 changed files with 23 additions and 7 deletions
|
@ -204,13 +204,30 @@ class quiz_default_questiontype {
|
||||||
}
|
}
|
||||||
|
|
||||||
function print_question_number_and_grading_details
|
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:
|
/// Print question number and grade:
|
||||||
|
|
||||||
echo '<center><b>' . $number . '</b></center>';
|
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 '<center><b>' . $number . '</b>';
|
||||||
|
if ($questionid and isteacher($courseid)) {
|
||||||
|
echo '<br /><font size="1">( ';
|
||||||
|
link_to_popup_window ($CFG->wwwroot.'//mod/quiz/question.php?id='.$questionid,
|
||||||
|
'editquestion', '#'.$questionid, 450, 550, $streditquestions);
|
||||||
|
echo ')</font>';
|
||||||
|
}
|
||||||
|
echo '</center>';
|
||||||
|
|
||||||
if (false !== $grade) {
|
if (false !== $grade) {
|
||||||
$strmarks = get_string("marks", "quiz");
|
|
||||||
//echo '<p align="center"><font size="1">';
|
//echo '<p align="center"><font size="1">';
|
||||||
echo '<br /><center><font size="1">';
|
echo '<br /><center><font size="1">';
|
||||||
if (false !== $actualgrade) {
|
if (false !== $actualgrade) {
|
||||||
|
@ -226,9 +243,7 @@ class quiz_default_questiontype {
|
||||||
if ($recentlyadded) {
|
if ($recentlyadded) {
|
||||||
echo '</td><td valign="top" align="right">';
|
echo '</td><td valign="top" align="right">';
|
||||||
// Notify the user of this recently added question
|
// Notify the user of this recently added question
|
||||||
echo '<font color="red">';
|
echo '<font color="red">'.$strrecentlyaddedquestion.'</font>';
|
||||||
echo get_string('recentlyaddedquestion', 'quiz');
|
|
||||||
echo '</font>';
|
|
||||||
echo '</td></tr><tr><td></td><td valign="top">';
|
echo '</td></tr><tr><td></td><td valign="top">';
|
||||||
|
|
||||||
} else { // The normal case
|
} else { // The normal case
|
||||||
|
@ -249,7 +264,8 @@ class quiz_default_questiontype {
|
||||||
($currentnumber,
|
($currentnumber,
|
||||||
$quiz->grade ? $question->maxgrade : false,
|
$quiz->grade ? $question->maxgrade : false,
|
||||||
empty($resultdetails) ? false : $resultdetails->grade,
|
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(
|
$this->print_question_formulation_and_controls(
|
||||||
$question, $quiz, $readonly,
|
$question, $quiz, $readonly,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue