Skip to content

Commit

Permalink
MDL-68772 mod_quiz: Navigation overlay fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Hanusch committed Jun 2, 2020
1 parent 111b293 commit 398f0ae
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 16 deletions.
13 changes: 11 additions & 2 deletions mod/quiz/classes/output/edit_renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,24 @@ public function edit_page(\quiz $quizobj, structure $structure,
$output .= $this->quiz_state_warnings($structure);

$output .= html_writer::start_div('mod_quiz-edit-top-controls');

$output .= html_writer::start_div('d-flex justify-content-between flex-wrap mb-1');
$output .= html_writer::start_div('d-flex flex-column justify-content-around');
$output .= $this->quiz_information($structure);
$output .= html_writer::end_tag('div');
$output .= $this->maximum_grade_input($structure, $pageurl);
$output .= html_writer::end_tag('div');

$output .= html_writer::start_div('d-flex justify-content-between flex-wrap mb-1');
$output .= html_writer::start_div('mod_quiz-edit-action-buttons btn-group edit-toolbar', ['role' => 'group']);
$output .= $this->repaginate_button($structure, $pageurl);
$output .= $this->selectmultiple_button($structure);
$output .= html_writer::end_tag('div');

$output .= html_writer::start_div('d-flex flex-column justify-content-around');
$output .= $this->total_marks($quizobj->get_quiz());
$output .= html_writer::end_tag('div');
$output .= html_writer::end_tag('div');

$output .= $this->selectmultiple_controls($structure);
$output .= html_writer::end_tag('div');
Expand Down Expand Up @@ -204,7 +213,7 @@ protected function repaginate_button(structure $structure, \moodle_url $pageurl)
'name' => 'repaginate',
'id' => 'repaginatecommand',
'value' => get_string('repaginatecommand', 'quiz'),
'class' => 'btn btn-secondary mb-1',
'class' => 'btn btn-secondary',
'data-header' => $header,
'data-form' => $form,
);
Expand All @@ -229,7 +238,7 @@ protected function selectmultiple_button(structure $structure) {
'name' => 'selectmultiple',
'id' => 'selectmultiplecommand',
'value' => get_string('selectmultipleitems', 'quiz'),
'class' => 'btn btn-secondary mb-1'
'class' => 'btn btn-secondary'
);
if (!$structure->can_be_edited()) {
$buttonoptions['disabled'] = 'disabled';
Expand Down
14 changes: 0 additions & 14 deletions mod/quiz/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -617,10 +617,6 @@ table.quizreviewsummary td.cell {
}

/** Mod quiz edit **/
#page-mod-quiz-edit .statusbar {
margin: 0.6em 0.4em;
}

#page-mod-quiz-edit .statusdisplay {
background-color: #ffc;
clear: both;
Expand All @@ -640,16 +636,6 @@ table.quizreviewsummary td.cell {
min-height: 2.85em;
}

@media (min-width: 576px) {
#page-mod-quiz-edit .maxgrade,
#page-mod-quiz-edit .totalpoints {
position: absolute;
right: 0;
margin: -2.85em 0 0;
padding: .2em;
}
}

@media (max-width: 576px) {
#page-mod-quiz-edit .maxgrade {
margin-bottom: 0.6em;
Expand Down

0 comments on commit 398f0ae

Please sign in to comment.