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

Adapted changes in settings_manager

parent 4993aa0d
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
......@@ -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']);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment