DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:quiz

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
plugin:quiz [2011-09-20 13:03] – [How exactly to link the quiz page] 89.238.233.210plugin:quiz [2023-12-17 21:15] (current) – new download url Aleksandr
Line 1: Line 1:
-====== Quiz plugin ====== +====== Quiz Plugin ======
----- pluginnews ----- +
-headline:     By the same author +
-style:        sameauthor +
------+
  
 ---- plugin ---- ---- plugin ----
-description: Lets you add quizzes and test a wiki page.+description: Lets you add quizzes and test a wiki page
 author     : Luigi Micco  author     : Luigi Micco 
 email      : l.micco@tiscali.it email      : l.micco@tiscali.it
 type       : syntax type       : syntax
 lastupdate : 2010-12-07 lastupdate : 2010-12-07
-compatible : 2009-12-25c "Lemming"+compatible : Lemming
 depends    :  depends    : 
 conflicts  conflicts 
 similar    : multipoll, poll similar    : multipoll, poll
 tags       : quiz, test tags       : quiz, test
-downloadurl: http://dl.dropbox.com/u/21678616/dwplgs/quiz-07.12.2010.zip+ 
 +downloadurl: https://trello.com/1/cards/5b04744056558c97e7974462/attachments/5b04745c5b314252cef046aa/download/quiz-2010-12-07.zip
 bugtracker :  bugtracker : 
 sourcerepo :  sourcerepo : 
 donationurl: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KHHGCTLSQPGEJ donationurl: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KHHGCTLSQPGEJ
 +
 +screenshot_img: 
 ---- ----
- 
- 
  
 ===== Download and Installation ===== ===== Download and Installation =====
  
-Download and install the plugin using the [[plugin:plugin|Plugin Manager]] using the URL given above. Refer to [[:Plugins]] on how to install plugins manually.+Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually. If you do install manually the directory must be named ''quiz''.
  
