Skip to content

Commit

Permalink
Simplify function
Browse files Browse the repository at this point in the history
  • Loading branch information
nbozhkov-ucl committed Jan 23, 2024
1 parent d28225e commit 49192ee
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,14 +160,12 @@ public function fetch_course_read_only_notification(): string {
*/
public function show_unfreeze_button(int $courseid): string {
$context = context_course::instance($courseid);
$content ='';
$freezeurl = new moodle_url('/admin/lock.php', ['id' => $context->id]);
$content .= html_writer::div(
return html_writer::div(
'<a href="' . $freezeurl .' " class="btn btn-primary">' .
get_string('button:unfreezecoursecontext', 'block_lifecycle') .
'</a>'
);

return $content;
}
}

0 comments on commit 49192ee

Please sign in to comment.