Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
en:create:points [02.04.2015 15:45] oezbf2012en:create:points [06.12.2015 15:03] – [Correct and Incorrect Answers] admin
Line 27: Line 27:
 // Define questions and the correct answers // Define questions and the correct answers
 $questions = array( $questions = array(
-  'AB01' => 3),  // correct answer to question AB01 is 3 +  'AB01' => 3,  // correct answer to question AB01 is 3 
-  'AB02' => 1),  // correct answer to AB02 is code 1 +  'AB02' => 1,  // correct answer to AB02 is code 1 
-  'AB03' => 4),  // correct answer to AB03 is hidden behind code 4 +  'AB03' => 4,  // correct answer to AB03 is hidden behind code 4 
-  'AB04' => 2)+  'AB04' => 2, 
-  'AB05' => 1) +  'AB05' => 1 
-  // and so on+  // and so on
 ); );
  
Line 48: Line 48:
 } }
  
-// Show result or otherwise process+// Show result ...
 html('<p>You have scored'.$points.' points.</p>'); html('<p>You have scored'.$points.' points.</p>');
 +// ... or store in an internal variable
 +put('IV01_01', $points);
 </code> </code>
  
en/create/points.txt · Last modified: 30.03.2022 15:28 by admin
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki