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

Extended process course by instance id

parent 02217a17
Branches
Tags
No related merge requests found
...@@ -76,7 +76,7 @@ class cleanup_processor { ...@@ -76,7 +76,7 @@ class cleanup_processor {
$step = step_manager::get_subplugin_by_instance_id($process->stepid); $step = step_manager::get_subplugin_by_instance_id($process->stepid);
$lib = lib_manager::get_step_lib($step->subpluginname); $lib = lib_manager::get_step_lib($step->subpluginname);
$course = get_course($process->courseid); $course = get_course($process->courseid);
$result = $lib->process_course($course); $result = $lib->process_course($process->stepid, $course);
if ($result == step_response::waiting()) { if ($result == step_response::waiting()) {
break; break;
} else if ($result == step_response::proceed()) { } else if ($result == step_response::proceed()) {
......
...@@ -40,10 +40,11 @@ class dummy extends base { ...@@ -40,10 +40,11 @@ class dummy extends base {
* - that the subplugin is finished processing. * - that the subplugin is finished processing.
* - that the subplugin is not yet finished processing. * - that the subplugin is not yet finished processing.
* - that a rollback for this course is necessary. * - that a rollback for this course is necessary.
* @param $course object to be processed. * @param int $instanceid of the step instance.
* @param mixed $course to be processed.
* @return step_response * @return step_response
*/ */
public function process_course($course) { public function process_course($instanceid, $course) {
return step_response::proceed(); return step_response::proceed();
} }
......
...@@ -40,10 +40,11 @@ class email extends base { ...@@ -40,10 +40,11 @@ class email extends base {
* - that the subplugin is finished processing. * - that the subplugin is finished processing.
* - that the subplugin is not yet finished processing. * - that the subplugin is not yet finished processing.
* - that a rollback for this course is necessary. * - that a rollback for this course is necessary.
* @param $course object to be processed. * @param int $instanceid of the step instance.
* @param mixed $course to be processed.
* @return step_response * @return step_response
*/ */
public function process_course($course) { public function process_course($instanceid, $course) {
return step_response::waiting(); return step_response::waiting();
} }
......
...@@ -39,10 +39,11 @@ abstract class base { ...@@ -39,10 +39,11 @@ abstract class base {
* - that the subplugin is finished processing. * - that the subplugin is finished processing.
* - that the subplugin is not yet finished processing. * - that the subplugin is not yet finished processing.
* - that a rollback for this course is necessary. * - that a rollback for this course is necessary.
* @param $course object to be processed. * @param int $instanceid of the step instance.
* @param mixed $course to be processed.
* @return step_response * @return step_response
*/ */
public abstract function process_course($course); public abstract function process_course($instanceid, $course);
public abstract function get_subpluginname(); public abstract function get_subpluginname();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment