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-assignfeedback_dta
Commits
b21fd370
Commit
b21fd370
authored
Jan 27, 2026
by
Abbassy
Browse files
Fix null handling and update defaults/docs
parent
fba97647
Changes
2
Show whitespace changes
Inline
Side-by-side
README.md
View file @
b21fd370
...
@@ -27,7 +27,12 @@ Data
...
@@ -27,7 +27,12 @@ Data
Behavior notes (current)
Behavior notes (current)
------------------------
------------------------
-
Suggested grade is calculated with 50/50 weighting (tests/competencies) as provided by the backend; “hard 0” for compilation errors removed.
-
Suggested grade is calculated with 50/50 weighting (tests/competencies) as provided by the backend; “hard 0” for compilation errors removed.
-
Column renders percent when DTA data exists; nothing else is shown elsewhere.
-
Column renders percent when DTA data exists; nothing else is shown elsewhere. Missing DTA rows are handled gracefully (no output).
Release package
---------------
-
Top-level folder:
`assignfeedback_dta`
(ready to unzip into
`mod/assign/feedback`
).
-
ZIP excludes VCS and assets:
`.git`
,
`.assets`
.
Packaging
Packaging
---------
---------
...
...
locallib.php
View file @
b21fd370
...
@@ -130,10 +130,8 @@ class assign_feedback_dta extends assign_feedback_plugin {
...
@@ -130,10 +130,8 @@ class assign_feedback_dta extends assign_feedback_plugin {
null
,
// No description text - help only via help button
null
,
// No description text - help only via help button
null
,
array
(
0
,
1
));
null
,
array
(
0
,
1
));
$mform
->
addHelpButton
(
'assignfeedback_dta_gradeautomatically'
,
'grade_automatically'
,
self
::
COMPONENT_NAME
);
$mform
->
addHelpButton
(
'assignfeedback_dta_gradeautomatically'
,
'grade_automatically'
,
self
::
COMPONENT_NAME
);
// Set default value from saved config, or 1 if not set yet.
// Default to disabled for new assignments.
// Default to disabled (0) if not set.
$mform
->
setDefault
(
'assignfeedback_dta_gradeautomatically'
,
0
);
$defaultvalue
=
$this
->
get_config
(
'gradeautomatically'
,
0
);
$mform
->
setDefault
(
'assignfeedback_dta_gradeautomatically'
,
$defaultvalue
);
$mform
->
setType
(
'assignfeedback_dta_gradeautomatically'
,
PARAM_BOOL
);
$mform
->
setType
(
'assignfeedback_dta_gradeautomatically'
,
PARAM_BOOL
);
// Hide the checkbox if this feedback plugin (Dockerized Test Agent) is not enabled.
// Hide the checkbox if this feedback plugin (Dockerized Test Agent) is not enabled.
...
@@ -643,6 +641,9 @@ class assign_feedback_dta extends assign_feedback_plugin {
...
@@ -643,6 +641,9 @@ class assign_feedback_dta extends assign_feedback_plugin {
$submission
=
$this
->
assignment
->
get_user_submission
(
$grade
->
userid
,
false
,
-
1
);
$submission
=
$this
->
assignment
->
get_user_submission
(
$grade
->
userid
,
false
,
-
1
);
if
(
!
empty
(
$submission
)
&&
$this
->
are_dta_tables_available
())
{
if
(
!
empty
(
$submission
)
&&
$this
->
are_dta_tables_available
())
{
$dtasubmission
=
$this
->
get_dta_submission
(
$this
->
assignment
->
get_instance
()
->
id
,
$submission
->
id
);
$dtasubmission
=
$this
->
get_dta_submission
(
$this
->
assignment
->
get_instance
()
->
id
,
$submission
->
id
);
if
(
$dtasubmission
===
false
)
{
$dtasubmission
=
null
;
// normalize missing record to null
}
}
}
}
}
...
...
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