Block only in courses

Block only in courses

by sterk jim -
Number of replies: 1

Hi all,

i just write my new block and i want to give the possibilty de diplay it only in courses (all courses pages, but not in dashboard !)


how can i hide it from de drop list "add block" where user is in dashboard page.

Here is my access.php file


<?php

    $capabilities = array(        

    'block/lyoud:myaddinstance' => array(

        'captype' => 'write',

        'contextlevel' => CONTEXT_COURSE,

        'archetypes' => array(

            'user' => CAP_ALLOW

        ),

 

        'clonepermissionsfrom' => 'moodle/my:manageblocks'

    ),

 

    'block/lyoud:addinstance' => array(

        'riskbitmask' => RISK_SPAM | RISK_XSS,

 

        'captype' => 'write',

        'contextlevel' => CONTEXT_COURSE,

        'archetypes' => array(

            'editingteacher' => CAP_ALLOW,

            'manager' => CAP_ALLOW

        ),

 

        'clonepermissionsfrom' => 'moodle/site:manageblocks'

    ),

);

Average of ratings: -