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
8cfa793f
Commit
8cfa793f
authored
7 years ago
by
Tobias Reischmann
Browse files
Options
Downloads
Patches
Plain Diff
Adapted changes in settings_manager
parent
4993aa0d
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
step/email/lib.php
+3
-2
3 additions, 2 deletions
step/email/lib.php
tests/settings_manager_test.php
+2
-2
2 additions, 2 deletions
tests/settings_manager_test.php
with
5 additions
and
4 deletions
step/email/lib.php
+
3
−
2
View file @
8cfa793f
...
...
@@ -84,7 +84,8 @@ class email extends libbase {
}
// When time runs up and no one wants to keep the course, then proceed.
$process
=
process_manager
::
get_process_by_id
(
$processid
);
if
(
$process
->
timestepchanged
<
time
()
-
settings_manager
::
get_settings
(
$instanceid
)[
'responsetimeout'
])
{
if
(
$process
->
timestepchanged
<
time
()
-
settings_manager
::
get_settings
(
$instanceid
,
SETTINGS_TYPE_STEP
)[
'responsetimeout'
])
{
return
step_response
::
proceed
();
}
return
step_response
::
waiting
();
...
...
@@ -94,7 +95,7 @@ class email extends libbase {
global
$DB
;
$stepinstances
=
step_manager
::
get_step_instances_by_subpluginname
(
$this
->
get_subpluginname
());
foreach
(
$stepinstances
as
$step
)
{
$settings
=
settings_manager
::
get_settings
(
$step
->
id
);
$settings
=
settings_manager
::
get_settings
(
$step
->
id
,
SETTINGS_TYPE_STEP
);
// Format the raw string in the DB to FORMAT_HTML.
$settings
[
'contenthtml'
]
=
format_text
(
$settings
[
'contenthtml'
],
FORMAT_HTML
);
...
...
This diff is collapsed.
Click to expand it.
tests/settings_manager_test.php
+
2
−
2
View file @
8cfa793f
...
...
@@ -48,8 +48,8 @@ class tool_cleanupcourses_settings_manager_testcase extends \advanced_testcase {
public
function
test_set_get_settings
()
{
$data
=
new
stdClass
();
$data
->
subject
=
self
::
VALUE
;
settings_manager
::
save_settings
(
$this
->
step
->
id
,
$this
->
step
->
subpluginname
,
$data
);
$settings
=
settings_manager
::
get_settings
(
$this
->
step
->
id
);
settings_manager
::
save_settings
(
$this
->
step
->
id
,
SETTINGS_TYPE_STEP
,
$this
->
step
->
subpluginname
,
$data
);
$settings
=
settings_manager
::
get_settings
(
$this
->
step
->
id
,
SETTINGS_TYPE_STEP
);
$this
->
assertArrayHasKey
(
'subject'
,
$settings
,
'No key \'subject\' in returned settings array'
);
$this
->
assertEquals
(
self
::
VALUE
,
$settings
[
'subject'
]);
}
...
...
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