mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
quiz attempt UI NOBUG need accesshide text in the quiz navigation to say if a question has been flagged.
This commit is contained in:
parent
c2a3a44818
commit
a26246eac2
@ -1081,10 +1081,15 @@ abstract class quiz_nav_panel_base {
|
||||
|
||||
protected function get_question_button($number, $question) {
|
||||
$strstate = get_string($this->attemptobj->get_question_status($question->id), 'quiz');
|
||||
$flagstate = '';
|
||||
if ($this->attemptobj->is_question_flagged($question->id)) {
|
||||
$flagstate = get_string('flagged', 'question');
|
||||
}
|
||||
return '<a href="' . s($this->get_question_url($question)) .
|
||||
'" class="qnbutton ' . $this->get_question_state_classes($question) .
|
||||
'" id="quiznavbutton' . $question->id . '" title="' . $strstate . '">' .
|
||||
$number . ' <span class="accesshide"> (' . $strstate . ')</span></a>';
|
||||
$number . ' <span class="accesshide"> (' . $strstate . '
|
||||
<span class="flagstate">' . $flagstate . '</span>)</span></a>';
|
||||
}
|
||||
|
||||
protected function get_before_button_bits() {
|
||||
|
@ -1260,6 +1260,7 @@ function quiz_get_js_module() {
|
||||
'strings' => array(
|
||||
array('timesup', 'quiz'),
|
||||
array('functiondisabledbysecuremode', 'quiz'),
|
||||
array('flagged', 'question'),
|
||||
),
|
||||
);
|
||||
}
|
@ -118,6 +118,9 @@ M.mod_quiz.nav.update_flag_state = function(attemptid, questionid, newstate) {
|
||||
navlink.removeClass('flagged');
|
||||
if (newstate == 1) {
|
||||
navlink.addClass('flagged');
|
||||
navlink.one('.accesshide .flagstate').setContent(M.str.question.flagged);
|
||||
} else {
|
||||
navlink.one('.accesshide .flagstate').setContent('');
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user