mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-61056 feedback: Fix the response navigation links
Floats are evil and unreliable. Even with the clearfix class added to the response_navigation wrapper, the Next link would remain unaligned. We need a proper three columns layout here. It did not feel necessary to introduce a special template here so I'm making use of the core one.
This commit is contained in:
parent
95b7be7f05
commit
c581517dd7
@ -119,10 +119,24 @@ if ($userid || $showcompleted) {
|
||||
$anonresponsestable->get_reponse_navigation_links($completedrecord);
|
||||
|
||||
echo html_writer::start_div('response_navigation');
|
||||
echo $prevresponseurl ? html_writer::link($prevresponseurl, get_string('prev'), ['class' => 'prev_response']) : '';
|
||||
echo html_writer::link($returnurl, get_string('back'), ['class' => 'back_to_list']);
|
||||
echo $nextresponseurl ? html_writer::link($nextresponseurl, get_string('next'), ['class' => 'next_response']) : '';
|
||||
|
||||
$responsenavigation = [
|
||||
'col1content' => '',
|
||||
'col2content' => html_writer::link($returnurl, get_string('back'), ['class' => 'back_to_list']),
|
||||
'col3content' => '',
|
||||
];
|
||||
|
||||
if ($prevresponseurl) {
|
||||
$responsenavigation['col1content'] = html_writer::link($prevresponseurl, get_string('prev'), ['class' => 'prev_response']);
|
||||
}
|
||||
|
||||
if ($nextresponseurl) {
|
||||
$responsenavigation['col3content'] = html_writer::link($nextresponseurl, get_string('next'), ['class' => 'next_response']);
|
||||
}
|
||||
|
||||
echo $OUTPUT->render_from_template('core/columns-1to1to1', $responsenavigation);
|
||||
echo html_writer::end_div();
|
||||
|
||||
} else {
|
||||
// Print the list of responses.
|
||||
$courseselectform->display();
|
||||
|
@ -86,14 +86,11 @@
|
||||
}
|
||||
|
||||
.path-mod-feedback .response_navigation a {
|
||||
display: inline-block;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.path-mod-feedback .response_navigation a.back_to_list {
|
||||
margin: auto;
|
||||
float: right;
|
||||
left: -50%;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.path-mod-feedback .response_navigation .prev_response:before {
|
||||
@ -113,9 +110,9 @@
|
||||
}
|
||||
|
||||
.path-mod-feedback .response_navigation .next_response {
|
||||
float: right;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.path-mod-feedback .response_navigation .prev_response {
|
||||
float: left;
|
||||
text-align: left;
|
||||
}
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$plugin->version = 2017111300; // The current module version (Date: YYYYMMDDXX)
|
||||
$plugin->version = 2017121800; // The current module version (Date: YYYYMMDDXX)
|
||||
$plugin->requires = 2017110800; // Requires this Moodle version
|
||||
$plugin->component = 'mod_feedback'; // Full name of the plugin (used for diagnostics)
|
||||
$plugin->cron = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user