Merge branch 'MDL-64528-master' of https://github.com/mackensen/moodle

This commit is contained in:
Eloy Lafuente (stronk7) 2019-01-30 21:21:26 +01:00
commit 6ada5b713b
5 changed files with 13 additions and 1 deletions

View file

@ -468,7 +468,7 @@ class core_course_renderer extends plugin_renderer_base {
$imgalt = get_string('completion-alt-' . $completionicon, 'completion', $formattedname);
}
if ($this->page->user_is_editing()) {
if ($this->page->user_is_editing() || !has_capability('moodle/course:togglecompletion', $mod->context)) {
// When editing, the icon is just an image.
$completionpixicon = new pix_icon('i/completion-'.$completionicon, $imgalt, '',
array('title' => $imgalt, 'class' => 'iconsmall'));