Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CoTA
moodle-assignsubmission_dta
Commits
7e5513dc
Commit
7e5513dc
authored
Dec 20, 2023
by
Lückemeyer
Browse files
fixed privacy code checker issues
parent
5e5c1d9b
Changes
2
Show whitespace changes
Inline
Side-by-side
dta.zip
View file @
7e5513dc
No preview for this file type
dta/privacy/provider.php
View file @
7e5513dc
...
@@ -23,20 +23,17 @@
...
@@ -23,20 +23,17 @@
*/
*/
namespace
assignsubmission_dta\privacy
;
namespace
assignsubmission_dta\privacy
;
defined
(
'MOODLE_INTERNAL'
)
||
die
();
use
core_privacy
\
local\metadata\collection
;
use
core_privacy
\
local\request\writer
;
use
\
core_privacy\local\metadata\collection
;
use
core_privacy
\
local\request\contextlist
;
use
\
core_privacy\local\request\writer
;
use
mod_assign\privacy\assign_plugin_request_data
;
use
\
core_privacy\local\request\contextlist
;
use
\
mod_assign\privacy\assign_plugin_request_data
;
class
provider
implements
class
provider
implements
// This plugin does store personal user data.
// This plugin does store personal user data.
\
core_privacy\local\metadata\provider
,
\
core_privacy\local\metadata\provider
,
\
core_privacy\local\request\data_provider
,
\
core_privacy\local\request\data_provider
,
\
mod_assign\privacy\assignsubmission_provider
,
\
mod_assign\privacy\assignsubmission_provider
,
\
mod_assign\privacy\assignsubmission_user_provider
\
mod_assign\privacy\assignsubmission_user_provider
{
{
/**
/**
* File area for dta submission assignment.
* File area for dta submission assignment.
...
@@ -140,7 +137,7 @@ class provider implements
...
@@ -140,7 +137,7 @@ class provider implements
$files
=
get_files
(
$submission
,
$user
);
$files
=
get_files
(
$submission
,
$user
);
foreach
(
$files
as
$file
)
{
foreach
(
$files
as
$file
)
{
$userid
=
$exportdata
->
get_pluginobject
()
->
userid
;
$userid
=
$exportdata
->
get_pluginobject
()
->
userid
;
$dtaresultsummary
=
DBUtils
::
getresultsummaryfromdatabase
(
$assign
->
id
,
$submission
->
id
);
$dtaresultsummary
=
DBUtils
::
getresultsummaryfromdatabase
(
$assign
->
id
,
$submission
->
id
);
// Submitted file.
// Submitted file.
writer
::
with_context
(
$exportdata
->
get_context
())
->
export_file
(
$exportdata
->
get_subcontext
(),
$file
)
writer
::
with_context
(
$exportdata
->
get_context
())
->
export_file
(
$exportdata
->
get_subcontext
(),
$file
)
// DTA result.
// DTA result.
...
@@ -152,7 +149,7 @@ class provider implements
...
@@ -152,7 +149,7 @@ class provider implements
'cmid'
=>
$context
->
instanceid
,
'cmid'
=>
$context
->
instanceid
,
'course'
=>
$coursecontext
->
instanceid
,
'course'
=>
$coursecontext
->
instanceid
,
'userid'
=>
$userid
,
'userid'
=>
$userid
,
'file'
=>
$file
'file'
=>
$file
,
]);
]);
}
}
}
}
...
@@ -240,7 +237,7 @@ class provider implements
...
@@ -240,7 +237,7 @@ class provider implements
* @return array - return an array of files indexed by filename
* @return array - return an array of files indexed by filename
*/
*/
public
function
get_files
(
stdClass
$submission
,
stdClass
$user
)
{
public
function
get_files
(
stdClass
$submission
,
stdClass
$user
)
{
$result
=
array
()
;
$result
=
[]
;
$fs
=
get_file_storage
();
$fs
=
get_file_storage
();
$files
=
$fs
->
get_area_files
(
$this
->
assignment
->
get_context
()
->
id
,
$files
=
$fs
->
get_area_files
(
$this
->
assignment
->
get_context
()
->
id
,
...
@@ -261,5 +258,4 @@ class provider implements
...
@@ -261,5 +258,4 @@ class provider implements
return
$result
;
return
$result
;
}
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment