Skip to content

Commit

Permalink
Fixes for phpdoc errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nbozhkov-ucl committed Jan 23, 2024
1 parent 49192ee commit e52c0b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions block_lifecycle.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public function get_content() {
if (manager::is_course_frozen($courseid)) {
if (has_capability("moodle/site:managecontextlocks", $context)) {
$html .= $renderer->show_unfreeze_button($courseid);
}
}
}
}

$this->content->text = $html;

Expand Down
7 changes: 4 additions & 3 deletions renderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,17 +155,18 @@ public function fetch_course_read_only_notification(): string {
/**
* Return the html for 'Unfreeze button'.
*
* @param int $courseid
* @return string
* @throws coding_exception
*/
public function show_unfreeze_button(int $courseid): string {
$context = context_course::instance($courseid);
$freezeurl = new moodle_url('/admin/lock.php', ['id' => $context->id]);
return html_writer::div(
'<a href="' . $freezeurl .' " class="btn btn-primary">' .
'<a href="' . $freezeurl .' " class="btn btn-primary">' .
get_string('button:unfreezecoursecontext', 'block_lifecycle') .
'</a>'
'</a>'
);

}
}
}

0 comments on commit e52c0b6

Please sign in to comment.