MDL-75337 core: Single button - core changes

* Change all core calls toward single_button to use single_button::BUTTON_PRIMARY
    when needed
This commit is contained in:
Laurent David
2023-01-24 06:01:35 +01:00
parent 377c962f11
commit fc72a1d7b1
39 changed files with 95 additions and 59 deletions
+2 -2
View File
@@ -1225,7 +1225,7 @@ class mod_workshop_renderer extends plugin_renderer_base {
if (!$workshop->get_submission_by_author($USER->id)) {
$btnurl = new moodle_url($workshop->submission_url(), ['edit' => 'on']);
$btntxt = get_string('createsubmission', 'workshop');
$output .= $this->single_button($btnurl, $btntxt, 'get', ['primary' => true]);
$output .= $this->single_button($btnurl, $btntxt, 'get', ['type' => single_button::BUTTON_PRIMARY]);
}
}
break;
@@ -1236,7 +1236,7 @@ class mod_workshop_renderer extends plugin_renderer_base {
if ($workshop->creating_submission_allowed($USER->id)) {
$btnurl = new moodle_url($workshop->submission_url(), ['edit' => 'on']);
$btntxt = get_string('createsubmission', 'workshop');
$output .= $this->single_button($btnurl, $btntxt, 'get', ['primary' => true]);
$output .= $this->single_button($btnurl, $btntxt, 'get', ['type' => single_button::BUTTON_PRIMARY]);
}
}
}