Blocks in 1.5

Blocks in 1.5

by Mark Little -
Number of replies: 8
Which blocks work in v1.5?


Average of ratings: -
In reply to Mark Little

Re: Blocks in 1.5

by John Papaioannou -
Obviously, all the standard blocks work! big grin

Seriously now, I don't quite grasp the meaning of your question. If you mean to ask "which custom blocks from those floating around in these forums work in 1.5", then you 'll find it difficult to get a definite answer because of all the research required in order to produce it.

So... which blocks are you interested in, Mark? Rephrasing the question would make it much easier for others to give you an answer.

Cheers!
Jon
In reply to John Papaioannou

Re: Blocks in 1.5

by Mark Little -
I'm going round all the custom blocks and testing each one...

I have tried the fancy_clock for example and that does not work in 1.5..


In reply to Mark Little

Re: Blocks in 1.5

by Graham Blacker -
Hi
I have tweaked the code to run my version of fancy clock in 1.5 (see attachment). There are some excellent notes on how to do this here
In reply to Graham Blacker

Re: Blocks in 1.5

by John Papaioannou -
Graham's link points to a slightly outdated version of the notes which contain a few slight inaccuracies (nothing that will cause you to make a mistake though).

The very latest version of that document is always here.

Cheers!
In reply to John Papaioannou

Re: Blocks in 1.5

by Ger Tielemans -

Fancy clock loads in 1.5, but your beatiful tutorial example fails..

At this point our block should be capable of being automatically installed in Moodle  I get:

Block simplehtml: self test failed.

Code of the block with the name: /blocks/simplehtml/block_simplehtml.php

<?PHP

class block_simplehtml extends block_base {
    function init() {
        $this->title = get_string('simplehtml', 'block_simplehtml');
        $this->version = 2004111200;
    }
}

function get_content() {

    if ($this->content !== NULL) {
        return $this->content;
    }

    $this->content = new stdClass;
    $this->content->text = 'The content of our SimpleHTML block!';
    $this->content->footer = 'Footer here...';

    return $this->content;
}

?>

In reply to Ger Tielemans

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: Blocks in 1.5

by Ger Tielemans -
That simple, thanks,my fault: the guide said clearly: .insert before the closing brace... blush