I seem to be having a few 'duh' moments here.
So, I wrote my block, and it sort of works, but when I go to admin, it says
New version of Cover list for 17/05/2006 (cover) exists
Cover list for 17/05/2006 tables have been set up correctly
then shows continue button.
BUT the continue button does nothing - just repeats same page. How do I get moodle to register the changed block and move on ?
Source (if it helps) as follows
<?php
class block_cover extends block_base {
function applicable_formats() {
return array('all' => true);
}
function instance_allow_multiple() {
return true;
}
function init(){
// Block to show cover list for today
if (isteacher()){
$this->title="Cover list for ".date("d/m/Y");
$this->version=0.1;
}
}
function get_content(){
if (isteacher()){
$this->content = new stdClass;
$this->content->text = "<a href=\"/internal/moodle2/blocks/cover/cover.php\">Cover list</a>";
return $this->content;
}
}
}
?>