Commit 81d91c69 authored by Lückemeyer's avatar Lückemeyer
Browse files

fixed view index issue

1 merge request!1Coding style and recommendations
Showing with 4 additions and 3 deletions
+4 -3
No preview for this file type
......@@ -56,7 +56,7 @@ class ViewSubmissionUtils {
$html .= $summary->unknownCount() . get_string("unknown_state", self::COMPONENT_NAME) . "<br>";
}
$html .= $summary->successfulTestCompetencyProfile . get_string("success_competencies", self::COMPONENT_NAME) . "<br>";
$html .= get_string("success_competencies", self::COMPONENT_NAME) . $summary->successfulTestCompetencyProfile . "<br>";
return html_writer::div($html, "dtaSubmissionSummary");
}
......@@ -207,6 +207,7 @@ class ViewSubmissionUtils {
$showncompetencies = explode(";", $summary->successfultestcompetencies);
$overallcompetencies = explode(";", $summary->overalltestcompetencies);
$index=1;
foreach ($overallcompetencies as $comp) {
// If the competency was actually assessed by the assignment and tests, add a row in the table.
......@@ -218,8 +219,8 @@ class ViewSubmissionUtils {
$tmp = "";
$tmp .= html_writer::tag("td",
floatval($showncompetencies[index])/floatval ($comp) . "%
(" . $showncompetencies[index] . " / " . $comp . ")",
floatval($showncompetencies[$index])/floatval ($comp) . "%
(" . $showncompetencies[$index] . " / " . $comp . ")",
$resultrowattributes);
$body .= html_writer::tag("tr", $tmp, $resultrowattributes);
......
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