we're trying to help Kevin Wiliarty with the development of the Filtered course list
block and we want to display the block in the App Dashboard
. We use the third type to display directly the block.
Here's our definition code in \db\mobile.php. We do not define the displaydata option because it's optional and default values (title, blockname and type) are already what we need.
$addons = array(
"block_filtered_course_list" => array( // Plugin identifier.
'handlers' => array( // Different places where the plugin will display content.
'filteredcourselist' => array( // Handler unique name (alphanumeric).
'delegate' => 'CoreBlockDelegate', // Delegate (where to display the link to the plugin).
'method' => 'mobile_block_view',
'lang' => [ // Language strings that are used in all the handlers.
In the mobile_block_view method here's what we get from $args.
key: appcustomurlscheme value:moodlemobile
key: appid value:com.moodle.moodlemobile
key: appisdesktop value:0
key: appismobile value:1
key: appiswide value:0
key: applang value:it
key: appplatform value:browser
key: appversioncode value:3920
key: appversionname value:3.9.2
key: contextlevel value:user
key: instanceid value:9
key: userid value:9
We have the instanceid and the contextlevel but they are always referred to the logged-in user, not the block. This is not a problem when we have only one block but, in case of multiple blocks, we cannot identify which one we are displaying.
Maybe we are missing something in the configuration file but we cannot identify what, since there aren't many options available to set.