Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
en:create:checks [23.11.2020 15:31] – [Customized Response Check] sophia.schaueren:create:checks [23.11.2020 15:35] – [Customized Response Check] sophia.schauer
Line 66: Line 66:
 ===== Customized Response Check ===== ===== Customized Response Check =====
  
-If the predefined checks are insufficient, you can program a customized response check using a [[en:create:filters|filter]] and the [[:en:create:functions:repeatpage|repeatPage()]] function+If the predefined checks are insufficient, you can program a customized response check using a [[en:create:php-filters|PHP-filter]] and the [[:en:create:functions:repeatpage|repeatPage()]] function.
- +
-The PHP code used to check the answer must be put on the page __after__ the question at the top. Therefore, if the question that needs to be checked is on page 2 then the PHP code that checks the question must be put at the top on page 3. +
- +
-**Tip:** Further details about programming filters can be found under [[:en:create:filters|Filter Questions and Filters]]. +
- +
-**Tip:** Use the function ''[[:en:create:functions:markfail|markFail()]]'' to highlight inputs with incorrect responses. +
- +
-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.+
  
 +A detailed explanation and examples can be found in the [[:en:create:checks-php]] manual.
 ==== Example: All Items or None at All ==== ==== Example: All Items or None at All ====
  
en/create/checks.txt · Last modified: 23.11.2020 15:35 by sophia.schauer
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki