Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added spacing

  • Loading branch information...
commit 59b292077867dfa0d942da8ab565f29e3fa89b03 1 parent 763692f
dhawes authored
Showing with 26 additions and 19 deletions.
  1. +26 −19 blocks/moodleblock.class.php
View
45 blocks/moodleblock.class.php
@@ -164,32 +164,32 @@ function add_edit_controls($options) {
$page->type = $this->instance->pagetype;
$script = page_source_script($page);
- $movebuttons .= '<a style="margin-right: 6px; margin-left: 2px;" title="'.$title.'" href="'.$script.'&amp;blockaction=toggle&amp;instanceid='.$this->instance->id.$sesskeystr.'">' .
- '<img src="'.$pixpath.$icon.'" alt=\"\" /></a>';
+ $movebuttons .= '<a style="margin-right: 6px; margin-left: 2px;" title="'. $title .'" href="'.$script.'&amp;blockaction=toggle&amp;instanceid='. $this->instance->id . $sesskeystr .'">' .
+ '<img src="'. $pixpath.$icon .'" alt=\"\" /></a>';
if($options & BLOCK_CONFIGURE) {
- $movebuttons .= '<a style="margin-right: 6px; margin-left: 2px;" title="'.$this->str->configure.'" href="'.$script.'&amp;blockaction=config&amp;instanceid='.$this->instance->id.$sesskeystr.'">' .
- '<img src="'.$pixpath.'/t/edit.gif" alt=\"\" /></a>';
+ $movebuttons .= '<a style="margin-right: 6px; margin-left: 2px;" title="'. $this->str->configure .'" href="'. $script .'&amp;blockaction=config&amp;instanceid='. $this->instance->id.$sesskeystr .'">' .
+ '<img src="'. $pixpath .'/t/edit.gif" alt=\"\" /></a>';
}
- $movebuttons .= '<a style="margin-right: 2px; margin-left: 2px;" title="'.$this->str->delete.'" href="'.$script.'&amp;blockaction=delete&amp;instanceid='.$this->instance->id.$sesskeystr.'">' .
- '<img src="'.$pixpath.'/t/delete.gif" alt=\"\" /></a> ';
+ $movebuttons .= '<a style="margin-right: 2px; margin-left: 2px;" title="'. $this->str->delete .'" href="'. $script .'&amp;blockaction=delete&amp;instanceid='. $this->instance->id.$sesskeystr .'">' .
+ '<img src="'. $pixpath .'/t/delete.gif" alt=\"\" /></a> ';
if ($options & BLOCK_MOVE_LEFT) {
- $movebuttons .= '<a style="margin-right: 2px; margin-left: 2px;" title="'.$this->str->moveleft.'" href="'.$script.'&amp;blockaction=moveleft&amp;instanceid='.$this->instance->id.$sesskeystr.'">' .
- '<img src="'.$pixpath.'/t/left.gif" alt=\"\" /></a>';
+ $movebuttons .= '<a style="margin-right: 2px; margin-left: 2px;" title="'. $this->str->moveleft .'" href="'. $script .'&amp;blockaction=moveleft&amp;instanceid='. $this->instance->id.$sesskeystr .'">' .
+ '<img src="'. $pixpath .'/t/left.gif" alt=\"\" /></a>';
}
if ($options & BLOCK_MOVE_UP) {
- $movebuttons .= '<a style="margin-right: 2px; margin-left: 2px;" title="'.$this->str->moveup.'" href="'.$script.'&amp;blockaction=moveup&amp;instanceid='.$this->instance->id.$sesskeystr.'">' .
- '<img src="'.$pixpath.'/t/up.gif" alt=\"\" /></a>';
+ $movebuttons .= '<a style="margin-right: 2px; margin-left: 2px;" title="'. $this->str->moveup .'" href="'. $script .'&amp;blockaction=moveup&amp;instanceid='. $this->instance->id.$sesskeystr .'">' .
+ '<img src="'. $pixpath .'/t/up.gif" alt=\"\" /></a>';
}
if ($options & BLOCK_MOVE_DOWN) {
- $movebuttons .= '<a style="margin-right: 2px; margin-left: 2px;" title="'.$this->str->movedown.'" href="'.$script.'&amp;blockaction=movedown&amp;instanceid='.$this->instance->id.$sesskeystr.'">' .
- '<img src="'.$pixpath.'/t/down.gif" alt=\"\" /></a>';
+ $movebuttons .= '<a style="margin-right: 2px; margin-left: 2px;" title="'. $this->str->movedown .'" href="'. $script .'&amp;blockaction=movedown&amp;instanceid='. $this->instance->id.$sesskeystr .'">' .
+ '<img src="'. $pixpath .'/t/down.gif" alt=\"\" /></a>';
}
if ($options & BLOCK_MOVE_RIGHT) {
- $movebuttons .= '<a style="margin-right: 2px; margin-left: 2px;" title="'.$this->str->moveright.'" href="'.$script.'&amp;blockaction=moveright&amp;instanceid='.$this->instance->id.$sesskeystr.'">' .
- '<img src="'.$pixpath.'/t/right.gif" alt=\"\" /></a>';
+ $movebuttons .= '<a style="margin-right: 2px; margin-left: 2px;" title="'. $this->str->moveright .'" href="'. $script .'&amp;blockaction=moveright&amp;instanceid='. $this->instance->id.$sesskeystr .'">' .
+ '<img src="'. $pixpath .'/t/right.gif" alt=\"\" /></a>';
}
$movebuttons .= '</div>';
@@ -244,10 +244,11 @@ function print_config() {
}
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 @@ function handle_config($config) {
}
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 @@ function load_instance($instance) {
$this->instance = $instance;
$this->specialization();
}
+
function specialization() {
// Just to make sure that this method exists.
return;
@@ -293,7 +300,7 @@ function instance_allow_multiple() {
// 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 @@ function get_content() {
$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 @@ function get_content() {
}
}
-?>
+?>
Please sign in to comment.
Something went wrong with that request. Please try again.