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
c3f1650d
Commit
c3f1650d
authored
Dec 29, 2023
by
Lückemeyer
Browse files
restored util directory
parent
8642b1b7
Pipeline
#9008
passed with stage
Changes
9
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
dta.zip
View file @
c3f1650d
No preview for this file type
dta/classes/privacy/provider.php
View file @
c3f1650d
...
...
@@ -16,11 +16,6 @@
namespace
assignsubmission_dta\privacy
;
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
;
/**
* provider for data privacy
*
...
...
@@ -28,6 +23,11 @@ use mod_assign\privacy\assign_plugin_request_data;
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright Gero Lueckemeyer and student project teams
*/
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
\
core_privacy\local\metadata\provider
,
\
mod_assign\privacy\assignsubmission_provider
,
\
mod_assign\privacy\assignsubmission_user_provider
{
...
...
@@ -39,9 +39,9 @@ class provider implements \core_privacy\local\metadata\provider,
/**
* This is the metadata information for the assignsubmission_dta plugin.
* @param
stdClass
$collection the collection of metadata filled by the plugin
* @param
collection
$collection the collection of metadata filled by the plugin
*/
public
static
function
get_metadata
(
stdClass
$collection
):
collection
{
public
static
function
get_metadata
(
collection
$collection
):
collection
{
$collection
->
add_subsystem_link
(
'core_files'
,
[],
...
...
dta/lib.php
View file @
c3f1650d
...
...
@@ -37,9 +37,9 @@ function assignsubmission_dta_pluginfile(
$course
,
$cm
,
context
$context
,
string
$filearea
,
$filearea
,
$args
,
bool
$forcedownload
$forcedownload
)
{
global
$DB
,
$CFG
;
...
...
dta/locallib.php
View file @
c3f1650d
...
...
@@ -226,7 +226,7 @@ class assign_submission_dta extends assign_submission_plugin {
*
* @param int $submissionid submission id to check
* @param string $areaid filearea id to count
* @return int
* @return int
number of files submitted in the filearea
*/
private
function
count_files
(
int
$submissionid
,
string
$areaid
)
{
$fs
=
get_file_storage
();
...
...
dta/models/DtaResult.php
View file @
c3f1650d
...
...
@@ -143,9 +143,9 @@ class DtaResultSummary {
/**
* Decodes the JSON result summary returned by the backend service call into the plugin PHP data structure.
* @param string $jsonstring jsonString containing DtaResultSummary
* @return DtaResultSummary
* @return DtaResultSummary
the result summary
*/
public
static
function
decodejson
(
$jsonstring
):
DtaResultSummary
{
public
static
function
decodejson
(
string
$jsonstring
):
DtaResultSummary
{
$response
=
json_decode
(
$jsonstring
);
$summary
=
new
DtaResultSummary
();
...
...
@@ -188,6 +188,7 @@ class DtaResultSummary {
return
$ret
;
}
/**
* Returns the number of detail results attached to the summary.
* @return int count of occurences
...
...
dta/utils/backend.php
View file @
c3f1650d
...
...
@@ -14,6 +14,14 @@
// 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
*
...
...
@@ -40,11 +48,11 @@ class DtaBackendUtils {
/**
* Sends the configuration textfile uploaded by prof to the backend.
*
* @param
stdClass
$assignment assignment this test-config belongs to
* @param
stdClass
$file uploaded test-config
* @param $assignment assignment this test-config belongs to
* @param $file uploaded test-config
* @return bool true if no error occurred
*/
public
static
function
sendtestconfigtobackend
(
stdClass
$assignment
,
$file
):
bool
{
public
static
function
sendtestconfigtobackend
(
$assignment
,
$file
):
bool
{
$backendaddress
=
self
::
getbackendbaseurl
();
if
(
empty
(
$backendaddress
))
{
return
true
;
...
...
@@ -70,11 +78,11 @@ class DtaBackendUtils {
/**
* Sends sumbission config or archive to backend to be tested.
*
* @param
stdClass
$assignment assignment this submission is done for
* @param
stdClass
$file submission config file or archive with submission
* @param $assignment assignment this submission is done for
* @param $file submission config file or archive with submission
* @return string json string with testresults or null on error
*/
public
static
function
sendsubmissiontobackend
(
stdClass
$assignment
,
$file
):
?string
{
public
static
function
sendsubmissiontobackend
(
$assignment
,
$file
):
?string
{
$backendaddress
=
self
::
getbackendbaseurl
();
if
(
empty
(
$backendaddress
))
{
return
true
;
...
...
dta/utils/database.php
View file @
c3f1650d
...
...
@@ -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/>.
/**
* persistence layer utility class
*
* @package assignsubmission_dta
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @copyright Gero Lueckemeyer and student project teams
*/
/**
* persistence layer utility class
*
...
...
@@ -45,7 +37,7 @@ class DbUtils {
*
* @param int $assignmentid assignment id to search for
* @param int $submissionid submission id to search for
* @return Dt
a
ResultSummary representing given submission
* @return Dt
t
ResultSummary representing given submission
*/
public
static
function
getresultsummaryfromdatabase
(
int
$assignmentid
,
...
...
@@ -96,9 +88,9 @@ class DbUtils {
* save given result summary and single results to database
* under given assignment and submission id
*
* @param
int
$assignmentid assigment this is submission is linked to
* @param
int
$submissionid submission of this result
* @param
DtaResultSummary
$summary instance to persist
* @param $assignmentid assigment this is submission is linked to
* @param $submissionid submission of this result
* @param $summary instance to persist
*/
public
static
function
storeresultsummarytodatabase
(
int
$assignmentid
,
...
...
dta/utils/view.php
View file @
c3f1650d
...
...
@@ -31,8 +31,8 @@ class view_submission_utils {
/**
* generates a short summary html
*
* @param
int
$assignmentid
id of the
assignment
* @param
int
$submissionid
id of the
submission
for which
to create a report
* @param $assignmentid assignment
* @param $submissionid submission to create a report
for
* @return string html
*/
public
static
function
generatesummaryhtml
(
...
...
@@ -87,8 +87,8 @@ class view_submission_utils {
/**
* generates detailed view html
*
* @param
int
$assignmentid
id of the
assignment
* @param
int
$submissionid
id of the
submission
for which
to create a report
* @param $assignmentid assignment
* @param $submissionid submission to create a report
for
*/
public
static
function
generatedetailhtml
(
int
$assignmentid
,
...
...
dta/version.php
View file @
c3f1650d
...
...
@@ -25,7 +25,7 @@
defined
(
'MOODLE_INTERNAL'
)
||
die
();
$plugin
->
version
=
3000000
;
$plugin
->
requires
=
2020061525
;
// Moodle 3.9 LTS.
Will likely run with
unsupported
older
versions
o
f the 3.x branch.
$plugin
->
requires
=
2020061525
;
// Moodle 3.9 LTS.
Older
unsupported versions f
rom
the 3.x branch
should also work
.
$plugin
->
component
=
'assignsubmission_dta'
;
$plugin
->
maturity
=
MATURITY_STABLE
;
$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