]> git.mjollnir.org Git - moodle.git/commitdiff
CLeaned up the code for the little buttons Thanks David Scotson!
authormoodler <moodler>
Wed, 28 Jul 2004 11:52:39 +0000 (11:52 +0000)
committermoodler <moodler>
Wed, 28 Jul 2004 11:52:39 +0000 (11:52 +0000)
course/lib.php

index 3b367d7ec8c9e4ebd5a63da2b878c04410e2620b..401c2ac8d8d6191a64c85eb2da60eee7ec6a5976 100644 (file)
@@ -1608,10 +1608,11 @@ function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=-
 
     if ($mod->visible) {
         $hideshow = "<a title=\"$str->hide\" href=\"$path/mod.php?hide=$mod->id\"><img".
-                    " src=\"$pixpath/t/hide.gif\" hspace=2 height=11 width=11 border=0></a> ";
+                    " src=\"$pixpath/t/hide.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\" alt=\"$str->hide\"></a> ";
     } else {
         $hideshow = "<a title=\"$str->show\" href=\"$path/mod.php?show=$mod->id\"><img".
-                    " src=\"$pixpath/t/show.gif\" hspace=2 height=11 width=11 border=0></a> ";
+                    " src=\"$pixpath/t/show.gif\" hspace=\"2\" height=\"11\" width=\"11\" ".
+                    "border=\"0\" alt=\"$str->show\"></a> ";
     }
     if ($mod->groupmode !== false) {
         if ($mod->groupmode == SEPARATEGROUPS) {
@@ -1629,10 +1630,12 @@ function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=-
         }
         if ($mod->groupmodelink) {
             $groupmode = "<a title=\"$grouptitle ($str->clicktochange)\" href=\"$grouplink\">".
-                         "<img src=\"$groupimage\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\"></a>";
+                         "<img src=\"$groupimage\" hspace=\"2\" height=\"11\" width=\"11\" ".
+                         "border=\"0\" alt=\"$grouptitle\"></a>";
         } else {
             $groupmode = "<img title=\"$grouptitle ($str->forcedmode)\" ".
-                         " src=\"$groupimage\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\">";
+                         " src=\"$groupimage\" hspace=\"2\" height=\"11\" width=\"11\" ".
+                         "border=\"0\" alt=\"$grouptitle\">";
         }
     } else {
         $groupmode = "";
@@ -1640,31 +1643,38 @@ function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=-
 
     if ($moveselect) {
         $move =     "<a title=\"$str->move\" href=\"$path/mod.php?copy=$mod->id\"><img".
-                    " src=\"$pixpath/t/move.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\"></a>";
+                    " src=\"$pixpath/t/move.gif\" hspace=\"2\" height=\"11\" width=\"11\" ".
+                    " border=\"0\" alt=\"$str->move\"></a>";
     } else {
         $move =     "<a title=\"$str->moveup\" href=\"$path/mod.php?id=$mod->id&move=-1\"><img".
-                    " src=\"$pixpath/t/up.gif\" hspace=\"2\" height=11 width=11 border=0></a>".
+                    " src=\"$pixpath/t/up.gif\" hspace=\"2\" height=\"11\" width=\"11\" ".
+                    " border=\"0\" alt=\"$str->moveup\"></a>".
                     "<a title=\"$str->movedown\" href=\"$path/mod.php?id=$mod->id&move=1\"><img".
-                    " src=\"$pixpath/t/down.gif\" hspace=\"2\" height=11 width=11 border=0></a>";
+                    " src=\"$pixpath/t/down.gif\" hspace=\"2\" height=\"11\" width=\"11\" ".
+                    " border=\"0\" alt=\"$str->movedown\"></a>";
     }
 
     $leftright = "";
     if ($indent > 0) {
         $leftright .= "<a title=\"$str->moveleft\" href=\"$path/mod.php?id=$mod->id&indent=-1\"><img".
-                      " src=\"$pixpath/t/left.gif\" hspace=\"2\" height=11 width=11 border=0></a>";
+                      " src=\"$pixpath/t/left.gif\" hspace=\"2\" height=\"11\" width=\"11\" ".
+                      " border=\"0\" alt=\"$str->moveleft\"></a>";
     }
     if ($indent >= 0) {
         $leftright .= "<a title=\"$str->moveright\" href=\"$path/mod.php?id=$mod->id&indent=1\"><img".
-                      " src=\"$pixpath/t/right.gif\" hspace=\"2\" height=11 width=11 border=0></a>";
+                      " src=\"$pixpath/t/right.gif\" hspace=\"2\" height=\"11\" width=\"11\" ".
+                      " border=\"0\" alt=\"$str->moveright\"></a>";
     }
 
     return "$leftright$move".
            "<a title=\"$str->update\" href=\"$path/mod.php?update=$mod->id\"><img".
-           " src=\"$pixpath/t/edit.gif\" hspace=\"2\" height=11 width=11 border=0></a>".
+           " src=\"$pixpath/t/edit.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\" ".
+           " alt=\"$str->update\"></a>".
       //   Following line is commented out until this feature is more definite -- martin
       //     "<a title=\"$str->duplicate\" href=\"$path/mod.php?duplicate=$mod->id\"> 2 </a>".
            "<a title=\"$str->delete\" href=\"$path/mod.php?delete=$mod->id\"><img".
-           " src=\"$pixpath/t/delete.gif\" hspace=\"2\" height=11 width=11 border=0></a>$hideshow$groupmode";
+           " src=\"$pixpath/t/delete.gif\" hspace=\"2\" height=\"11\" width=\"11\" border=\"0\" ".
+           " alt=\"$str->delete\"></a>$hideshow$groupmode";
 }
 
 ?>