Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
HFTSoftwareProject
MoodleDTA
Commits
8e9e343e
Commit
8e9e343e
authored
Dec 28, 2023
by
Lückemeyer
Browse files
fixed comments & parameters, bumped version
parent
8c2567ab
Changes
8
Hide whitespace changes
Inline
Side-by-side
dta.zip
View file @
8e9e343e
No preview for this file type
dta/classes/privacy/provider.php
View file @
8e9e343e
...
...
@@ -28,6 +28,13 @@ use core_privacy\local\request\writer;
use
core_privacy
\
local\request\contextlist
;
use
mod_assign\privacy\assign_plugin_request_data
;
/**
* provider for data privacy
*
* @package assignsubmission_dta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright Gero Lueckemeyer and student project teams
*/
class
provider
implements
\
core_privacy\local\metadata\provider
,
\
mod_assign\privacy\assignsubmission_provider
,
\
mod_assign\privacy\assignsubmission_user_provider
{
...
...
dta/lib.php
View file @
8e9e343e
...
...
@@ -37,9 +37,9 @@ function assignsubmission_dta_pluginfile(
$course
,
$cm
,
context
$context
,
$filearea
,
string
$filearea
,
$args
,
$forcedownload
bool
$forcedownload
)
{
global
$DB
,
$CFG
;
...
...
dta/locallib.php
View file @
8e9e343e
...
...
@@ -174,7 +174,7 @@ class assign_submission_dta extends assign_submission_plugin {
* @param int $userid current user
* @return bool form elements added
*/
public
function
get_form_elements_for_user
(
$submissionorgrade
,
MoodleQuickForm
$mform
,
stdClass
$data
,
$userid
):
bool
{
public
function
get_form_elements_for_user
(
$submissionorgrade
,
MoodleQuickForm
$mform
,
stdClass
$data
,
int
$userid
):
bool
{
// Prepare submission filearea.
$data
=
file_prepare_standard_filemanager
(
$data
,
...
...
@@ -228,7 +228,7 @@ class assign_submission_dta extends assign_submission_plugin {
* @param string $areaid filearea id to count
* @return int
*/
private
function
count_files
(
$submissionid
,
$areaid
)
{
private
function
count_files
(
int
$submissionid
,
string
$areaid
)
{
$fs
=
get_file_storage
();
$files
=
$fs
->
get_area_files
(
$this
->
assignment
->
get_context
()
->
id
,
self
::
COMPONENT_NAME
,
...
...
dta/utils/backend.php
View file @
8e9e343e
...
...
@@ -14,14 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* This file contains the backend webservice contact functionality for the DTA plugin
*
* @package assignsubmission_dta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright Gero Lueckemeyer and student project teams
*/
/**
* backend webservice contact utility class
*
...
...
@@ -48,11 +40,11 @@ class DtaBackendUtils {
/**
* Sends the configuration textfile uploaded by prof to the backend.
*
* @param $assignment assignment this test-config belongs to
* @param $file uploaded test-config
* @param
stdClass
$assignment assignment this test-config belongs to
* @param
stdClass
$file uploaded test-config
* @return bool true if no error occurred
*/
public
static
function
sendtestconfigtobackend
(
$assignment
,
$file
):
bool
{
public
static
function
sendtestconfigtobackend
(
stdClass
$assignment
,
$file
):
bool
{
$backendaddress
=
self
::
getbackendbaseurl
();
if
(
empty
(
$backendaddress
))
{
return
true
;
...
...
@@ -78,11 +70,11 @@ class DtaBackendUtils {
/**
* Sends sumbission config or archive to backend to be tested.
*
* @param $assignment assignment this submission is done for
* @param $file submission config file or archive with submission
* @param
stdClass
$assignment assignment this submission is done for
* @param
stdClass
$file submission config file or archive with submission
* @return string json string with testresults or null on error
*/
public
static
function
sendsubmissiontobackend
(
$assignment
,
$file
):
?string
{
public
static
function
sendsubmissiontobackend
(
stdClass
$assignment
,
$file
):
?string
{
$backendaddress
=
self
::
getbackendbaseurl
();
if
(
empty
(
$backendaddress
))
{
return
true
;
...
...
dta/utils/database.php
View file @
8e9e343e
...
...
@@ -37,7 +37,7 @@ class DbUtils {
*
* @param int $assignmentid assignment id to search for
* @param int $submissionid submission id to search for
* @return Dt
t
ResultSummary representing given submission
* @return Dt
a
ResultSummary representing given submission
*/
public
static
function
getresultsummaryfromdatabase
(
int
$assignmentid
,
...
...
@@ -88,9 +88,9 @@ class DbUtils {
* save given result summary and single results to database
* under given assignment and submission id
*
* @param $assignmentid assigment this is submission is linked to
* @param $submissionid submission of this result
* @param $summary instance to persist
* @param
int
$assignmentid assigment this is submission is linked to
* @param
int
$submissionid submission of this result
* @param
DtaResultSummary
$summary instance to persist
*/
public
static
function
storeresultsummarytodatabase
(
int
$assignmentid
,
...
...
dta/utils/view.php
View file @
8e9e343e
...
...
@@ -31,8 +31,8 @@ class view_submission_utils {
/**
* generates a short summary html
*
* @param $assignmentid assignment
* @param $submissionid submission to create a report
for
* @param
int
$assignmentid
id of the
assignment
* @param
int
$submissionid
id of the
submission
for which
to create a report
* @return string html
*/
public
static
function
generatesummaryhtml
(
...
...
@@ -87,8 +87,8 @@ class view_submission_utils {
/**
* generates detailed view html
*
* @param $assignmentid assignment
* @param $submissionid submission to create a report
for
* @param
int
$assignmentid
id of the
assignment
* @param
int
$submissionid
id of the
submission
for which
to create a report
*/
public
static
function
generatedetailhtml
(
int
$assignmentid
,
...
...
dta/version.php
View file @
8e9e343e
...
...
@@ -24,8 +24,8 @@
defined
(
'MOODLE_INTERNAL'
)
||
die
();
$plugin
->
version
=
2
000000
;
$plugin
->
requires
=
20
19111800
;
// Moodle 3.
8
.
$plugin
->
version
=
3
000000
;
$plugin
->
requires
=
20
20061525
;
// Moodle 3.
9 LTS. Will likely run with unsupported older versions of the 3.x branch
.
$plugin
->
component
=
'assignsubmission_dta'
;
$plugin
->
maturity
=
MATURITY_STABLE
;
$plugin
->
release
=
"
2
.0.0"
;
$plugin
->
release
=
"
3
.0.0"
;
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