diff --git a/course/completion.js b/course/completion.js index 58e5477cac6..8e741423fbd 100644 --- a/course/completion.js +++ b/course/completion.js @@ -20,7 +20,8 @@ M.core_completion.init = function(Y) { var current = args.state.get('value'); var modulename = args.modulename.get('value'), altstr, - iconkey; + iconkey, + button = args.image.get('parentNode'); if (current == 1) { @@ -32,6 +33,7 @@ M.core_completion.init = function(Y) { iconkey = 'i/completion-manual-n'; args.state.set('value', 1); } + button.set('title', altstr); require(['core/templates', 'core/notification'], function(Templates, Notification) { Templates.renderPix(iconkey, 'core', altstr).then(function(html) { diff --git a/course/renderer.php b/course/renderer.php index b3cd9706b28..b78acb6d38c 100644 --- a/course/renderer.php +++ b/course/renderer.php @@ -551,7 +551,8 @@ class core_course_renderer extends plugin_renderer_base { $output .= html_writer::empty_tag('input', array( 'type' => 'hidden', 'name' => 'completionstate', 'value' => $newstate)); $output .= html_writer::tag('button', - $this->output->pix_icon('i/completion-' . $completionicon, $imgalt), array('class' => 'btn btn-link')); + $this->output->pix_icon('i/completion-' . $completionicon, $imgalt), + array('class' => 'btn btn-link', 'title' => $imgalt)); $output .= html_writer::end_tag('div'); $output .= html_writer::end_tag('form'); } else {