diff --git a/mod/lesson/continue.php b/mod/lesson/continue.php
index 9960dafa2b7..3d9f4b20c9b 100644
--- a/mod/lesson/continue.php
+++ b/mod/lesson/continue.php
@@ -97,23 +97,17 @@ if (!$reviewmode) {
// User is modifying attempts - save button and some instructions
if (isset($USER->modattempts[$lesson->id])) {
- $url = $CFG->wwwroot.'/mod/lesson/view.php';
$content = $OUTPUT->box(get_string("gotoendoflesson", "lesson"), 'center');
$content .= $OUTPUT->box(get_string("or", "lesson"), 'center');
$content .= $OUTPUT->box(get_string("continuetonextpage", "lesson"), 'center');
- $content .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'id', 'value'=>$cm->id));
- $content .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'pageid', 'value'=>LESSON_EOL));
- $content .= html_writer::empty_tag('input', array('type'=>'submit', 'name'=>'submit', 'value'=>get_string('finish', 'lesson')));
- echo html_writer::tag('form', "
$content
", array('method'=>'post', 'action'=>$url));
+ $url = new moodle_url('/mod/lesson/view.php', array('id' => $cm->id, 'pageid' => LESSON_EOL));
+ echo $content . $OUTPUT->single_button($url, get_string('finish', 'lesson'));
}
// Review button back
if (!$result->correctanswer && !$result->noanswer && !$result->isessayquestion && !$reviewmode && $lesson->review && !$result->maxattemptsreached) {
- $url = $CFG->wwwroot.'/mod/lesson/view.php';
- $content = html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'id', 'value'=>$cm->id));
- $content .= html_writer::empty_tag('input', array('type'=>'hidden', 'name'=>'pageid', 'value'=>$page->id));
- $content .= html_writer::empty_tag('input', array('type'=>'submit', 'name'=>'submit', 'value'=>get_string('reviewquestionback', 'lesson')));
- echo html_writer::tag('form', "$content
", array('method'=>'post', 'action'=>$url));
+ $url = new moodle_url('/mod/lesson/view.php', array('id' => $cm->id, 'pageid' => $page->id));
+ echo $OUTPUT->single_button($url, get_string('reviewquestionback', 'lesson'));
}
$url = new moodle_url('/mod/lesson/view.php', array('id'=>$cm->id, 'pageid'=>$result->newpageid));