mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
MDL-19692: Improvement to help icon for completion tickboxes, based on user testing
This commit is contained in:
parent
ebebf55cad
commit
e3568fde9c
@ -106,6 +106,10 @@
|
||||
|
||||
echo skip_main_destination();
|
||||
|
||||
// Print the Your progress icon if the track completion is enabled
|
||||
$completioninfo = new completion_info($course);
|
||||
$completioninfo->print_help_icon();
|
||||
|
||||
print_heading_block(get_string('topicoutline'), 'outline');
|
||||
|
||||
// Note, an ordered list would confuse - "1" could be the clipboard or summary.
|
||||
|
@ -95,7 +95,11 @@
|
||||
print_container_start();
|
||||
|
||||
echo skip_main_destination();
|
||||
|
||||
|
||||
//Print the Your progress icon if the track completion is enabled
|
||||
$completioninfo = new completion_info($course);
|
||||
$completioninfo->print_help_icon();
|
||||
|
||||
print_heading_block(get_string('weeklyoutline'), 'outline');
|
||||
|
||||
// Note, an ordered list would confuse - "1" could be the clipboard or summary.
|
||||
|
@ -1458,7 +1458,6 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
|
||||
}
|
||||
}
|
||||
if ($completionicon) {
|
||||
static $shownhelp=false;
|
||||
$imgsrc = $CFG->pixpath.'/i/completion-'.$completionicon.'.gif';
|
||||
$imgalt = get_string('completion-alt-'.$completionicon,'completion');
|
||||
if ($completion==COMPLETION_TRACKING_MANUAL && !$isediting) {
|
||||
@ -1481,10 +1480,6 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
|
||||
}
|
||||
echo "
|
||||
<form class='togglecompletion$extraclass' method='post' action='togglecompletion.php'><div>";
|
||||
if(!$shownhelp && !$isediting) {
|
||||
helpbutton('completionicons',get_string('completionicons','completion'),'completion');
|
||||
$shownhelp = true;
|
||||
}
|
||||
echo "
|
||||
<input type='hidden' name='id' value='{$mod->id}' />
|
||||
<input type='hidden' name='completionstate' value='$newstate' />
|
||||
@ -1493,10 +1488,6 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
|
||||
} else {
|
||||
// In auto mode, or when editing, the icon is just an image
|
||||
echo "<span class='autocompletion'>";
|
||||
if (!$shownhelp && !$isediting) {
|
||||
helpbutton('completionicons',get_string('completionicons','completion'),'completion');
|
||||
$shownhelp = true;
|
||||
}
|
||||
echo "<img src='$imgsrc' alt='$imgalt' title='$imgalt' /></span>";
|
||||
}
|
||||
}
|
||||
|
@ -48,4 +48,5 @@ $string['saved']='Saved';
|
||||
$string['unlockcompletion']='Unlock completion options';
|
||||
$string['writingcompletiondata']='Writing completion data';
|
||||
$string['completionicons']='progress icons';
|
||||
$string['yourprogress']='Your progress';
|
||||
?>
|
||||
|
@ -160,6 +160,20 @@ class completion_info {
|
||||
return $cm->completion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Print the Your progress help icon if the completion tracking is enabled.
|
||||
* @global object
|
||||
* @return void
|
||||
*/
|
||||
public function print_help_icon() {
|
||||
global $PAGE;
|
||||
if ($this->is_enabled() && !$PAGE->user_is_editing() && isloggedin() && !isguestuser()) {
|
||||
echo '<span class="completionprogress">'.get_string('yourprogress','completion').' ';
|
||||
helpbutton('completionicons',get_string('completionicons','completion'),'completion');
|
||||
echo '</span>';
|
||||
}
|
||||
}
|
||||
// OU specific end
|
||||
/**
|
||||
* Updates (if necessary) the completion state of activity $cm for the given
|
||||
* user.
|
||||
|
@ -2138,8 +2138,12 @@ border-width:0px;
|
||||
background:white;
|
||||
font-size:0.85em;
|
||||
}
|
||||
.course-view form.togglecompletion img.iconhelp,
|
||||
.course-view span.autocompletion img.iconhelp {
|
||||
.course-view .completionprogress {
|
||||
font-size:0.80em;
|
||||
float:right;
|
||||
padding:8px 26px 5px 5px; ;
|
||||
}
|
||||
.course-view .completionprogress img.iconhelp {
|
||||
vertical-align:top;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user