diff --git a/renderer.php b/renderer.php index 7de8b646..1904bc73 100644 --- a/renderer.php +++ b/renderer.php @@ -575,7 +575,7 @@ public function correct_response(question_attempt $qa) { } } - $uclang = ucwords($currentlanguage); + $uclang = ucwords($currentlanguage ?? ''); // Current language can be null when prototype missing. $heading = get_string('asolutionis', 'qtype_coderunner'); $heading = substr($heading, 0, strlen($heading) - 1) . ' (' . $uclang . ')'; $divid = 'id_div_' . $fieldname;