Skip to content
Snippets Groups Projects
Unverified Commit f8819956 authored by Tobias Reischmann's avatar Tobias Reischmann
Browse files

Created an own capability for step duplicates interaction

parent c3d5d9d5
No related branches found
No related tags found
No related merge requests found
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Capability definitions for the duplication step subplugin
* @package lifecycle_step
* @subpackage duplication
* @copyright 2017 Tobias Reischmann WWU
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$capabilities = array(
'lifecyclestep/duplicate:enterdata' => array(
'contextlevel' => CONTEXT_COURSE,
'captype' => 'write',
'archetypes' => array(
'editingteacher' => CAP_ALLOW,
),
'clonepermissionsfrom' => 'tool/lifecycle:managecourses'
),
);
...@@ -47,7 +47,7 @@ class interactionduplicate extends interactionlibbase { ...@@ -47,7 +47,7 @@ class interactionduplicate extends interactionlibbase {
* @return string capability string. * @return string capability string.
*/ */
public function get_relevant_capability() { public function get_relevant_capability() {
return 'lifecyclestep/email:preventdeletion'; return 'lifecyclestep/duplicate:enterdata';
} }
/** /**
......
...@@ -31,3 +31,5 @@ $string['duplicate_course_header'] = 'Duplicate Course'; ...@@ -31,3 +31,5 @@ $string['duplicate_course_header'] = 'Duplicate Course';
$string['status_message_duplication'] = 'Duplicated course will be available shortly.'; $string['status_message_duplication'] = 'Duplicated course will be available shortly.';
$string['status_message_form'] = 'Additional information required'; $string['status_message_form'] = 'Additional information required';
$string['action_new_course_data'] = '{$a} supplied new course name'; $string['action_new_course_data'] = '{$a} supplied new course name';
$string['duplicate:enterdata'] = 'Enter data for course duplication';
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment