From: dhawes Date: Wed, 10 Nov 2004 16:43:57 +0000 (+0000) Subject: added comments and some spacing cleanup X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e0134f842cfa7d9b1d360162e67ad74cf76ec9c4;p=moodle.git added comments and some spacing cleanup --- diff --git a/blocks/moodleblock.class.php b/blocks/moodleblock.class.php index 50cc758808..f2411737d5 100644 --- a/blocks/moodleblock.class.php +++ b/blocks/moodleblock.class.php @@ -1,7 +1,8 @@ $value) { $path .= $first? '?' : '&'; - $path .= $var.'='.urlencode($value); + $path .= $var .'='. urlencode($value); $first = false; } @@ -84,14 +114,14 @@ class MoodlePage { ); if(!isset($typeids[$type])) { - error('Unrecognized type passed to MoodlePage::create_object: '.$type); + error('Unrecognized type passed to MoodlePage::create_object: '. $type); } $object = &new $typeids[$type]; if($object->get_type() !== $type) { // Somehow somewhere someone made a mistake - error("Page object's type (".$object->get_type().") does not match requested type ($type)"); + error('Page object\'s type ('. $object->get_type() .') does not match requested type ('. $type .')'); } $object->init_quick($data); @@ -103,8 +133,6 @@ class MoodlePage { /** * Class that models the behavior of a moodle course * - * @version $Id$ - * @license http://www.gnu.org/copyleft/gpl.html GNU Public License * @author Jon Papaioannou * @package pages */ @@ -125,7 +153,7 @@ class MoodlePage_Course extends MoodlePage { parent::init_quick($data); } - // Here you should load up all heavy-duty data for your course. Basically everything that + // Here you should load up all heavy-duty data for your page. Basically everything that // does not NEED to be loaded for the class to make basic decisions should NOT be loaded // in init_quick() and instead deferred here. Of course this function had better recognize // $this->full_init_done to prevent wasteful multiple-time data retrieval. @@ -135,7 +163,7 @@ class MoodlePage_Course extends MoodlePage { } $this->courserecord = get_record('course', 'id', $this->id); if(empty($this->courserecord)) { - error('Cannot fully initialize page: invalid course id '.$this->id); + error('Cannot fully initialize page: invalid course id '. $this->id); } $this->full_init_done = true; } @@ -187,10 +215,10 @@ class MoodlePage_Course extends MoodlePage { function url_get_path() { global $CFG; if($this->id == SITEID) { - return $CFG->wwwroot.'/index.php'; + return $CFG->wwwroot .'/index.php'; } else { - return $CFG->wwwroot.'/course/view.php'; + return $CFG->wwwroot .'/course/view.php'; } } @@ -276,12 +304,11 @@ class MoodlePage_Course extends MoodlePage { function blocks_move_position(&$instance, $move) { if($instance->position == BLOCK_POS_LEFT && $move == BLOCK_MOVE_RIGHT) { return BLOCK_POS_RIGHT; - } - else if ($instance->position == BLOCK_POS_RIGHT && $move == BLOCK_MOVE_LEFT) { + } else if ($instance->position == BLOCK_POS_RIGHT && $move == BLOCK_MOVE_LEFT) { return BLOCK_POS_LEFT; } return $instance->position; } } -?> +?> \ No newline at end of file