Calling class in a block content.

Re: Calling class in a block content.

by Adrian Greeve -
Number of replies: 0
Picture of Core developers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers

get_content() is probably the right place to display information to the block.


Looking at your code in authenp you aren't returning anything and this would be the reason that nothing is being displayed.


You need something more like:


// Also of note is that you are not using the course id yet.
public function authenp($course_id) {
    $html = 'text that I want to return'; // You should be using get_string() here. Hard coded English is no good.
    return $html;
}