]> git.mjollnir.org Git - moodle.git/commitdiff
Solved one issue that caused the show/hide option to fail.
authorstronk7 <stronk7>
Wed, 21 Apr 2004 16:18:51 +0000 (16:18 +0000)
committerstronk7 <stronk7>
Wed, 21 Apr 2004 16:18:51 +0000 (16:18 +0000)
See bug 1255 (http://moodle.org/bugs/bug.php?op=show&bugid=1255)

admin/blocks.php

index aedf3dc28fd08e1c3d4bfc813ae33da1332a68ce..ba97a6076549ddb78f3207e2e8dd812652b8b3a6 100644 (file)
         }
         $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);
 
         $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 {