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

Fix action handling of workflowsettings

parent a9c868e4
Branches
Tags
No related merge requests found
...@@ -462,14 +462,18 @@ class workflow_settings { ...@@ -462,14 +462,18 @@ class workflow_settings {
/** /**
* This is the entry point for this controller class. * This is the entry point for this controller class.
* @param $action string action string to be executed.
* @param $subpluginid int id of the subplugin associated.
* @param $workflowid int id of the workflow associated.
* @throws \coding_exception
*/ */
public function execute($action, $subplugin) { public function execute($action, $subpluginid, $workflowid) {
$this->check_permissions(); $this->check_permissions();
// Handle other actions. // Handle other actions.
step_manager::handle_action($action, $subplugin); step_manager::handle_action($action, $subpluginid);
trigger_manager::handle_action($action, $subplugin); trigger_manager::handle_action($action, $subpluginid);
workflow_manager::handle_action($action, $subplugin); workflow_manager::handle_action($action, $workflowid);
if ($action === action::TRIGGER_INSTANCE_FORM) { if ($action === action::TRIGGER_INSTANCE_FORM) {
if ($this->handle_trigger_instance_form()) { if ($this->handle_trigger_instance_form()) {
......
...@@ -41,9 +41,5 @@ if (!$workflow) { ...@@ -41,9 +41,5 @@ if (!$workflow) {
$workflowsettings = new tool_lifecycle\workflow_settings($workflowid); $workflowsettings = new tool_lifecycle\workflow_settings($workflowid);
// Execute the controller. // Execute the controller.
// @TODO what's the purpose of subplugin? why not workflowid? $subpluginid = optional_param('subplugin', null, PARAM_INT);
$subplugin = optional_param('subplugin', null, PARAM_INT); $workflowsettings->execute(optional_param('action', null, PARAM_TEXT), $subpluginid, $workflowid);
if ($subplugin == null && $workflowid) { \ No newline at end of file
$subplugin = $workflowid;
}
$workflowsettings->execute(optional_param('action', null, PARAM_TEXT), $subplugin);
\ 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