]> git.mjollnir.org Git - moodle.git/commitdiff
Patch for left-right buttons in course view MDL-10768
authormoodler <moodler>
Thu, 9 Aug 2007 07:50:21 +0000 (07:50 +0000)
committermoodler <moodler>
Thu, 9 Aug 2007 07:50:21 +0000 (07:50 +0000)
course/lib.php

index 48ec9e4a29a2db8a709fc47073bd2352a568e036..da854df39f5fbd695bcdd95e97e2614897d6545f 100644 (file)
@@ -2319,18 +2319,27 @@ function make_editing_buttons($mod, $absolute=false, $moveselect=true, $indent=-
         $move = '';  
     }
 
-    $leftright = "";
+    $leftright = '';
     if (has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $mod->course))) {
+
+           if (get_string('thisdirection') == 'rtl') {   // Exchange arrows on RTL
+                   $rightarrow = 'left.gif';
+                   $leftarrow  = 'right.gif';
+           } else {
+               $rightarrow = 'right.gif';
+               $leftarrow  = 'left.gif';
+        }
+    
         if ($indent > 0) {
             $leftright .= '<a class="editing_moveleft" title="'.$str->moveleft.'" href="'.$path.'/mod.php?id='.$mod->id.
                         '&amp;indent=-1&amp;sesskey='.$sesskey.$section.'"><img'.
-                        ' src="'.$CFG->pixpath.'/t/left.gif" class="iconsmall" '.
+                        ' src="'.$CFG->pixpath.'/t/'.$leftarrow.'" class="iconsmall" '.
                         ' alt="'.$str->moveleft.'" /></a>'."\n";
         }
         if ($indent >= 0) {
             $leftright .= '<a class="editing_moveright" title="'.$str->moveright.'" href="'.$path.'/mod.php?id='.$mod->id.
                         '&amp;indent=1&amp;sesskey='.$sesskey.$section.'"><img'.
-                        ' src="'.$CFG->pixpath.'/t/right.gif" class="iconsmall" '.
+                        ' src="'.$CFG->pixpath.'/t/'.$rightarrow.'" class="iconsmall" '.
                         ' alt="'.$str->moveright.'" /></a>'."\n";
         }
     }