Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-tool_lifecycle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-tool_lifecycle
Commits
178070d9
Commit
178070d9
authored
5 years ago
by
Tobias Reischmann
Browse files
Options
Downloads
Patches
Plain Diff
Fix notifications for active workflows
parent
32fe33d7
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
adminlib.php
+2
-2
2 additions, 2 deletions
adminlib.php
classes/manager/step_manager.php
+5
-3
5 additions, 3 deletions
classes/manager/step_manager.php
classes/manager/trigger_manager.php
+6
-4
6 additions, 4 deletions
classes/manager/trigger_manager.php
with
13 additions
and
9 deletions
adminlib.php
+
2
−
2
View file @
178070d9
...
@@ -471,8 +471,8 @@ class workflow_settings {
...
@@ -471,8 +471,8 @@ class workflow_settings {
$this
->
check_permissions
();
$this
->
check_permissions
();
// Handle other actions.
// Handle other actions.
step_manager
::
handle_action
(
$action
,
$subpluginid
);
step_manager
::
handle_action
(
$action
,
$subpluginid
,
$workflowid
);
trigger_manager
::
handle_action
(
$action
,
$subpluginid
);
trigger_manager
::
handle_action
(
$action
,
$subpluginid
,
$workflowid
);
workflow_manager
::
handle_action
(
$action
,
$workflowid
);
workflow_manager
::
handle_action
(
$action
,
$workflowid
);
if
(
$action
===
action
::
TRIGGER_INSTANCE_FORM
)
{
if
(
$action
===
action
::
TRIGGER_INSTANCE_FORM
)
{
...
...
This diff is collapsed.
Click to expand it.
classes/manager/step_manager.php
+
5
−
3
View file @
178070d9
...
@@ -217,10 +217,12 @@ class step_manager extends subplugin_manager {
...
@@ -217,10 +217,12 @@ class step_manager extends subplugin_manager {
* Handles an action for a workflow step.
* Handles an action for a workflow step.
* @param string $action action to be executed
* @param string $action action to be executed
* @param int $subpluginid id of the step instance
* @param int $subpluginid id of the step instance
* @param int $workflowid id of the workflow
*/
*/
public
static
function
handle_action
(
$action
,
$subpluginid
)
{
public
static
function
handle_action
(
$action
,
$subpluginid
,
$workflowid
)
{
if
(
$step
=
self
::
get_step_instance
(
$subpluginid
))
{
$step
=
self
::
get_step_instance
(
$subpluginid
);
if
(
!
workflow_manager
::
is_active
(
$step
->
workflowid
))
{
if
(
$step
&&
$step
->
workflowid
==
$workflowid
)
{
if
(
!
workflow_manager
::
is_active
(
$workflowid
))
{
if
(
$action
===
action
::
UP_STEP
)
{
if
(
$action
===
action
::
UP_STEP
)
{
self
::
change_sortindex
(
$subpluginid
,
true
);
self
::
change_sortindex
(
$subpluginid
,
true
);
}
}
...
...
This diff is collapsed.
Click to expand it.
classes/manager/trigger_manager.php
+
6
−
4
View file @
178070d9
...
@@ -240,11 +240,13 @@ class trigger_manager extends subplugin_manager {
...
@@ -240,11 +240,13 @@ class trigger_manager extends subplugin_manager {
/**
/**
* Handles an action for a workflow step.
* Handles an action for a workflow step.
* @param string $action action to be executed
* @param string $action action to be executed
* @param int $subpluginid id of the step instance
* @param int $subpluginid id of the trigger instance
* @param int $workflowid id of the workflow
*/
*/
public
static
function
handle_action
(
$action
,
$subpluginid
)
{
public
static
function
handle_action
(
$action
,
$subpluginid
,
$workflowid
)
{
if
(
$trigger
=
self
::
get_instance
(
$subpluginid
))
{
$trigger
=
self
::
get_instance
(
$subpluginid
);
if
(
!
workflow_manager
::
is_active
(
$trigger
->
workflowid
))
{
if
(
$trigger
&&
$trigger
->
workflowid
==
$workflowid
)
{
if
(
!
workflow_manager
::
is_active
(
$workflowid
))
{
if
(
$action
===
action
::
UP_TRIGGER
)
{
if
(
$action
===
action
::
UP_TRIGGER
)
{
self
::
change_sortindex
(
$subpluginid
,
true
);
self
::
change_sortindex
(
$subpluginid
,
true
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment