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

Renamed subpluginssettings to adminsettings

parent 5808f4d5
No related branches found
No related tags found
No related merge requests found
...@@ -94,21 +94,21 @@ class admin_page_sublugins extends \admin_externalpage { ...@@ -94,21 +94,21 @@ class admin_page_sublugins extends \admin_externalpage {
* *
*/ */
public function __construct() { public function __construct() {
$url = new \moodle_url('/admin/tool/cleanupcourses/subpluginssettings.php'); $url = new \moodle_url('/admin/tool/cleanupcourses/adminsettings.php');
parent::__construct('tool_cleanupcourses_subpluginssettings', parent::__construct('tool_cleanupcourses_adminsettings',
get_string('subpluginssettings_heading', 'tool_cleanupcourses'), get_string('adminsettings_heading', 'tool_cleanupcourses'),
$url); $url);
} }
} }
/** /**
* Class that handles the display and configuration of the subplugin settings. * Class that handles the display and configuration the settings.
* *
* @package tool_cleanupcourses * @package tool_cleanupcourses
* @copyright 2015 Tobias Reischmann * @copyright 2015 Tobias Reischmann
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/ */
class subplugin_settings { class admin_settings {
/** @var object the url of the subplugin settings page */ /** @var object the url of the subplugin settings page */
private $pageurl; private $pageurl;
...@@ -118,7 +118,7 @@ class subplugin_settings { ...@@ -118,7 +118,7 @@ class subplugin_settings {
*/ */
public function __construct() { public function __construct() {
global $PAGE; global $PAGE;
$this->pageurl = new \moodle_url('/admin/tool/cleanupcourses/subpluginssettings.php'); $this->pageurl = new \moodle_url('/admin/tool/cleanupcourses/adminsettings.php');
$PAGE->set_url($this->pageurl); $PAGE->set_url($this->pageurl);
} }
...@@ -158,7 +158,7 @@ class subplugin_settings { ...@@ -158,7 +158,7 @@ class subplugin_settings {
// Set up the table. // Set up the table.
$this->view_header(); $this->view_header();
echo $OUTPUT->heading(get_string('subpluginssettings_edit_workflow_definition_heading', 'tool_cleanupcourses')); echo $OUTPUT->heading(get_string('adminsettings_edit_workflow_definition_heading', 'tool_cleanupcourses'));
echo $form->render(); echo $form->render();
...@@ -206,12 +206,12 @@ class subplugin_settings { ...@@ -206,12 +206,12 @@ class subplugin_settings {
/** /**
* This is the entry point for this controller class. * This is the entry point for this controller class.
*/ */
public function execute($action, $subpluginid, $workflowid) { public function execute($action, $workflowid) {
global $PAGE; global $PAGE;
$this->check_permissions(); $this->check_permissions();
// Has to be called before moodleform is created! // Has to be called before moodleform is created!
admin_externalpage_setup('tool_cleanupcourses_subpluginssettings'); admin_externalpage_setup('tool_cleanupcourses_adminsettings');
workflow_manager::handle_action($action, $workflowid); workflow_manager::handle_action($action, $workflowid);
...@@ -264,7 +264,7 @@ class workflow_settings { ...@@ -264,7 +264,7 @@ class workflow_settings {
public function __construct($workflowid) { public function __construct($workflowid) {
global $PAGE; global $PAGE;
// Has to be called before moodleform is created! // Has to be called before moodleform is created!
admin_externalpage_setup('tool_cleanupcourses_subpluginssettings'); admin_externalpage_setup('tool_cleanupcourses_adminssettings');
$this->pageurl = new \moodle_url('/admin/tool/cleanupcourses/workflowsettings.php'); $this->pageurl = new \moodle_url('/admin/tool/cleanupcourses/workflowsettings.php');
$PAGE->set_url($this->pageurl); $PAGE->set_url($this->pageurl);
$this->workflowid = $workflowid; $this->workflowid = $workflowid;
...@@ -279,13 +279,13 @@ class workflow_settings { ...@@ -279,13 +279,13 @@ class workflow_settings {
// Set up the table. // Set up the table.
$this->view_header(); $this->view_header();
echo $OUTPUT->heading(get_string('subpluginssettings_workflow_definition_steps_heading', 'tool_cleanupcourses')); echo $OUTPUT->heading(get_string('adminsettings_workflow_definition_steps_heading', 'tool_cleanupcourses'));
$steps = step_manager::get_step_types(); $steps = step_manager::get_step_types();
echo $OUTPUT->single_select(new \moodle_url($PAGE->url, echo $OUTPUT->single_select(new \moodle_url($PAGE->url,
array('action' => ACTION_STEP_INSTANCE_FORM, 'sesskey' => sesskey(), 'workflowid' => $this->workflowid)), array('action' => ACTION_STEP_INSTANCE_FORM, 'sesskey' => sesskey(), 'workflowid' => $this->workflowid)),
'subpluginname', $steps, '', array('' => get_string('add_new_step_instance', 'tool_cleanupcourses'))); 'subpluginname', $steps, '', array('' => get_string('add_new_step_instance', 'tool_cleanupcourses')));
echo $OUTPUT->single_button( new \moodle_url('/admin/tool/cleanupcourses/subpluginssettings.php'), echo $OUTPUT->single_button( new \moodle_url('/admin/tool/cleanupcourses/adminsettings.php'),
get_string('back')); get_string('back'));
$table = new step_table('tool_cleanupcourses_workflows', $this->workflowid); $table = new step_table('tool_cleanupcourses_workflows', $this->workflowid);
...@@ -301,7 +301,7 @@ class workflow_settings { ...@@ -301,7 +301,7 @@ class workflow_settings {
private function view_step_instance_form($form) { private function view_step_instance_form($form) {
$workflow = workflow_manager::get_workflow($this->workflowid); $workflow = workflow_manager::get_workflow($this->workflowid);
$this->view_instance_form($form, $this->view_instance_form($form,
get_string('subpluginssettings_edit_step_instance_heading', 'tool_cleanupcourses', get_string('adminsettings_edit_step_instance_heading', 'tool_cleanupcourses',
$workflow->title)); $workflow->title));
} }
...@@ -312,7 +312,7 @@ class workflow_settings { ...@@ -312,7 +312,7 @@ class workflow_settings {
private function view_trigger_instance_form($form) { private function view_trigger_instance_form($form) {
$workflow = workflow_manager::get_workflow($this->workflowid); $workflow = workflow_manager::get_workflow($this->workflowid);
$this->view_instance_form($form, $this->view_instance_form($form,
get_string('subpluginssettings_edit_trigger_instance_heading', 'tool_cleanupcourses', get_string('adminsettings_edit_trigger_instance_heading', 'tool_cleanupcourses',
$workflow->title)); $workflow->title));
} }
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/** /**
* Display the list of active processes * Displays the tables of active and inactive workflow definitions and handles all action associated with it.
* *
* @package tool_cleanupcourses * @package tool_cleanupcourses
* @copyright 2017 Tobias Reischmann WWU * @copyright 2017 Tobias Reischmann WWU
...@@ -28,11 +28,10 @@ require_login(); ...@@ -28,11 +28,10 @@ require_login();
require_once(__DIR__ . '/adminlib.php'); require_once(__DIR__ . '/adminlib.php');
// Create the class for this controller. // Create the class for this controller.
$subpluginsettings = new tool_cleanupcourses\subplugin_settings(); $adminsettings = new tool_cleanupcourses\admin_settings();
$PAGE->set_context(context_system::instance()); $PAGE->set_context(context_system::instance());
// Execute the controller. // Execute the controller.
$subpluginsettings->execute(optional_param('action', null, PARAM_TEXT), $adminsettings->execute(optional_param('action', null, PARAM_TEXT),
optional_param('subplugin', null, PARAM_INT),
optional_param('workflowid', null, PARAM_INT)); optional_param('workflowid', null, PARAM_INT));
\ No newline at end of file
...@@ -23,5 +23,5 @@ ignore: ...@@ -23,5 +23,5 @@ ignore:
- "renderer.php" - "renderer.php"
- "restore.php" - "restore.php"
- "settings.php" - "settings.php"
- "subpluginssettings.php" - "adminsettings.php"
- "view.php" - "view.php"
\ No newline at end of file
...@@ -31,13 +31,13 @@ $string['general_config_header'] = "General & Subplugins"; ...@@ -31,13 +31,13 @@ $string['general_config_header'] = "General & Subplugins";
$string['config_delay_duration'] = 'Duration of a course delay'; $string['config_delay_duration'] = 'Duration of a course delay';
$string['config_delay_duration_desc'] = 'Defines the time frame, which a course is excluded from the cleanup course, when rolled back via user interaction.'; $string['config_delay_duration_desc'] = 'Defines the time frame, which a course is excluded from the cleanup course, when rolled back via user interaction.';
$string['active_processes_list_header'] = 'Active Processes'; $string['active_processes_list_header'] = 'Active Processes';
$string['subpluginssettings_heading'] = 'Subplugin Workflow'; $string['adminsettings_heading'] = 'Workflow Settings';
$string['active_workflows_heading'] = 'Active Workflows'; $string['active_workflows_heading'] = 'Active Workflows';
$string['workflow_definition_heading'] = 'Workflow Definitions'; $string['workflow_definition_heading'] = 'Workflow Definitions';
$string['subpluginssettings_edit_workflow_definition_heading'] = 'Workflow Definition'; $string['adminsettings_edit_workflow_definition_heading'] = 'Workflow Definition';
$string['subpluginssettings_workflow_definition_steps_heading'] = 'Workflow Steps'; $string['adminsettings_workflow_definition_steps_heading'] = 'Workflow Steps';
$string['subpluginssettings_edit_trigger_instance_heading'] = 'Trigger for workflow \'{$a}\''; $string['adminsettings_edit_trigger_instance_heading'] = 'Trigger for workflow \'{$a}\'';
$string['subpluginssettings_edit_step_instance_heading'] = 'Step Instance for workflow \'{$a}\''; $string['adminsettings_edit_step_instance_heading'] = 'Step Instance for workflow \'{$a}\'';
$string['add_new_step_instance'] = 'Add New Step Instance...'; $string['add_new_step_instance'] = 'Add New Step Instance...';
$string['step_settings_header'] = 'Specific settings of the step type'; $string['step_settings_header'] = 'Specific settings of the step type';
$string['trigger_settings_header'] = 'Specific settings of the trigger type'; $string['trigger_settings_header'] = 'Specific settings of the trigger type';
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/** /**
* Display the list of active processes * Displays the settings associated with one single workflow and handles action for it.
* *
* @package tool_cleanupcourses * @package tool_cleanupcourses
* @copyright 2017 Tobias Reischmann WWU * @copyright 2017 Tobias Reischmann WWU
...@@ -33,7 +33,7 @@ $workflow = tool_cleanupcourses\manager\workflow_manager::get_workflow($workflow ...@@ -33,7 +33,7 @@ $workflow = tool_cleanupcourses\manager\workflow_manager::get_workflow($workflow
if (!$workflow) { if (!$workflow) {
throw new moodle_exception('workflownotfound', 'tool_cleanupcourses', throw new moodle_exception('workflownotfound', 'tool_cleanupcourses',
new \moodle_url('/admin/tool/cleanupcourses/subpluginssettings.php'), $workflowid); new \moodle_url('/admin/tool/cleanupcourses/adminsettings.php'), $workflowid);
} }
// Create the class for this controller. // Create the class for this controller.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment