From f17a0360a2381837038aecf6c856880e5b463e3b Mon Sep 17 00:00:00 2001 From: sam_marshall Date: Fri, 22 Aug 2008 11:51:24 +0000 Subject: [PATCH] MDL-15498: Completion system, added help button to explain the tickboxes --- course/lib.php | 16 +++++++-- lang/en_utf8/completion.php | 1 + .../help/completion/completionicons.html | 34 +++++++++++++++++++ theme/standard/styles_layout.css | 10 ++++-- 4 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 lang/en_utf8/help/completion/completionicons.html diff --git a/course/lib.php b/course/lib.php index 915e6be3cd..ff9e5ad341 100644 --- a/course/lib.php +++ b/course/lib.php @@ -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 " -
+
"; + if(!$shownhelp) { + helpbutton('completionicons',get_string('completionicons','completion'),'completion'); + $shownhelp=true; + } + echo "
"; } else { // In auto mode, or when editing, the icon is just an image - echo " -$imgalt"; + echo ""; + if(!$shownhelp) { + helpbutton('completionicons',get_string('completionicons','completion'),'completion'); + $shownhelp=true; + } + echo "$imgalt"; } } } diff --git a/lang/en_utf8/completion.php b/lang/en_utf8/completion.php index 38e1bd4a85..7b9ed60ae1 100644 --- a/lang/en_utf8/completion.php +++ b/lang/en_utf8/completion.php @@ -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'; ?> diff --git a/lang/en_utf8/help/completion/completionicons.html b/lang/en_utf8/help/completion/completionicons.html new file mode 100644 index 0000000000..726f25b0bb --- /dev/null +++ b/lang/en_utf8/help/completion/completionicons.html @@ -0,0 +1,34 @@ +

Progress icons

+ +

+Tick boxes are displayed alongside some activities. These are +a way for you to track your progress through a course. +

+ +

+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.) +

+ +

+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. +

+ +

+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.) +

+ +

+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. +

+ + diff --git a/theme/standard/styles_layout.css b/theme/standard/styles_layout.css index a38d34198a..ca64e01c2f 100644 --- a/theme/standard/styles_layout.css +++ b/theme/standard/styles_layout.css @@ -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 { -- 2.39.5