legacy roles

legacy roles

by tony chesney -
Number of replies: 0

For a new module, if I include in my db/access.php file:

$mod_mymod_capabilities = array(

 'mod/mymod:view' => array(

        'captype' => 'read',
        'contextlevel' => CONTEXT_MODULE,
        'legacy' => array(
            'student' => CAP_ALLOW,
            'teacher' => CAP_ALLOW,
            'editingteacher' => CAP_ALLOW,
            'admin' => CAP_ALLOW
        )
    )
 
);

then bump the version number and run Notifications, should I see in my role_capabilities table a direct mapping, ie 4 records for 'mod/mymod:view' with the different role ids?  (They aren't there.)

Could I also check that one would set these legacy capabilities (in 1.9) if one was using roles based on legacy roles, and wanted to test for a newly defined capability?

Average of ratings: -