mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 20:42:22 +02:00
MDL-15498: Completion system, added help button to explain the tickboxes
This commit is contained in:
parent
be236ef508
commit
f17a0360a2
@ -1491,6 +1491,7 @@ 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) {
|
||||
@ -1501,15 +1502,24 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
|
||||
: COMPLETION_COMPLETE;
|
||||
// In manual mode the icon is a toggle form.
|
||||
echo "
|
||||
<form class='togglecompletion' method='post' action='togglecompletion.php'><div>
|
||||
<form class='togglecompletion' method='post' action='togglecompletion.php'><div>";
|
||||
if(!$shownhelp) {
|
||||
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' />
|
||||
<input type='image' src='$imgsrc' alt='$imgalt' title='$imgtitle' />
|
||||
</div></form>";
|
||||
} else {
|
||||
// In auto mode, or when editing, the icon is just an image
|
||||
echo "
|
||||
<span class='autocompletion'><img src='$imgsrc' alt='$imgalt' title='$imgalt' /></span>";
|
||||
echo "<span class='autocompletion'>";
|
||||
if(!$shownhelp) {
|
||||
helpbutton('completionicons',get_string('completionicons','completion'),'completion');
|
||||
$shownhelp=true;
|
||||
}
|
||||
echo "<img src='$imgsrc' alt='$imgalt' title='$imgalt' /></span>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -46,4 +46,5 @@ $string['restoringcompletiondata']='Writing completion data';
|
||||
$string['saved']='Saved';
|
||||
$string['unlockcompletion']='Unlock completion options';
|
||||
$string['writingcompletiondata']='Writing completion data';
|
||||
$string['completionicons']='progress icons';
|
||||
?>
|
||||
|
34
lang/en_utf8/help/completion/completionicons.html
Normal file
34
lang/en_utf8/help/completion/completionicons.html
Normal file
@ -0,0 +1,34 @@
|
||||
<h1>Progress icons</h1>
|
||||
|
||||
<p>
|
||||
Tick boxes are displayed alongside some activities. These are
|
||||
a way for you to track your progress through a course.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
When you see a box with a dotted tick mark, you can click it to tick the
|
||||
box. (You can click it again to remove the tick if you change your mind.)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
These icons are for you to keep track of your own progress, and are entirely
|
||||
optional. If you like, tick the box when you think you've finished something.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Some courses may include blank tick boxes - empty spaces which do not have a
|
||||
dotted tick mark. You can't tick these boxes yourself, but they will be ticked
|
||||
automatically according to conditions that were set up when creating the course
|
||||
website. For example, a resource might automatically be ticked after you have
|
||||
downloaded the file. (You sometimes need to reload the course page to see this
|
||||
type of change.)
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Some staff, such as your teacher, may have access to see which
|
||||
boxes you've ticked. However the information is not used in assessment and
|
||||
does not count toward your course mark. You don't need to tick boxes if you
|
||||
don't want to.
|
||||
</p>
|
||||
|
||||
|
@ -1814,9 +1814,9 @@ border-width:0px;
|
||||
display:inline;
|
||||
position:absolute;
|
||||
right:-20px;
|
||||
top:0;
|
||||
z-index:10;
|
||||
padding:0.2em 0;
|
||||
top:0;
|
||||
z-index:10;
|
||||
padding:0.2em 0;
|
||||
}
|
||||
#course-view li.activity form.togglecompletion div {
|
||||
display:inline;
|
||||
@ -1829,6 +1829,10 @@ border-width:0px;
|
||||
background:white;
|
||||
font-size:0.85em;
|
||||
}
|
||||
#course-view form.togglecompletion img.iconhelp,
|
||||
#course-view span.autocompletion img.iconhelp {
|
||||
vertical-align:top;
|
||||
}
|
||||
|
||||
#course-view ul.section,
|
||||
#site-index ul.section {
|
||||
|
Loading…
x
Reference in New Issue
Block a user