diff --git a/step/duplicate/db/access.php b/step/duplicate/db/access.php new file mode 100644 index 0000000000000000000000000000000000000000..23efa53491178b0c9164d87305d59dccac6a700d --- /dev/null +++ b/step/duplicate/db/access.php @@ -0,0 +1,39 @@ +<?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' + ), +); + + + diff --git a/step/duplicate/interactionlib.php b/step/duplicate/interactionlib.php index e11041e615b141c02868ea3d1bd6b5c18122092a..71d09bbc6d2b957a751c4ec7699eaa5464e28ec9 100644 --- a/step/duplicate/interactionlib.php +++ b/step/duplicate/interactionlib.php @@ -47,7 +47,7 @@ class interactionduplicate extends interactionlibbase { * @return string capability string. */ public function get_relevant_capability() { - return 'lifecyclestep/email:preventdeletion'; + return 'lifecyclestep/duplicate:enterdata'; } /** diff --git a/step/duplicate/lang/en/lifecyclestep_duplicate.php b/step/duplicate/lang/en/lifecyclestep_duplicate.php index 198263a14aa2d384bf25dd5b073d5d317b200b38..6637e89689b553cb7056fb1ee82ce340401c2100 100644 --- a/step/duplicate/lang/en/lifecyclestep_duplicate.php +++ b/step/duplicate/lang/en/lifecyclestep_duplicate.php @@ -30,4 +30,6 @@ $string['duplicate_form'] = 'Enter data'; $string['duplicate_course_header'] = 'Duplicate Course'; $string['status_message_duplication'] = 'Duplicated course will be available shortly.'; $string['status_message_form'] = 'Additional information required'; -$string['action_new_course_data'] = '{$a} supplied new course name'; \ No newline at end of file +$string['action_new_course_data'] = '{$a} supplied new course name'; + +$string['duplicate:enterdata'] = 'Enter data for course duplication'; \ No newline at end of file