Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision |
en:create:checks [15.01.2015 20:08] – [Probing] alexander.ritter | en:create:checks [05.05.2015 13:02] – admin |
---|
**Tip:** Use the function ''[[:en:create:functions:markfail|markFail()]]'' to highlight inputs with incorrect responses. | **Tip:** Use the function ''[[:en:create:functions:markfail|markFail()]]'' to highlight inputs with incorrect responses. |
| |
You will receive an error message when you display a text element using [[:en:create:functions:text|text()]] when answers are missing/incorrect. When you set up the text element make sure the text is displayed in the style of a //warning// -- then it will have the same format as the standard error messages. | Display an error message by passing the ID of a text element to ''repeatPage()'' (see below). Alternatively, you may simply display a text element using [[:en:create:functions:text|text()]] when answers are missing/incorrect. When you set up the text element make sure the text is displayed in the style of a //warning// -- then it will have the same format as the standard error messages. |
| |
==== Example: All Items or None at All ==== | ==== Example: All Items or None at All ==== |
// Error and go back if not all or none were answered | // Error and go back if not all or none were answered |
if ((count($answered) > 0) and (count($answered) < count($items))) { | if ((count($answered) > 0) and (count($answered) < count($items))) { |
text('error_AB01'); | repeatPage('error_AB01'); |
repeatPage(); | |
} | } |
</code> | </code> |