Commit 6bf26787 authored by Lückemeyer's avatar Lückemeyer
Browse files

fixed messages and competency body

parent 2f9156e1
Pipeline #8855 passed with stage
No preview for this file type
...@@ -33,11 +33,11 @@ $string["submission_settings_label_help"] = "single text file with DTA test URI ...@@ -33,11 +33,11 @@ $string["submission_settings_label_help"] = "single text file with DTA test URI
$string["enabled_help"] = "If enabled, you will have to upload a textfile containing a valid DTA URI pointing to the repository with your test logic and defining a docker image on dockerhub used as testrunner. Your students will have to either upload their code in a zip archive resembling the expected repository structure or as well by providing a textifle with a valid DTA URI pointing to the repository with their submission logic"; $string["enabled_help"] = "If enabled, you will have to upload a textfile containing a valid DTA URI pointing to the repository with your test logic and defining a docker image on dockerhub used as testrunner. Your students will have to either upload their code in a zip archive resembling the expected repository structure or as well by providing a textifle with a valid DTA URI pointing to the repository with their submission logic";
// Content. // Content.
$string["tests_successful"] = " tests successful"; $string["tests_successful"] = " successful";
$string["failures"] = " failures"; $string["failures"] = " failure";
$string["compilation_errors"] = " compilation error(s)"; $string["compilation_errors"] = " compilation error";
$string["unknown_state"] = " test(s) with unknown state"; $string["unknown_state"] = " with unknown state";
$string["sucess_competencies"] = "Successfully tested competency profile"; $string["success_competencies"] = "Successfully tested competency profile";
$string["summary"] = "Summary"; $string["summary"] = "Summary";
$string["total_items"] = "Total items"; $string["total_items"] = "Total items";
$string["success_rate"] = "Success rate"; $string["success_rate"] = "Success rate";
...@@ -70,7 +70,7 @@ $string["comp_proc_sign"] = "Procedure Signature"; ...@@ -70,7 +70,7 @@ $string["comp_proc_sign"] = "Procedure Signature";
$string["comp_library"] = "Library Usage"; $string["comp_library"] = "Library Usage";
$string["comp_ext_api"] = "External API Usage"; $string["comp_ext_api"] = "External API Usage";
$string["comp_simple"] = "Simplicity"; $string["comp_simple"] = "Simplicity";
$stirng["comp_abstraction"] = "Abstraction"; $string["comp_abstraction"] = "Abstraction";
// Competencies for index calculation. // Competencies for index calculation.
$string["comp1"] = $string["comp_statement"]; $string["comp1"] = $string["comp_statement"];
......
...@@ -18,6 +18,9 @@ defined('MOODLE_INTERNAL') || die(); ...@@ -18,6 +18,9 @@ defined('MOODLE_INTERNAL') || die();
class DtaResult { class DtaResult {
// Broadly used in logic, parametrized for easier change.
const COMPONENT_NAME = "assignsubmission_dta";
public $packagename; public $packagename;
public $classname; public $classname;
public $name; public $name;
...@@ -45,13 +48,13 @@ class DtaResult { ...@@ -45,13 +48,13 @@ class DtaResult {
*/ */
public static function getstatename(int $state): string { public static function getstatename(int $state): string {
if ($state == 1) { if ($state == 1) {
return "success"; return get_string("tests_successful", self::COMPONENT_NAME);
} else if ($state == 2) { } else if ($state == 2) {
return "failed"; return get_string("failures", self::COMPONENT_NAME);
} else if ($state == 3) { } else if ($state == 3) {
return "compilation error"; return get_string("compilation_errors", self::COMPONENT_NAME);
} else { } else {
return "unknown"; return get_string("unknown_state", self::COMPONENT_NAME);
} }
} }
} }
......
...@@ -198,7 +198,8 @@ class ViewSubmissionUtils { ...@@ -198,7 +198,8 @@ 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"]);
$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"]);
$tmp .= html_writer::empty_tag("th", ["class" => "dtaTableHeader"]); $tmp .= html_writer::empty_tag("th", ["class" => "dtaTableHeader"]);
......
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