question bank: MDL-18822 Highlight the last question you edited in the list

Helpful if you need to edit a lot of questions - saves you from losing your place.
Idea and patch by Oleg Sychev.
This commit is contained in:
tjhunt
2009-06-05 08:30:35 +00:00
parent a8c9711106
commit cb06574d5b
2 changed files with 7 additions and 1 deletions
+4
View File
@@ -162,6 +162,7 @@ function question_list($contexts, $pageurl, $categoryandcontext, $cm = null,
$showquestiontext = false, $addcontexts = array()) {
global $USER, $CFG, $THEME, $COURSE;
$lastchangedid=optional_param('lastchanged',0,PARAM_INT);
list($categoryid, $contextid)= explode(',', $categoryandcontext);
$qtypemenu = question_type_menu();
@@ -298,6 +299,9 @@ function question_list($contexts, $pageurl, $categoryandcontext, $cm = null,
if ($showquestiontext) {
$nameclass .= ' header';
}
if ($question->id==$lastchangedid) {
$nameclass='highlight';
}
if ($nameclass) {
$nameclass = 'class="' . $nameclass . '"';
}