*/ if (!defined('DOKU_INC')) die(); if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN',DOKU_INC.'lib/plugins/'); require_once(dirname(__FILE__).'/core.php'); class syntax_plugin_mikioplugin_quiz extends syntax_plugin_mikioplugin_core { public $tag = 'quiz'; public $hasEndTag = true; public $options = array( 'resettable' => array('type' => 'boolean', 'default' => 'false'), 'full' => array('type' => 'boolean', 'default' => 'false'), 'reset-text' => array('type' => 'text', 'default' => 'Retry'), 'submit-text' => array('type' => 'text', 'default' => 'Submit'), 'submit-type' => array('type' => 'text', 'default' => ''), 'prev-text' => array('type' => 'text', 'default' => 'Prev'), 'next-text' => array('type' => 'text', 'default' => 'Next'), 'correct-text' => array('type' => 'text', 'default' => 'Correct'), 'incorrect-text' => array('type' => 'text', 'default' => 'Incorrect'), 'status-text' => array('type' => 'text', 'default' => 'Question $1 of $2'), 'result-correct-text' => array('type' => 'text', 'default' => 'You got $1 out of $2 correct'), 'result-score-text' => array('type' => 'text', 'default' => 'Score: $1'), 'result-score-total-text' => array('type' => 'text', 'default' => 'Total score: $1'), ); public function __construct() { $this->addCommonOptions('type'); $this->options['type']['default'] = 'secondary'; } public function render_lexer_enter(Doku_Renderer $renderer, $data) { $classes = $this->buildClass($data); $renderer->doc .= '