mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-65056 completion: Hide checkboxes on course page for teachers
This commit is contained in:
parent
019004dcc7
commit
d6cea5ccd9
5 changed files with 174 additions and 29 deletions
|
@ -319,9 +319,10 @@ class completion_info {
|
|||
* @return string HTML code for help icon, or blank if not needed
|
||||
*/
|
||||
public function display_help_icon() {
|
||||
global $PAGE, $OUTPUT;
|
||||
global $PAGE, $OUTPUT, $USER;
|
||||
$result = '';
|
||||
if ($this->is_enabled() && !$PAGE->user_is_editing() && isloggedin() && !isguestuser()) {
|
||||
if ($this->is_enabled() && !$PAGE->user_is_editing() && $this->is_tracked_user($USER->id) && isloggedin() &&
|
||||
!isguestuser()) {
|
||||
$result .= html_writer::tag('div', get_string('yourprogress','completion') .
|
||||
$OUTPUT->help_icon('completionicons', 'completion'), array('id' => 'completionprogressid',
|
||||
'class' => 'completionprogress'));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue