forked from learnweb/moodle-tool_lifecycle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nathan Nguyen
committed
Nov 17, 2023
1 parent
8e08f2d
commit 66b8e09
Showing
19 changed files
with
493 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
tests/fixtures/fakeplugins/samplestep/classes/lifecycle/interaction.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace tool_samplestep\lifecycle; | ||
|
||
global $CFG; | ||
require_once($CFG->dirroot . '/admin/tool/lifecycle/step/interactionlib.php'); | ||
|
||
use tool_lifecycle\step\interactionlibbase; | ||
|
||
defined('MOODLE_INTERNAL') || die(); | ||
|
||
class interaction extends interactionlibbase { | ||
|
||
public function get_relevant_capability() | ||
{ | ||
} | ||
|
||
public function get_action_tools($process) | ||
{ | ||
} | ||
|
||
public function get_status_message($process) | ||
{ | ||
} | ||
|
||
public function get_action_string($action, $user) | ||
{ | ||
} | ||
|
||
public function handle_interaction($process, $step, $action = 'default') | ||
{ | ||
} | ||
} |
27 changes: 27 additions & 0 deletions
27
tests/fixtures/fakeplugins/samplestep/classes/lifecycle/step.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
|
||
namespace tool_samplestep\lifecycle; | ||
|
||
global $CFG; | ||
require_once($CFG->dirroot . '/admin/tool/lifecycle/step/lib.php'); | ||
|
||
use tool_lifecycle\step\libbase; | ||
|
||
defined('MOODLE_INTERNAL') || die(); | ||
|
||
class step extends libbase { | ||
public function get_subpluginname() | ||
{ | ||
return 'sample step'; | ||
} | ||
|
||
public function get_plugin_description() { | ||
return "Sample step plugin"; | ||
} | ||
|
||
public function process_course($processid, $instanceid, $course) | ||
{ | ||
return null; | ||
} | ||
|
||
} |
38 changes: 38 additions & 0 deletions
38
tests/fixtures/fakeplugins/samplestep/classes/privacy/provider.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?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/>. | ||
|
||
namespace tool_samplestep\privacy; | ||
|
||
use core_privacy\local\metadata\null_provider; | ||
|
||
/** | ||
* Privacy subsystem implementation for tool_samplestep. | ||
* | ||
* @package tool_samplestep | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
class provider implements null_provider { | ||
|
||
/** | ||
* Get the language string identifier with the component's language | ||
* file to explain why this plugin stores no data. | ||
* | ||
* @return string the reason | ||
*/ | ||
public static function get_reason() : string { | ||
return 'privacy:metadata'; | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
tests/fixtures/fakeplugins/samplestep/lang/en/tool_samplestep.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?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/>. | ||
|
||
$string['pluginname'] = 'Sample step'; | ||
$string['privacy:metadata'] = 'The plugin does not store any personal data.'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?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/>. | ||
|
||
/** | ||
* Fake component for testing | ||
* | ||
* @package core | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
defined('MOODLE_INTERNAL') || die(); | ||
|
||
$plugin->version = 2023100400; | ||
$plugin->requires = 2022041200; | ||
$plugin->component = 'tool_samplestep'; |
28 changes: 28 additions & 0 deletions
28
tests/fixtures/fakeplugins/sampletrigger/classes/lifecycle/trigger.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<?php | ||
|
||
namespace tool_sampletrigger\lifecycle; | ||
|
||
global $CFG; | ||
require_once($CFG->dirroot . '/admin/tool/lifecycle/trigger/lib.php'); | ||
|
||
use tool_lifecycle\trigger\base_automatic; | ||
|
||
defined('MOODLE_INTERNAL') || die(); | ||
|
||
class trigger extends base_automatic { | ||
|
||
public function get_subpluginname() | ||
{ | ||
return 'sample trigger'; | ||
} | ||
|
||
public function get_plugin_description() { | ||
return "Sample trigger"; | ||
} | ||
|
||
public function check_course($course, $triggerid) | ||
{ | ||
return null; | ||
} | ||
|
||
} |
Oops, something went wrong.