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
8d283b9c
Commit
8d283b9c
authored
Nov 08, 2023
by
Lückemeyer
Browse files
added competency explanations
parent
1e2c13d9
Pipeline
#8868
passed with stage
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
dta.zip
View file @
8d283b9c
No preview for this file type
dta/lang/en/assignsubmission_dta.php
View file @
8d283b9c
...
...
@@ -73,22 +73,22 @@ $string["comp_simple"] = "Simplicity";
$string
[
"comp_abstraction"
]
=
"Abstraction"
;
// Competencies for index calculation.
$string
[
"comp
1
"
]
=
$string
[
"comp_statement"
];
$string
[
"comp
2
"
]
=
$string
[
"comp_block"
];
$string
[
"comp
3
"
]
=
$string
[
"comp_flow"
];
$string
[
"comp
4
"
]
=
$string
[
"comp_loop"
];
$string
[
"comp
5
"
]
=
$string
[
"comp_const"
];
$string
[
"comp
6
"
]
=
$string
[
"comp_var"
];
$string
[
"comp
7
"
]
=
$string
[
"comp_type"
];
$string
[
"comp
8
"
]
=
$string
[
"comp_datastructure"
];
$string
[
"comp
9
"
]
=
$string
[
"comp_interface"
];
$string
[
"comp
10
"
]
=
$string
[
"comp_unit"
];
$string
[
"comp1
1
"
]
=
$string
[
"comp_proc_usage"
];
$string
[
"comp1
2
"
]
=
$string
[
"comp_proc_sign"
];
$string
[
"comp1
3
"
]
=
$string
[
"comp_library"
];
$string
[
"comp1
4
"
]
=
$string
[
"comp_ext_api"
];
$string
[
"comp1
5
"
]
=
$string
[
"comp_simple"
];
$string
[
"comp1
6
"
]
=
$string
[
"comp_abstraction"
];
$string
[
"comp
0
"
]
=
$string
[
"comp_statement"
];
$string
[
"comp
1
"
]
=
$string
[
"comp_block"
];
$string
[
"comp
2
"
]
=
$string
[
"comp_flow"
];
$string
[
"comp
3
"
]
=
$string
[
"comp_loop"
];
$string
[
"comp
4
"
]
=
$string
[
"comp_const"
];
$string
[
"comp
5
"
]
=
$string
[
"comp_var"
];
$string
[
"comp
6
"
]
=
$string
[
"comp_type"
];
$string
[
"comp
7
"
]
=
$string
[
"comp_datastructure"
];
$string
[
"comp
8
"
]
=
$string
[
"comp_interface"
];
$string
[
"comp
9
"
]
=
$string
[
"comp_unit"
];
$string
[
"comp1
0
"
]
=
$string
[
"comp_proc_usage"
];
$string
[
"comp1
1
"
]
=
$string
[
"comp_proc_sign"
];
$string
[
"comp1
2
"
]
=
$string
[
"comp_library"
];
$string
[
"comp1
3
"
]
=
$string
[
"comp_ext_api"
];
$string
[
"comp1
4
"
]
=
$string
[
"comp_simple"
];
$string
[
"comp1
5
"
]
=
$string
[
"comp_abstraction"
];
// Competency explanations.
$string
[
"comp_statement_expl"
]
=
"formulate a syntactically correct statement that contributes to the solution of the given problem."
;
...
...
@@ -108,6 +108,24 @@ $string["comp_ext_api_expl"] = "use standardized existing external collections o
$string
[
"comp_simple_expl"
]
=
"create a simple solution of the given problem."
;
$string
[
"comp_abstraction_expl"
]
=
"create a sufficiently abstract solution for the given problem."
;
// Competency explanations for index calculations.
$string
[
"comp_expl0"
]
=
$string
[
"comp_statement_expl"
];
$string
[
"comp_expl1"
]
=
$string
[
"comp_block_expl"
];
$string
[
"comp_expl2"
]
=
$string
[
"comp_flow_expl"
];
$string
[
"comp_expl3"
]
=
$string
[
"comp_loop_expl"
];
$string
[
"comp_expl4"
]
=
$string
[
"comp_const_expl"
];
$string
[
"comp_expl5"
]
=
$string
[
"comp_var_expl"
];
$string
[
"comp_expl6"
]
=
$string
[
"comp_type_expl"
];
$string
[
"comp_expl7"
]
=
$string
[
"comp_datastructure_expl"
];
$string
[
"comp_expl8"
]
=
$string
[
"comp_interface_expl"
];
$string
[
"comp_expl9"
]
=
$string
[
"comp_unit_expl"
];
$string
[
"comp_expl10"
]
=
$string
[
"comp_proc_usage_expl"
];
$string
[
"comp_expl11"
]
=
$string
[
"comp_proc_sign_expl"
];
$string
[
"comp_expl12"
]
=
$string
[
"comp_library_expl"
];
$string
[
"comp_expl13"
]
=
$string
[
"comp_ext_api_expl"
];
$string
[
"comp_expl14"
]
=
$string
[
"comp_simple_expl"
];
$string
[
"comp_expl15"
]
=
$string
[
"comp_abstraction_expl"
];
// Warnings.
$string
[
"no_testfile_warning"
]
=
"Submission type is
\"
Dockerized Testing Agent
\"
but no configuration file uploaded"
;
...
...
dta/utils/view.php
View file @
8d283b9c
...
...
@@ -46,17 +46,30 @@ class ViewSubmissionUtils {
$html
.
=
(
$summary
->
compilationErrorCount
()
==
0
&&
$summary
->
unknownCount
()
==
0
)
?
$summary
->
resultCount
()
.
" ("
.
$successrate
.
"%)"
:
"?"
;
$html
.
=
get_string
(
"tests_successful"
,
self
::
COMPONENT_NAME
)
.
"<br>"
;
$html
.
=
get_string
(
"tests_successful"
,
self
::
COMPONENT_NAME
)
.
"<br
/
>"
;
if
(
$summary
->
compilationErrorCount
()
>
0
)
{
$html
.
=
$summary
->
compilationErrorCount
()
.
get_string
(
"compilation_errors"
,
self
::
COMPONENT_NAME
)
.
"<br>"
;
$html
.
=
$summary
->
compilationErrorCount
()
.
get_string
(
"compilation_errors"
,
self
::
COMPONENT_NAME
)
.
"<br
/
>"
;
}
if
(
$summary
->
unknownCount
()
>
0
)
{
$html
.
=
$summary
->
unknownCount
()
.
get_string
(
"unknown_state"
,
self
::
COMPONENT_NAME
)
.
"<br>"
;
$html
.
=
$summary
->
unknownCount
()
.
get_string
(
"unknown_state"
,
self
::
COMPONENT_NAME
)
.
"<br
/
>"
;
}
$html
.
=
get_string
(
"success_competencies"
,
self
::
COMPONENT_NAME
)
.
$summary
->
successfultestcompetencies
.
"<br>"
;
$showncompetencies
=
explode
(
";"
,
$summary
->
successfultestcompetencies
);
$overallcompetencies
=
explode
(
";"
,
$summary
->
overalltestcompetencies
);
$tmp
=
""
;
for
(
$index
=
0
,
$size
=
count
(
$showncompetencies
);
$index
<
$size
;
$index
++
)
{
$shown
=
$showncompetencies
[
$index
];
$comp
=
$overallcompetencies
[
$index
];
// If the competency was actually assessed by the assignment and tests, add a summary entry.
if
(
$shown
!=
"0"
)
{
$tmp
.
=
get_string
(
"comp"
.
$index
,
self
::
COMPONENT_NAME
)
.
" "
.
100
*
floatval
(
$shown
)
/
floatval
(
$comp
)
.
"% "
.
"<br />"
;
}
}
$html
.
=
get_string
(
"success_competencies"
,
self
::
COMPONENT_NAME
)
.
$tmp
.
"<br />"
;
return
html_writer
::
div
(
$html
,
"dtaSubmissionSummary"
);
}
...
...
@@ -199,6 +212,7 @@ class ViewSubmissionUtils {
// Add empty div for spacing between summary and compentency table.
$html
.
=
html_writer
::
empty_tag
(
"div"
,
[
"class"
=>
"dtaSpacer"
]);
// Competency assessment table.
$body
=
""
;
$tmp
=
""
;
$tmp
.
=
html_writer
::
tag
(
"th"
,
get_string
(
"competencies"
,
self
::
COMPONENT_NAME
),
[
"class"
=>
"dtaTableHeader"
]);
...
...
@@ -218,8 +232,9 @@ class ViewSubmissionUtils {
$resultrowattributes
=
$tablerowattributes
;
$tmp
=
""
;
$tmp
.
=
html_writer
::
tag
(
"td"
,
get_string
(
"comp"
.
$index
,
self
::
COMPONENT_NAME
),
$resultrowattributes
);
$tmp
.
=
html_writer
::
tag
(
"td"
,
floatval
(
$shown
)
/
floatval
(
$comp
)
.
"% "
.
$tmp
.
=
html_writer
::
tag
(
"td"
,
100
*
floatval
(
$shown
)
/
floatval
(
$comp
)
.
"% "
.
"("
.
$shown
.
" / "
.
$comp
.
")"
,
$resultrowattributes
);
$tmp
.
=
html_writer
::
tag
(
"td"
,
get_string
(
"comp_expl"
.
$index
,
self
::
COMPONENT_NAME
),
$resultrowattributes
);
$body
.
=
html_writer
::
tag
(
"tr"
,
$tmp
,
$resultrowattributes
);
}
...
...
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