Skip to content
Snippets Groups Projects
Commit 2e92173a authored by Justus Dieckmann's avatar Justus Dieckmann
Browse files

Add human readable course-, step- and workflowname

parent 22e57579
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,7 @@ use core_privacy\local\request\contextlist; ...@@ -33,6 +33,7 @@ use core_privacy\local\request\contextlist;
use core_privacy\local\request\userlist; use core_privacy\local\request\userlist;
use core_privacy\local\request\writer; use core_privacy\local\request\writer;
use tool_lifecycle\local\manager\step_manager; use tool_lifecycle\local\manager\step_manager;
use tool_lifecycle\local\manager\workflow_manager;
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
...@@ -101,6 +102,10 @@ class provider implements ...@@ -101,6 +102,10 @@ class provider implements
$writer = writer::with_context($contextlist->current()); $writer = writer::with_context($contextlist->current());
foreach ($records as $record) { foreach ($records as $record) {
$step = step_manager::get_step_instance_by_workflow_index($record->workflowid, $record->stepindex); $step = step_manager::get_step_instance_by_workflow_index($record->workflowid, $record->stepindex);
$workflow = workflow_manager::get_workflow($record->workflowid);
$record->course = get_course($record->courseid)->fullname;
$record->step = $step->instancename;
$record->workflow = $workflow->displaytitle;
$subcontext = ['tool_lifecycle', 'action_log', "process_$record->processid", $step->instancename, $subcontext = ['tool_lifecycle', 'action_log', "process_$record->processid", $step->instancename,
"action_$record->action"]; "action_$record->action"];
$writer->export_data($subcontext, $record); $writer->export_data($subcontext, $record);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment