]> git.mjollnir.org Git - moodle.git/commitdiff
Updated the two standard blocks that have configuration features to work
authordefacer <defacer>
Fri, 19 Nov 2004 02:36:57 +0000 (02:36 +0000)
committerdefacer <defacer>
Fri, 19 Nov 2004 02:36:57 +0000 (02:36 +0000)
with the latest version of the Blocks API.

blocks/course_list/block_course_list.php
blocks/course_list/config_global.html [moved from blocks/course_list/config.html with 87% similarity]
blocks/online_users/block_online_users.php
blocks/online_users/config_global.html [moved from blocks/online_users/config.html with 83% similarity]

index 137ed123f7984057c073033848ab713178a4f2ed..88b5c4b45eec02aa12308afb6d5e6487e2f97400 100644 (file)
@@ -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;
 
similarity index 87%
rename from blocks/course_list/config.html
rename to blocks/course_list/config_global.html
index 2be347a3291c5386d603d2081d0ff733ed7691d5..946391fb5ce9f966981867f69f4f2bc02cfa07ee 100644 (file)
@@ -1,6 +1,3 @@
-<form method="post" action="block.php">
-<?php echo "<input type=\"hidden\" name=\"sesskey\" value=\"".$USER->sesskey."\">"; ?>
-
 <table cellpadding="9" cellspacing="0">
 <tr valign="top">
     <td align="right"><p>block_course_list_adminview:</td>
@@ -27,6 +24,4 @@
     <td colspan="3" align="center">
     <input type="submit" value="<?php print_string("savechanges") ?>" /></td>
 </tr>
-</table>
-
-</form>
+</table>
\ No newline at end of file
index c9e11f4605cfac3d21565446e2d22e3604b99d19..53c80548df4ba25b7360721e7b4610d39d786acd 100644 (file)
@@ -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;
 
similarity index 83%
rename from blocks/online_users/config.html
rename to blocks/online_users/config_global.html
index 78e3d493f9b76ef947653c382d9567ec9e4f3cff..22c4f4636687c2b7a1e9eded19c9553fe2221206 100644 (file)
@@ -1,6 +1,3 @@
-<form method="post" action="block.php">
-<?php echo '<input type="hidden" name="sesskey" value="'. $USER->sesskey .'">'; ?>
-
 <table cellpadding="9" cellspacing="0">
 <tr valign="top">
     <td align="right"><p>block_online_users_timetosee:</td>
@@ -22,4 +19,3 @@
     <input type="submit" value="<?php print_string('savechanges') ?>" /></td>
 </tr>
 </table>
-</form>
\ No newline at end of file