MDL-21198 $OUTPUT->single_button() resurrection, hopefully much easier to use than $OUTPUT->button(); fixed some regressions and code style improvements

This commit is contained in:
Petr Skoda
2010-01-03 15:46:14 +00:00
parent 3cd5305f11
commit 5c2ed7e215
62 changed files with 170 additions and 243 deletions
+2 -3
View File
@@ -507,9 +507,8 @@ if ($pageid != LESSON_EOL) {
}
if (!$highscores or $madeit) {
$lessoncontent .= $lessonoutput->paragraph(get_string("youmadehighscore", "lesson", $lesson->maxhighscores), 'center');
$params = array('id'=>$PAGE->cm->id, 'sesskey'=>sesskey());
$highscoresbutton = html_form::make_button($CFG->wwwroot.'/mod/lesson/highscores.php', $params, get_string('clicktopost', 'lesson'));
$lessoncontent .= $OUTPUT->button($highscoresbutton);
$aurl = new moodle_url($CFG->wwwroot.'/mod/lesson/highscores.php', array('id'=>$PAGE->cm->id, 'sesskey'=>sesskey()));
$lessoncontent .= $OUTPUT->single_button($aurl, get_string('clicktopost', 'lesson'));
} else {
$lessoncontent .= get_string("nothighscore", "lesson", $lesson->maxhighscores)."<br />";
}