I have been trying to have a play with the coursepagemethod option in the a CoreCourseModuleDelegate
The documentation suggests that it should be a method that returns html (I assumed it should be the content that you wish to be displayed) however there is documentation that suggests it should be a template
Inside db/mobile.php I assumed that if I added something like:
'coursepagemethod' => 'inline',
it would require me to add a method that was classes/output/mobile.php accepting similar parameters to something declared via method (except that it returned a string)
public static function inline(array $args) : string {
return '<p>STUFF came from here!</p>';
}
This did not seem to work, nor did something like:
public static function inline(array $args) : array {
return array(
'templates' => array(
array(
'id' => 'main',
'html' => '<p>STUFF came from here!</p>',
),
),
'javascript' => '',
'otherdata' => [],
'files' => [],
);
}
Should I be defining the method somewhere else? Should it have a different method signature?