diff --git a/quiz/generic/wizard/checks.php b/quiz/generic/wizard/checks.php index 6cbbb74206..9192b5aab3 100644 --- a/quiz/generic/wizard/checks.php +++ b/quiz/generic/wizard/checks.php @@ -199,40 +199,15 @@ function evalchecks() } else { // we are coming from this page (checks.php) evalchecks(); } -?> - - -" . sprintf(_("If you have entered all error tests click here to view the output."), "./output.php") . "

\n

"; echo sprintf(_("You can also go back to add further error messages."), "./messages.php") . "

"; -echo "
\n"; +echo "\n"; echo "

" . _("In all textfields below you can encode linebreaks as \\n if you need them.") . "

\n"; -echo "
\n

" . _("Check for forbidden text") . "

\n"; +echo "
\n

" . _("Check for forbidden text") . "

\n"; echo "

" . _("This will look if at least one of the strings you give here does occur in the text.") . "

\n"; @@ -259,7 +234,7 @@ function chkFormular () { echo "" . _("Built-in message:"); echo " \n

\n
\n"; -echo "

" . _("Check for expected text") . "

\n"; +echo "

" . _("Check for expected text") . "

\n"; echo _("This will look if at least one of the strings you give here does occur in the text.") . "

\n"; echo "

\n"; @@ -285,7 +260,7 @@ function chkFormular () { echo "" . _("Built-in message:"); echo " \n

\n
\n"; -echo "

" . _("Check for text in wrong order") . "

\n"; +echo "

" . _("Check for text in wrong order") . "

\n"; echo "

" . _("First Text (has to be before second text):") . "

\n"; echo "

" . _("Second Text (has to be before first text):") . "
\n"; echo _("Search case sensitive?") . " " . _("Yes"); @@ -296,7 +271,7 @@ function chkFormular () { echo "" . _("Built-in message:"); echo " \n

\n
\n"; -echo "

" . _("Check for text incorrectly appearing twice or more times") . "

\n"; +echo "

" . _("Check for text incorrectly appearing twice or more times") . "

\n"; echo "

" . _("Text which is expected only once:") . "
\n"; echo _("Search case sensitive?") . " " . _("Yes"); echo "\n" . _("No") . "
\n"; @@ -306,7 +281,7 @@ function chkFormular () { echo "" . _("Built-in message:"); echo " \n

\n
\n"; -echo "

" . _("Check for markup with opening and closing tag which is completely missing") . "

\n"; +echo "

" . _("Check for markup with opening and closing tag which is completely missing") . "

\n"; echo "

" . _("Opening tag:") . " \n"; echo "

" . _("Closing tag:") . "
\n"; echo _("Search case sensitive?") . " " . _("Yes"); @@ -317,7 +292,7 @@ function chkFormular () { echo "" . _("Built-in message:"); echo " \n

\n
\n"; -echo "

" . _("Check for corrupt markup with opening and closing tag") . "

\n"; +echo "

" . _("Check for corrupt markup with opening and closing tag") . "

\n"; echo "

" . _("For now this only checks for one orphaned opening or closing tag and for the correct order of the tags. So it basically only works OK, if there is just one pair of opening/closing tags expected in the text.") . "

\n"; echo "

" . _("Opening tag:") . "

\n"; echo "

" . _("Closing tag:") . "
\n"; @@ -329,7 +304,7 @@ function chkFormular () { echo "" . _("Built-in message:"); echo " \n

\n
\n"; -echo "

" . _("Check for expected number of linebreaks between two chunks of text.") . "

\n"; +echo "

" . _("Check for expected number of linebreaks between two chunks of text.") . "

\n"; echo "

" . _("First text:") . "

\n"; echo "

" . _("Second text:") . "
\n"; echo "Search case sensitive? " . _("Yes"); @@ -347,7 +322,7 @@ function chkFormular () { echo "" . _("Built-in message:"); echo " \n

\n
\n"; -echo "

" . _("Check for long lines.") . "

\n"; +echo "

" . _("Check for long lines.") . "

\n"; echo "

" . _("Max. allowed line length:") . "
\n"; echo _("Error message to be given if a line is longer than allowed:") . "
\n"; echo "" . _("Your message:"); diff --git a/quiz/generic/wizard/output.php b/quiz/generic/wizard/output.php index 92556c1f4f..0662f74965 100644 --- a/quiz/generic/wizard/output.php +++ b/quiz/generic/wizard/output.php @@ -103,12 +103,12 @@ function make_output() } } $out .= ")"; - if ($err['P_guideline'] != "") { + if (($err['P_guideline'] ?? "") != "") { $out .= ', "guideline" => "'; $out .= ssqs($err['P_guideline']); $out .= '"'; } - if ($err['F_guideline'] != "") { + if (($err['F_guideline'] ?? "") != "") { $out .= ', "guideline" => "'; $out .= ssqs($err['F_guideline']); $out .= '"';