-To see a demo online, visit **[[http://www.bitlibero.com/dokuwiki/quiz/demo|here]]**.+===== Version history =====
  
-//Note: If you do install manually the directory must be named quiz.//  
- 
-===== Version history ===== 
   * **2010-12-07** (//current//   * **2010-12-07** (//current//
     * Removed all know bugs at this time (thanks to many users !!)     * Removed all know bugs at this time (thanks to many users !!)
Line 48: Line 42:
  
 ===== Syntax and usage ===== ===== Syntax and usage =====
-Use this [[plugins|plugin]] to add a quiz to a wiki page. The syntax looks like this:+ 
 +Use this plugin to add a quiz to a wiki page. The syntax looks like this:
  
   {{quiz>quiz_page&param1&param2&...&paramN}}   {{quiz>quiz_page&param1&param2&...&paramN}}
  
-where //paramX// can be one or more from follow list and //quiz_page// is the ID of a wiki page ([[.:quiz:example|like this]]) that contain the quiz:+where //paramX// can be one or more from follow list and //quiz_page// is the ID of a wiki page ([[#example|like this]]) that contain the quiz:
  
 ^ learning       | show correct answers at the end of quiz | optional | ^ learning       | show correct answers at the end of quiz | optional |
Line 229: Line 224:
 > fixed with new version  --- [[user>mluigi]] //2010/12/07 09:30// > fixed with new version  --- [[user>mluigi]] //2010/12/07 09:30//
  
-==== How exactly to link the quiz page ====+==== How exactly to link the quiz page====
  
 I can't figure out how to link a quiz command (quiz> ...) to a quiz wiki page - like stated [[http://www.dokuwiki.org/plugin:quiz?&#syntax_and_usage | here]] I can't figure out how to link a quiz command (quiz> ...) to a quiz wiki page - like stated [[http://www.dokuwiki.org/plugin:quiz?&#syntax_and_usage | here]]
Line 235: Line 230:
 The "quiz_page" reference is a wiki namespace path? How would this command look like if I want to add a quiz from here (this page), to this [[http://www.dokuwiki.org/plugin:quiz:example | example quiz page]] The "quiz_page" reference is a wiki namespace path? How would this command look like if I want to add a quiz from here (this page), to this [[http://www.dokuwiki.org/plugin:quiz:example | example quiz page]]
  
 +Somenthing like this?
 {{quiz>plugin:quiz:example}} {{quiz>plugin:quiz:example}}
 +
 +==== Longer questions and more detail ====
 +
 +I wanted some way to add more detail to questions and explanations.  Questions can have additional bullet points added by adding a list item called "Detail" and sub-bullets will be added to the question.  They must not extend additional levels.  Second, the explanation is similarly extended by defining sub-bullets on the normal explanation line.  My test page: [[http://www.siliconpr0n.org/wiki/doku.php?id=quiz:metal_gate_cmos|http://www.siliconpr0n.org/wiki/doku.php?id=quiz:metal_gate_cmos]]
 +
 +Example usage:
 +  * Pop the question here
 +    * Detail
 +      * More details, images etc
 +      * More details, images etc
 +      * More details, images etc
 +    - Item 1
 +    - Item 2
 +    * [1]
 +    * (1)
 +    * Main explanation
 +      * More details, images etc
 +      * More details, images etc
 +      * More details, images etc
 +
 +Source diff against quiz-07.12.2010.zip:
 +  428c428,442
 +  <               
 +  ---
 +  >             # Like explanation except with a special key
 +  >             } elseif (strtoupper(substr($lines[$k], 0, 12)) == "    * DETAIL") {
 +  >               $tmp = '';
 +  >               while($k < $nr - 1) {
 +  >                     $l = $lines[$k + 1];
 +  >               
 +  >                     if (substr($l, 0, 8) == "      * ") { 
 +  >                             # Keep it as a list, just shift it
 +  >                             $tmp .= $hRender->render(str_replace("      * ","  * ",$l)) . "\n";
 +  >                             $k += 1;
 +  >                             } else {
 +  >                                     break;
 +  >                             }
 +  >               }
 +  >               $quizz['questions'][$nquest]['question'] .= $tmp;
 +  436a451
 +  >               # Doesn't the above subst take care of this?
 +  440c455,470
 +  <               $quizz['questions'][$nquest]['explanation'] = $tmp;
 +  ---
 +  >                       $exp = $tmp;
 +  >               
 +  >               $tmp = '';
 +  >               # Extended explanation?  Peek to see if there is continuation
 +  >               while($k < $nr - 1) {
 +  >                     $l = $lines[$k + 1];
 +  >               
 +  >                     if (substr($l, 0, 8) == "      * ") { 
 +  >                             # Keep it as a list, just shift it
 +  >                             $tmp .= $hRender->render(str_replace("      * ","  * ",$l)) . "\n";
 +  >                             $k += 1;
 +  >                             } else {
 +  >                                     break;
 +  >                             }
 +  >               }
 +  >                   $quizz['questions'][$nquest]['explanation'] = $exp . $tmp;
 +
 + --- [[user>johndmcmaster|JohnDMcMaster]] //2012/05/24 10:08//
 ===== Displays title even if not given ===== ===== Displays title even if not given =====
  
 Thanks for a simple quiz plugin! One question, even if I don't set a title for my quiz, the pagename will show up as the title. I wonder if it is possible to "fix" this, as I would like to have only one title per quiz page, and that should be the master page's title. It is important as I use page titles for navigation, although I can work around by using the meta plugin to set a title for the master page. I hope this makes sense. Thanks for clarification in advance! ---Eivind Thanks for a simple quiz plugin! One question, even if I don't set a title for my quiz, the pagename will show up as the title. I wonder if it is possible to "fix" this, as I would like to have only one title per quiz page, and that should be the master page's title. It is important as I use page titles for navigation, although I can work around by using the meta plugin to set a title for the master page. I hope this makes sense. Thanks for clarification in advance! ---Eivind
 +
 +===== Random question and choice work only once =====
 +I have tried this plugin and notice that with "rndquest" and "rndchoice" shuffle the order of questions and choice first time and then on every reload of the page it remain the same. Is there any option that on every reload it suffle the questions and choices or may be I am missing something.
 +
 +===== Any plans for making this work for new releases =====
 +The plugin is really useful to make Dokuwiki a useful tool for learning. I would appreciate someone can make this work again for new release of Dokuwiki.
 +
 +===== Malware in Demo link =====
 +
 +Attempting to view the example page for this plugin takes you to a site that attempts to install malware!
 +> If this was true, it should be put to the very top of the page, not at the end. But I just tried the Demo link, and it simply went to one of those holding pages when a domain expired, and I didn't experience any malicious attempt to install anything. --- [[user>ach|Anika Henke]] //2014/03/23 11:50//
 +>> I've just removed the link to the Demo as it was broken since over a year anyway. --- [[user>ach|Anika Henke]] //2014/03/23 12:53//
 +
 +===== Error  in plugin =====
 +Not Found
 +
 +The requested URL /getform.php was not found on this server.
 +
 +it is not directing to right link .
 +
 +Please help to resolve the issue
plugin/quiz.1316516636.txt.gz · Last modified: 2011-09-20 13:03 by 89.238.233.210

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki