Skip to content

Commit

Permalink
Merge branch 'WIP-MDL-35246' of git://github.com/nadavkav/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Sep 26, 2012
2 parents d863a99 + 1b04d0f commit 21ba954
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions lib/listlib.php
Expand Up @@ -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)) {
Expand All @@ -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();
}
Expand All @@ -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();
}
Expand Down

0 comments on commit 21ba954

Please sign in to comment.