Commit 8d283b9c authored by Lückemeyer's avatar Lückemeyer
Browse files

added competency explanations

parent 1e2c13d9
Pipeline #8868 passed with stage
No preview for this file type
...@@ -73,22 +73,22 @@ $string["comp_simple"] = "Simplicity"; ...@@ -73,22 +73,22 @@ $string["comp_simple"] = "Simplicity";
$string["comp_abstraction"] = "Abstraction"; $string["comp_abstraction"] = "Abstraction";
// Competencies for index calculation. // Competencies for index calculation.
$string["comp1"] = $string["comp_statement"]; $string["comp0"] = $string["comp_statement"];
$string["comp2"] = $string["comp_block"]; $string["comp1"] = $string["comp_block"];
$string["comp3"] = $string["comp_flow"]; $string["comp2"] = $string["comp_flow"];
$string["comp4"] = $string["comp_loop"]; $string["comp3"] = $string["comp_loop"];
$string["comp5"] = $string["comp_const"]; $string["comp4"] = $string["comp_const"];
$string["comp6"] = $string["comp_var"]; $string["comp5"] = $string["comp_var"];
$string["comp7"] = $string["comp_type"]; $string["comp6"] = $string["comp_type"];
$string["comp8"] = $string["comp_datastructure"]; $string["comp7"] = $string["comp_datastructure"];
$string["comp9"] = $string["comp_interface"]; $string["comp8"] = $string["comp_interface"];
$string["comp10"] = $string["comp_unit"]; $string["comp9"] = $string["comp_unit"];
$string["comp11"] = $string["comp_proc_usage"]; $string["comp10"] = $string["comp_proc_usage"];
$string["comp12"] = $string["comp_proc_sign"]; $string["comp11"] = $string["comp_proc_sign"];
$string["comp13"] = $string["comp_library"]; $string["comp12"] = $string["comp_library"];
$string["comp14"] = $string["comp_ext_api"]; $string["comp13"] = $string["comp_ext_api"];
$string["comp15"] = $string["comp_simple"]; $string["comp14"] = $string["comp_simple"];
$string["comp16"] = $string["comp_abstraction"]; $string["comp15"] = $string["comp_abstraction"];
// Competency explanations. // Competency explanations.
$string["comp_statement_expl"] = "formulate a syntactically correct statement that contributes to the solution of the given problem."; $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 ...@@ -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_simple_expl"] = "create a simple solution of the given problem.";
$string["comp_abstraction_expl"] = "create a sufficiently abstract solution for 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. // Warnings.
$string["no_testfile_warning"] = "Submission type is \"Dockerized Testing Agent\" but no configuration file uploaded"; $string["no_testfile_warning"] = "Submission type is \"Dockerized Testing Agent\" but no configuration file uploaded";
......
...@@ -46,17 +46,30 @@ class ViewSubmissionUtils { ...@@ -46,17 +46,30 @@ class ViewSubmissionUtils {
$html .= ($summary->compilationErrorCount() == 0 && $summary->unknownCount() == 0) $html .= ($summary->compilationErrorCount() == 0 && $summary->unknownCount() == 0)
? $summary->resultCount() . " (" . $successrate . "%)" ? $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) { 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) { 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"); return html_writer::div($html, "dtaSubmissionSummary");
} }
...@@ -199,6 +212,7 @@ class ViewSubmissionUtils { ...@@ -199,6 +212,7 @@ class ViewSubmissionUtils {
// Add empty div for spacing between summary and compentency table. // Add empty div for spacing between summary and compentency table.
$html .= html_writer::empty_tag("div", ["class" => "dtaSpacer"]); $html .= html_writer::empty_tag("div", ["class" => "dtaSpacer"]);
// Competency assessment table.
$body = ""; $body = "";
$tmp = ""; $tmp = "";
$tmp .= html_writer::tag("th", get_string("competencies", self::COMPONENT_NAME), ["class" => "dtaTableHeader"]); $tmp .= html_writer::tag("th", get_string("competencies", self::COMPONENT_NAME), ["class" => "dtaTableHeader"]);
...@@ -218,8 +232,9 @@ class ViewSubmissionUtils { ...@@ -218,8 +232,9 @@ class ViewSubmissionUtils {
$resultrowattributes = $tablerowattributes; $resultrowattributes = $tablerowattributes;
$tmp = ""; $tmp = "";
$tmp .= html_writer::tag("td", get_string("comp" . $index, self::COMPONENT_NAME), $resultrowattributes); $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); "(" . $shown . " / " . $comp . ")", $resultrowattributes);
$tmp .= html_writer::tag("td", get_string("comp_expl" . $index, self::COMPONENT_NAME), $resultrowattributes);
$body .= html_writer::tag("tr", $tmp, $resultrowattributes); $body .= html_writer::tag("tr", $tmp, $resultrowattributes);
} }
......
Markdown is supported
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