From a5c23084431702cc2a68d774326d5a76e84fd3a6 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Mon, 7 May 2018 07:09:12 +0800 Subject: [PATCH] MDL-61407 question: Export step files in privacy --- question/classes/privacy/provider.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/question/classes/privacy/provider.php b/question/classes/privacy/provider.php index 746cad1356e..f17aead409c 100644 --- a/question/classes/privacy/provider.php +++ b/question/classes/privacy/provider.php @@ -282,6 +282,7 @@ class provider implements $comment ); + // Export any files associated with the comment files area. writer::with_context($context) ->export_area_files( $questionnocontext, @@ -293,6 +294,17 @@ class provider implements $stepdata->comment = $behaviour->format_comment($comment, $commentformat); } + // Export any response files associated with this step. + foreach (\question_engine::get_all_response_file_areas() as $filearea) { + writer::with_context($context) + ->export_area_files( + $questionnocontext, + 'question', + $filearea, + $step->get_id() + ); + } + $attemptdata->steps[$stepno] = $stepdata; } } -- 2.43.0