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.
//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.