Calling class in a block content.

Re: Calling class in a block content.

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

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;
}