Commit 1c83b901 authored by Lückemeyer's avatar Lückemeyer
Browse files

changed competency display to full

parent 6bf26787
Pipeline #8861 passed with stage
No preview for this file type
...@@ -56,7 +56,7 @@ class ViewSubmissionUtils { ...@@ -56,7 +56,7 @@ class ViewSubmissionUtils {
$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->successfulTestCompetencyProfile . "<br>"; $html .= get_string("success_competencies", self::COMPONENT_NAME) . $summary->successfultestcompetencies . "<br>";
return html_writer::div($html, "dtaSubmissionSummary"); return html_writer::div($html, "dtaSubmissionSummary");
} }
...@@ -209,10 +209,11 @@ class ViewSubmissionUtils { ...@@ -209,10 +209,11 @@ class ViewSubmissionUtils {
$showncompetencies = explode(";", $summary->successfultestcompetencies); $showncompetencies = explode(";", $summary->successfultestcompetencies);
$overallcompetencies = explode(";", $summary->overalltestcompetencies); $overallcompetencies = explode(";", $summary->overalltestcompetencies);
$index=1; for ($index=1, $size=count($overallcompetencies; $index<=$size; $index++) {
foreach ($overallcompetencies as $comp) { $comp=$overallcompetencies[$index];
$shown=$showncompetencies[$index];
// If the competency was actually assessed by the assignment and tests, add a row in the table. // If the competency was actually assessed by the assignment and tests, add a row in the table.
if($comp!="0") { // if($comp!="0") {
// New copy of base attributes array. // New copy of base attributes array.
$resultrowattributes = $tablerowattributes; $resultrowattributes = $tablerowattributes;
$tmp = ""; $tmp = "";
...@@ -220,13 +221,12 @@ class ViewSubmissionUtils { ...@@ -220,13 +221,12 @@ class ViewSubmissionUtils {
$tmp = ""; $tmp = "";
$tmp .= html_writer::tag("td", $tmp .= html_writer::tag("td",
floatval($showncompetencies[$index])/floatval ($comp) . "% floatval($shown)/floatval ($comp) . "%
(" . $showncompetencies[$index] . " / " . $comp . ")", (" . $shown . " / " . $comp . ")",
$resultrowattributes); $resultrowattributes);
$body .= html_writer::tag("tr", $tmp, $resultrowattributes); $body .= html_writer::tag("tr", $tmp, $resultrowattributes);
} // }
$index = $index + 1;
} }
$body = html_writer::tag("tbody", $body); $body = html_writer::tag("tbody", $body);
$html .= html_writer::tag("table", $header . $body, ["class" => "dtaTable"]); $html .= html_writer::tag("table", $header . $body, ["class" => "dtaTable"]);
......
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