File tree Expand file tree Collapse file tree
components/ILIAS/TestQuestionPool/classes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -377,6 +377,10 @@ private function completeParsedErrorTextFromErrorData(): void
377377 {
378378 foreach ($ this ->errordata as $ error ) {
379379 $ position = $ error ->getPosition ();
380+ if ($ position === null ) {
381+ continue ;
382+ }
383+
380384 foreach ($ this ->getParsedErrorText () as $ key => $ paragraph ) {
381385 if (array_key_exists ($ position , $ paragraph )) {
382386 $ this ->parsed_errortext [$ key ][$ position ]['text_correct ' ] =
@@ -905,7 +909,11 @@ private function generateArrayByPositionFromErrorData(): array
905909 {
906910 $ array_by_position = [];
907911 foreach ($ this ->errordata as $ error ) {
908- $ array_by_position [$ error ->getPosition ()] = [
912+ $ position = $ error ->getPosition ();
913+ if ($ position === null ) {
914+ continue ;
915+ }
916+ $ array_by_position [$ position ] = [
909917 'length ' => $ error ->getLength (),
910918 'points ' => $ error ->getPoints (),
911919 'text ' => $ error ->getTextWrong (),
You can’t perform that action at this time.
0 commit comments