mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-67653 questions: prevent the flag flickering as the page loads
This commit is contained in:
parent
77d1c41502
commit
76a49e4a1e
@ -39,10 +39,6 @@
|
||||
border: 1px solid #dcdcdc;
|
||||
}
|
||||
|
||||
body.jsenabled .questionflagcheckbox {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#page-mod-quiz-attempt #connection-ok,
|
||||
#page-mod-quiz-attempt #connection-error {
|
||||
position: fixed;
|
||||
|
@ -323,21 +323,23 @@ class core_question_renderer extends plugin_renderer_base {
|
||||
if ($flagged) {
|
||||
$icon = 'i/flagged';
|
||||
$alt = get_string('flagged', 'question');
|
||||
$label = get_string('clickunflag', 'question');
|
||||
} else {
|
||||
$icon = 'i/unflagged';
|
||||
$alt = get_string('notflagged', 'question');
|
||||
$label = get_string('clickflag', 'question');
|
||||
}
|
||||
$attributes = array(
|
||||
'src' => $this->image_url($icon),
|
||||
'alt' => $alt,
|
||||
'class' => 'questionflagimage',
|
||||
);
|
||||
if ($id) {
|
||||
$attributes['id'] = $id;
|
||||
}
|
||||
$img = html_writer::empty_tag('img', $attributes);
|
||||
if ($flagged) {
|
||||
$img .= ' ' . get_string('flagged', 'question');
|
||||
}
|
||||
$img .= html_writer::span($label);
|
||||
|
||||
return $img;
|
||||
}
|
||||
|
||||
|
@ -409,7 +409,11 @@ body.path-question-type {
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
|
||||
.que input.questionflagimage {
|
||||
body.jsenabled .questionflag input[type=checkbox] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.que .questionflagimage {
|
||||
padding-right: 3px;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
|
@ -15014,7 +15014,10 @@ body.path-question-type {
|
||||
.que .questioncorrectnessicon {
|
||||
vertical-align: text-bottom; }
|
||||
|
||||
.que input.questionflagimage {
|
||||
body.jsenabled .questionflag input[type=checkbox] {
|
||||
display: none; }
|
||||
|
||||
.que .questionflagimage {
|
||||
padding-right: 3px;
|
||||
height: 16px;
|
||||
width: 16px; }
|
||||
|
@ -15234,7 +15234,10 @@ body.path-question-type {
|
||||
.que .questioncorrectnessicon {
|
||||
vertical-align: text-bottom; }
|
||||
|
||||
.que input.questionflagimage {
|
||||
body.jsenabled .questionflag input[type=checkbox] {
|
||||
display: none; }
|
||||
|
||||
.que .questionflagimage {
|
||||
padding-right: 3px;
|
||||
height: 16px;
|
||||
width: 16px; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user