Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-35246 - Invert all action arrows in Question Bank categories mana…

…gement, when in RTL mode
  • Loading branch information...
commit 2acaf9cfee112250de28a1c6c66cf34d133fd9a6 1 parent 5726488
@nadavkav nadavkav authored stronk7 committed
Showing with 10 additions and 2 deletions.
  1. +10 −2 lib/listlib.php
View
12 lib/listlib.php
@@ -548,6 +548,14 @@ public function set_icon_html($first, $last, $lastitem) {
$strmovedown = get_string('movedown');
$strmoveleft = get_string('maketoplevelitem', 'question');
+ if (right_to_left()) { // Exchange arrows on RTL
+ $rightarrow = 'left';
+ $leftarrow = 'right';
+ } else {
+ $rightarrow = 'right';
+ $leftarrow = 'left';
+ }
+
if (isset($this->parentlist->parentitem)) {
$parentitem = $this->parentlist->parentitem;
if (isset($parentitem->parentlist->parentitem)) {
@@ -556,7 +564,7 @@ public function set_icon_html($first, $last, $lastitem) {
$action = $strmoveleft;
}
$url = new moodle_url($this->parentlist->pageurl, (array('sesskey'=>sesskey(), 'left'=>$this->id)));
- $this->icons['left'] = $this->image_icon($action, $url, 'left');
+ $this->icons['left'] = $this->image_icon($action, $url, $leftarrow);
} else {
$this->icons['left'] = $this->image_spacer();
}
@@ -578,7 +586,7 @@ public function set_icon_html($first, $last, $lastitem) {
if (!empty($lastitem)) {
$makechildof = get_string('makechildof', 'question', $lastitem->name);
$url = new moodle_url($this->parentlist->pageurl, (array('sesskey'=>sesskey(), 'right'=>$this->id)));
- $this->icons['right'] = $this->image_icon($makechildof, $url, 'right');
+ $this->icons['right'] = $this->image_icon($makechildof, $url, $rightarrow);
} else {
$this->icons['right'] = $this->image_spacer();
}
Please sign in to comment.
Something went wrong with that request. Please try again.