Get user role in Moodle course

Re: Get user role in Moodle course

by Luis Sola Ruiz -
Number of replies: 0
Yes, thanks! now the text appears but it doesn't work as well as it should. I define another capability for a student:

//Teacher
'block/tfg:createactivity' => array(
'riskbitmask' => RISK_SPAM,
'captype' => 'write',
'contextlevel' => CONTEXT_SYSTEM,
'archetypes' => array(
'editingteacher' => CAP_ALLOW,
'teacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
),

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

//student
'block/tfg:askactivity' => array(
'riskbitmask' => RISK_SPAM,
'captype' => 'write',
'contextlevel' => CONTEXT_SYSTEM,
'archetypes' => array(
'student' => CAP_ALLOW
),

'clonepermissionsfrom' => 'moodle/site:manageblocks'
),
I updated the version again but when I am teacher/admin it appears the 2 links and when I am a student it doesn't appear anything.