]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15498: Completion system, added help button to explain the tickboxes
authorsam_marshall <sam_marshall>
Fri, 22 Aug 2008 11:51:24 +0000 (11:51 +0000)
committersam_marshall <sam_marshall>
Fri, 22 Aug 2008 11:51:24 +0000 (11:51 +0000)
course/lib.php
lang/en_utf8/completion.php
lang/en_utf8/help/completion/completionicons.html [new file with mode: 0644]
theme/standard/styles_layout.css

index 915e6be3cd0d1b8cac740743e6962ba857305ca0..ff9e5ad341aed7f731b54cf8562f444d682761f7 100644 (file)
@@ -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>";
                     }
                 }
             }
index 38e1bd4a852db88ea181f86ff301133b3f10baa5..7b9ed60ae1326d5128866d5929bcfba92f93e165 100644 (file)
@@ -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 (file)
index 0000000..726f25b
--- /dev/null
@@ -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> 
+
+
index a38d34198ab68052f925897ba517f7329b98443b..ca64e01c2f4ee337c14ceb89ec6436f9fd2d564b 100644 (file)
@@ -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 {