From: dhawes Date: Sun, 24 Oct 2004 21:49:58 +0000 (+0000) Subject: added spacing X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=59b292077867dfa0d942da8ab565f29e3fa89b03;p=moodle.git added spacing --- diff --git a/blocks/moodleblock.class.php b/blocks/moodleblock.class.php index 48a5bc4bb4..dfb34d73bc 100644 --- a/blocks/moodleblock.class.php +++ b/blocks/moodleblock.class.php @@ -164,32 +164,32 @@ class MoodleBlock { $page->type = $this->instance->pagetype; $script = page_source_script($page); - $movebuttons .= '' . - '\"\"'; + $movebuttons .= '' . + '\"\"'; if($options & BLOCK_CONFIGURE) { - $movebuttons .= '' . - '\"\"'; + $movebuttons .= '' . + '\"\"'; } - $movebuttons .= '' . - '\"\" '; + $movebuttons .= '' . + '\"\" '; if ($options & BLOCK_MOVE_LEFT) { - $movebuttons .= '' . - '\"\"'; + $movebuttons .= '' . + '\"\"'; } if ($options & BLOCK_MOVE_UP) { - $movebuttons .= '' . - '\"\"'; + $movebuttons .= '' . + '\"\"'; } if ($options & BLOCK_MOVE_DOWN) { - $movebuttons .= '' . - '\"\"'; + $movebuttons .= '' . + '\"\"'; } if ($options & BLOCK_MOVE_RIGHT) { - $movebuttons .= '' . - '\"\"'; + $movebuttons .= '' . + '\"\"'; } $movebuttons .= ''; @@ -244,10 +244,11 @@ class MoodleBlock { } global $CFG, $USER, $THEME; print_simple_box_start('center', '', $THEME->cellheading); - include($CFG->dirroot.'/blocks/'.$this->name().'/config_global.html'); + include($CFG->dirroot.'/blocks/'. $this->name() .'/config_global.html'); print_simple_box_end(); return true; } + function handle_config($config) { // Default behavior: save all variables as $CFG properties // You don't need to override this if you 're satisfied with the above @@ -259,22 +260,27 @@ class MoodleBlock { } return true; } + function applicable_formats() { // Default case: the block can be used in all course types return array('all' => true); } + function preferred_width() { // Default case: the block wants to be 180 pixels wide return 180; } + function hide_header() { //Default, false--> the header is shown return false; } + function html_attributes() { // Default case: just an id for the block, with our name in it - return array('id' => 'block_'.$this->name()); + return array('id' => 'block_'. $this->name()); } + function load_instance($instance) { if(!empty($instance->configdata)) { $this->config = unserialize(base64_decode($instance->configdata)); @@ -283,6 +289,7 @@ class MoodleBlock { $this->instance = $instance; $this->specialization(); } + function specialization() { // Just to make sure that this method exists. return; @@ -293,7 +300,7 @@ class MoodleBlock { // If yes, then it is assumed that the block WILL USE per-instance configuration return false; } - + function instance_config_print() { // Default behavior: print the config_instance.html file // You don't need to override this if you're satisfied with the above @@ -333,7 +340,7 @@ class MoodleBlock_Nuke extends MoodleBlock { $this->content = &New stdClass; // This whole thing begs to be written for PHP >= 4.3.0 using glob(); - $dir = $CFG->dirroot.'/blocks/'.$this->name().'/nuke/'; + $dir = $CFG->dirroot .'/blocks/'. $this->name() .'/nuke/'; if($dh = @opendir($dir)) { while (($file = readdir($dh)) !== false) { $regs = array(); @@ -366,4 +373,4 @@ class MoodleBlock_Nuke extends MoodleBlock { } } -?> +?> \ No newline at end of file