Commit 7e5513dc authored by Lückemeyer's avatar Lückemeyer
Browse files

fixed privacy code checker issues

1 merge request!1Coding style and recommendations
This commit is part of merge request !1. Comments created here will be created in the context of that merge request.
Showing with 17 additions and 21 deletions
+17 -21
No preview for this file type
......@@ -23,20 +23,17 @@
*/
namespace assignsubmission_dta\privacy;
defined('MOODLE_INTERNAL') || die();
use \core_privacy\local\metadata\collection;
use \core_privacy\local\request\writer;
use \core_privacy\local\request\contextlist;
use \mod_assign\privacy\assign_plugin_request_data;
use core_privacy\local\metadata\collection;
use core_privacy\local\request\writer;
use core_privacy\local\request\contextlist;
use mod_assign\privacy\assign_plugin_request_data;
class provider implements
// This plugin does store personal user data.
\core_privacy\local\metadata\provider,
\core_privacy\local\request\data_provider,
\mod_assign\privacy\assignsubmission_provider,
\mod_assign\privacy\assignsubmission_user_provider
{
\mod_assign\privacy\assignsubmission_user_provider {
/**
* File area for dta submission assignment.
......@@ -140,7 +137,7 @@ class provider implements
$files = get_files($submission, $user);
foreach ($files as $file) {
$userid = $exportdata->get_pluginobject()->userid;
$dtaresultsummary=DBUtils::getresultsummaryfromdatabase($assign->id, $submission->id);
$dtaresultsummary = DBUtils::getresultsummaryfromdatabase($assign->id, $submission->id);
// Submitted file.
writer::with_context($exportdata->get_context())->export_file($exportdata->get_subcontext(), $file)
// DTA result.
......@@ -152,7 +149,7 @@ class provider implements
'cmid' => $context->instanceid,
'course' => $coursecontext->instanceid,
'userid' => $userid,
'file' => $file
'file' => $file,
]);
}
}
......@@ -240,7 +237,7 @@ class provider implements
* @return array - return an array of files indexed by filename
*/
public function get_files(stdClass $submission, stdClass $user) {
$result = array();
$result = [];
$fs = get_file_storage();
$files = $fs->get_area_files($this->assignment->get_context()->id,
......@@ -261,5 +258,4 @@ class provider implements
return $result;
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment