"dta/classes/view_submission_utils.php" did not exist on "8e9e343e09a87509af9f70b490d093f3e1bfbb1a"
Commit 047da14d authored by Lückemeyer's avatar Lückemeyer
Browse files

fixed short array notation

parent ee0c7e20
Showing with 8 additions and 10 deletions
+8 -10
No preview for this file type
...@@ -49,9 +49,7 @@ function assignsubmission_dta_pluginfile( ...@@ -49,9 +49,7 @@ function assignsubmission_dta_pluginfile(
require_login($course, false, $cm); require_login($course, false, $cm);
$itemid = (int)array_shift($args); $itemid = (int)array_shift($args);
$record = $DB->get_record('assign_submission', $record = $DB->get_record('assign_submission',
[ ['id' => $itemid],
'id' => $itemid,
],
'userid, assignment, groupid', 'userid, assignment, groupid',
MUST_EXIST); MUST_EXIST);
$userid = $record->userid; $userid = $record->userid;
......
...@@ -100,9 +100,7 @@ class assign_submission_dta extends assign_submission_plugin { ...@@ -100,9 +100,7 @@ class assign_submission_dta extends assign_submission_plugin {
self::COMPONENT_NAME, self::COMPONENT_NAME,
self::ASSIGNSUBMISSION_DTA_FILEAREA_TEST, self::ASSIGNSUBMISSION_DTA_FILEAREA_TEST,
0, 0,
[ ['subdirs' => 0]
'subdirs' => 0,
]
); );
$defaultvalues[self::ASSIGNSUBMISSION_DTA_DRAFT_FILEAREA_TEST] = $draftitemid; $defaultvalues[self::ASSIGNSUBMISSION_DTA_DRAFT_FILEAREA_TEST] = $draftitemid;
......
...@@ -78,10 +78,10 @@ class DtaBackendUtils { ...@@ -78,10 +78,10 @@ class DtaBackendUtils {
$url = $backendaddress . "/v1/task"; $url = $backendaddress . "/v1/task";
// Prepare params. // Prepare params.
$params = array( $params = [
"taskFile" => $file, "taskFile" => $file,
"assignmentId" => $assignment->get_instance()->id "assignmentId" => $assignment->get_instance()->id,
); ];
return self::post($url, $params); return self::post($url, $params);
} }
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
// You should have received a copy of the GNU General Public License // You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>. // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
defined('MOODLE_INTERNAL') || die();
class DbUtils { class DbUtils {
// Summary database table name. // Summary database table name.
...@@ -38,7 +40,7 @@ class DbUtils { ...@@ -38,7 +40,7 @@ class DbUtils {
$summaryrecord = $DB->get_record(self::TABLE_SUMMARY, [ $summaryrecord = $DB->get_record(self::TABLE_SUMMARY, [
"assignment_id" => $assignmentid, "assignment_id" => $assignmentid,
"submission_id" => $submissionid, "submission_id" => $submissionid,
}); ]);
$resultsarray = $DB->get_records(self::TABLE_RESULT, [ $resultsarray = $DB->get_records(self::TABLE_RESULT, [
"assignment_id" => $assignmentid, "assignment_id" => $assignmentid,
......
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