Solved one issue that caused the show/hide option to fail.

See bug 1255 (http://moodle.org/bugs/bug.php?op=show&bugid=1255)
This commit is contained in:
stronk7 2004-04-21 16:18:51 +00:00
parent 2aa3970439
commit acf4fe1773

View File

@ -125,6 +125,8 @@
}
$blockbyname[$blockobject->get_title()] = $block->id;
$blockobjects[$block->id] = $blockobject;
//We need to add this property to use it later (see bug 1255)
$blockobjects[$block->id]->visible = $block->visible;
}
ksort($blockbyname);
@ -162,7 +164,7 @@
$count = blocks_get_courses_using_block_by_id($blockid);
$class = ''; // Nothing fancy, by default
if ($block->visible) {
if ($blockobject->visible) {
$visible = '<a href="blocks.php?hide='.$blockid.'" title="'.$strhide.'">'.
'<img src="'.$pixpath.'/i/hide.gif" style="height: 16px; width: 16px;" /></a>';
} else {