Skip to content
Snippets Groups Projects
Commit e9451312 authored by TamaraGunkel's avatar TamaraGunkel
Browse files

Fixed capability name

parent 7fcc9f5c
No related branches found
No related tags found
No related merge requests found
......@@ -54,7 +54,7 @@ class interaction_table extends \table_sql {
// }
//$capability = interaction_manager::get_relevant_capability($this->stepinstance->subpluginname);
$courses = get_user_capability_course('tool_cleanupcourses/view:managecourse', $USER, false);
$courses = get_user_capability_course('tool/cleanupcourses:managecourse', $USER, false);
if ($courses) {
$listofcourseids = array_reduce($courses, function ($course1, $course2) {
if (!$course1) {
......
......@@ -24,8 +24,8 @@ defined('MOODLE_INTERNAL') || die();
$capabilities = array(
'tool_cleanupcourses/view:managecourse' => array(
'contextlevel' => CONTEXT_SYSTEM,
'tool/cleanupcourses:managecourse' => array(
'contextlevel' => CONTEXT_COURSE,
'captype' => 'write',
'archetypes' => array(
'manager' => CAP_PREVENT,
......
......@@ -27,7 +27,7 @@
$string['pluginname'] = 'Cleanup Courses';
$string['plugintitle'] = 'Cleanup Courses';
$string['view:managecourse'] = 'May manage courses in tool_cleanupcourses';
$string['cleanupcourses:managecourse'] = 'May manage courses in tool_cleanupcourses';
$string['general_config_header'] = "General & Subplugins";
$string['config_delay_duration'] = 'Duration of a course delay';
......
......@@ -34,7 +34,7 @@ $capabilities = array(
'teacher' => CAP_PREVENT,
'students' => CAP_PREVENT,
),
'clonepermissionsfrom' => 'tool_cleanupcourses/view:managecourse'
'clonepermissionsfrom' => 'tool/cleanupcourses:managecourse'
),
);
......
......@@ -23,5 +23,5 @@
defined('MOODLE_INTERNAL') || die;
$plugin->version = 2018022002;
$plugin->version = 2018022005;
$plugin->component = 'tool_cleanupcourses';
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment