mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
Merge branch 'wip-MDL-25927' of git://github.com/sammarshallou/moodle
This commit is contained in:
commit
4bbcdcec0d
@ -69,7 +69,7 @@ if ($editing) {
|
||||
|
||||
// Print the Your progress icon if the track completion is enabled
|
||||
$completioninfo = new completion_info($course);
|
||||
$completioninfo->print_help_icon();
|
||||
echo $completioninfo->display_help_icon();
|
||||
|
||||
echo $OUTPUT->heading(get_string('topicoutline'), 2, 'headingblock header outline');
|
||||
|
||||
|
@ -61,7 +61,7 @@ defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
//Print the Your progress icon if the track completion is enabled
|
||||
$completioninfo = new completion_info($course);
|
||||
$completioninfo->print_help_icon();
|
||||
echo $completioninfo->display_help_icon();
|
||||
|
||||
echo $OUTPUT->heading(get_string('weeklyoutline'), 2, 'headingblock header outline');
|
||||
|
||||
|
@ -207,17 +207,29 @@ class completion_info {
|
||||
}
|
||||
|
||||
/**
|
||||
* Print the Your progress help icon if the completion tracking is enabled.
|
||||
* @global object
|
||||
* Displays the 'Your progress' help icon, if completion tracking is enabled.
|
||||
* Just prints the result of display_help_icon().
|
||||
* @deprecated Use display_help_icon instead.
|
||||
* @return void
|
||||
*/
|
||||
public function print_help_icon() {
|
||||
print $this->display_help_icon();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the 'Your progress' help icon, if completion tracking is enabled.
|
||||
* @global object
|
||||
* @return string HTML code for help icon, or blank if not needed
|
||||
*/
|
||||
public function display_help_icon() {
|
||||
global $PAGE, $OUTPUT;
|
||||
$result = '';
|
||||
if ($this->is_enabled() && !$PAGE->user_is_editing() && isloggedin() && !isguestuser()) {
|
||||
echo '<span id = "completionprogressid" class="completionprogress">'.get_string('yourprogress','completion').' ';
|
||||
echo $OUTPUT->help_icon('completionicons', 'completion');
|
||||
echo '</span>';
|
||||
$result .= '<span id = "completionprogressid" class="completionprogress">'.get_string('yourprogress','completion').' ';
|
||||
$result .= $OUTPUT->help_icon('completionicons', 'completion');
|
||||
$result .= '</span>';
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user