From 2456d7c8152a3f2cba1d76f82bb4bfdb4f068ed9 Mon Sep 17 00:00:00 2001 From: defacer Date: Fri, 19 Nov 2004 02:36:57 +0000 Subject: [PATCH] Updated the two standard blocks that have configuration features to work with the latest version of the Blocks API. --- blocks/course_list/block_course_list.php | 10 +--------- .../{config.html => config_global.html} | 7 +------ blocks/online_users/block_online_users.php | 16 +--------------- .../{config.html => config_global.html} | 4 ---- 4 files changed, 3 insertions(+), 34 deletions(-) rename blocks/course_list/{config.html => config_global.html} (87%) rename blocks/online_users/{config.html => config_global.html} (83%) diff --git a/blocks/course_list/block_course_list.php b/blocks/course_list/block_course_list.php index 137ed123f7..88b5c4b45e 100644 --- a/blocks/course_list/block_course_list.php +++ b/blocks/course_list/block_course_list.php @@ -4,21 +4,13 @@ class CourseBlock_course_list extends MoodleBlock { function init() { $this->title = get_string('courses'); $this->content_type = BLOCK_TYPE_LIST; - $this->version = 2004081200; + $this->version = 2004111600; } function has_config() { return true; } - function print_config() { - global $CFG, $USER, $THEME; - print_simple_box_start('center', '', $THEME->cellheading); - include($CFG->dirroot.'/blocks/'.$this->name().'/config.html'); - print_simple_box_end(); - return true; - } - function get_content() { global $THEME, $CFG, $USER; diff --git a/blocks/course_list/config.html b/blocks/course_list/config_global.html similarity index 87% rename from blocks/course_list/config.html rename to blocks/course_list/config_global.html index 2be347a329..946391fb5c 100644 --- a/blocks/course_list/config.html +++ b/blocks/course_list/config_global.html @@ -1,6 +1,3 @@ -
-sesskey."\">"; ?> - @@ -27,6 +24,4 @@ -

block_course_list_adminview:

" />
- -
+ \ No newline at end of file diff --git a/blocks/online_users/block_online_users.php b/blocks/online_users/block_online_users.php index c9e11f4605..53c80548df 100644 --- a/blocks/online_users/block_online_users.php +++ b/blocks/online_users/block_online_users.php @@ -4,25 +4,11 @@ class CourseBlock_online_users extends MoodleBlock { function init() { $this->title = get_string('blockname','block_online_users'); $this->content_type = BLOCK_TYPE_TEXT; - $this->version = 2004052700; + $this->version = 2004111600; } function has_config() {return true;} - function print_config() { - global $CFG, $USER, $THEME; - print_simple_box_start('center', '', $THEME->cellheading); - include($CFG->dirroot.'/blocks/'.$this->name().'/config.html'); - print_simple_box_end(); - return true; - } - function handle_config($config) { - foreach ($config as $name => $value) { - set_config($name, $value); - } - return true; - } - function get_content() { global $USER, $CFG; diff --git a/blocks/online_users/config.html b/blocks/online_users/config_global.html similarity index 83% rename from blocks/online_users/config.html rename to blocks/online_users/config_global.html index 78e3d493f9..22c4f46366 100644 --- a/blocks/online_users/config.html +++ b/blocks/online_users/config_global.html @@ -1,6 +1,3 @@ -
-sesskey .'">'; ?> - @@ -22,4 +19,3 @@

block_online_users_timetosee:

-
\ No newline at end of file -- 2.39.5