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
8e9e995c
Unverified
Commit
8e9e995c
authored
5 years ago
by
Tobias Reischmann
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #80 from learnweb/feature/mailduedate
Feature/mailduedate
parents
5cdf79ea
c170f7a9
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
classes/manager/step_manager.php
+0
-1
0 additions, 1 deletion
classes/manager/step_manager.php
step/email/interactionlib.php
+14
-2
14 additions, 2 deletions
step/email/interactionlib.php
with
14 additions
and
3 deletions
classes/manager/step_manager.php
+
0
−
1
View file @
8e9e995c
...
...
@@ -175,7 +175,6 @@ class step_manager extends subplugin_manager {
* @return array of step instances.
*/
public
static
function
get_step_instances
(
$workflowid
)
{
// TODO: Alter calls to include workflow id.
global
$DB
;
$records
=
$DB
->
get_records
(
'tool_lifecycle_step'
,
array
(
'workflowid'
=>
$workflowid
...
...
This diff is collapsed.
Click to expand it.
step/email/interactionlib.php
+
14
−
2
View file @
8e9e995c
...
...
@@ -100,9 +100,21 @@ class interactionemail extends interactionlibbase {
* @return null
*/
public
function
get_due_date
(
$processid
,
$stepid
)
{
$settings
=
settings_manager
::
get_settings
(
$stepid
,
settings_type
::
STEP
);
$process
=
process_manager
::
get_process_by_id
(
$processid
);
$date
=
$settings
[
'responsetimeout'
]
+
$process
->
timestepchanged
;
$steps
=
step_manager
::
get_step_instances
(
$process
->
workflowid
);
// Necessary to access steps through counting variable.
$steps
=
array_values
(
$steps
);
// Keep track of the delays for future email steps and sum them up.
$date
=
$process
->
timestepchanged
;
for
(
$i
=
$process
->
stepindex
;
$i
<=
count
(
$steps
);
$i
++
)
{
// The variable $i represents the stepindex. The index of $steps starts at 0.
/* @var $step step_subplugin class entry of the subplugin step */
$step
=
$steps
[
$i
-
1
];
if
(
$step
->
subpluginname
==
'email'
)
{
$settings
=
settings_manager
::
get_settings
(
$step
->
id
,
settings_type
::
STEP
);
$date
+=
$settings
[
'responsetimeout'
];
}
}
// TODO default format -- seconds -> not in this class !
return
date
(
'd.m.Y'
,
$date
);
}
...
...
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