MDL-20204 blocks rendering does not depend on html_component any more

This commit is contained in:
Petr Skoda
2010-02-17 18:36:26 +00:00
parent 5be262b66f
commit dd72b308ed
4 changed files with 60 additions and 54 deletions
+3 -9
View File
@@ -286,7 +286,7 @@ class block_manager {
* @return string URL for moving block $this->movingblock to this position.
*/
protected function get_move_target_url($region, $weight) {
return $this->page->url->out(false, array('bui_moveid' => $this->movingblock,
return new moodle_url($this->page->url, array('bui_moveid' => $this->movingblock,
'bui_newregion' => $region, 'bui_newweight' => $weight, 'sesskey' => sesskey()));
}
@@ -807,10 +807,7 @@ class block_manager {
if ($this->movingblock && $lastweight != $instance->instance->weight &&
$content->blockinstanceid != $this->movingblock && $lastblock != $this->movingblock) {
$bmt = new block_move_target();
$bmt->text = $strmoveblockhere;
$bmt->url = $this->get_move_target_url($region, ($lastweight + $instance->instance->weight)/2);
$results[] = $bmt;
$results[] = new block_move_target($strmoveblockhere, $this->get_move_target_url($region, ($lastweight + $instance->instance->weight)/2));
}
if ($content->blockinstanceid == $this->movingblock) {
@@ -825,10 +822,7 @@ class block_manager {
}
if ($this->movingblock && $lastblock != $this->movingblock) {
$bmt = new block_move_target();
$bmt->text = $strmoveblockhere;
$bmt->url = $this->get_move_target_url($region, $lastweight + 1);
$results[] = $bmt;
$results[] = new block_move_target($strmoveblockhere, $this->get_move_target_url($region, $lastweight + 1));
}
return $results;