print_heading($strblockname);
- print_simple_box(get_string('configwarning', 'admin'), 'center', '50%');
+ notify('This block still uses an old-style config_global.html file. ' .
+ 'It must be updated by a developer to use a settings.php file.');
+
+ print_box(get_string('configwarning', 'admin'), 'generalbox boxwidthnormal boxaligncenter');
echo '<br />';
echo '<form method="post" action="block.php">';
echo '<input type="hidden" name="'. $name .'" value="'. $val .'" />';
}
echo '</p>';
- $block->config_print();
+
+ print_box_start();
+ include($CFG->dirroot.'/blocks/'. $block->name() .'/config_global.html');
+ print_box_end();
+
echo '</form>';
print_footer();
return false;
}
- /**
- * Default behavior: print the config_global.html file
- * You don't need to override this if you're satisfied with the above
- *
- * @return boolean
- */
- function config_print() {
- // Default behavior: print the config_global.html file
- // You don't need to override this if you're satisfied with the above
- if (!$this->has_config()) {
- return false;
- }
- global $CFG;
- print_simple_box_start('center', '', '', 5, 'blockconfigglobal');
- include($CFG->dirroot.'/blocks/'. $this->name() .'/config_global.html');
- print_simple_box_end();
- return true;
- }
-
/**
* Default behavior: save all variables as $CFG properties
* You don't need to override this if you 're satisfied with the above
'should not have been calling it anyway.');
}
+ /** @deprecated since Moodle 2.0. */
+ function config_print() {
+ throw new coding_exception('config_print() can no longer be used. Blocks should use a settings.php file.');
+ }
}
/**