|
Cookbook /
QuizSummary: quiz implementation(Leitner-system)
Version: 2005-04-05
Prerequisites: none
Status: Cookbook has to be updated, last tested with PmWiki version: 2.0.beta28
Maintainer: KAL
Categories: Uncategorized (any idea ?)
QuestionHow to implement a quiz with pmwiki ? AnswerThanks to the if-markup? the implementation is rather simple:
# (:if answer:) page is called with parameter answer=1 # (:if ! answer:) page is called without parameter answer or with answer!=1 $Conditions['answer'] = '$_REQUEST["answer"]==1';
(:if ! answer:)
|| <[[{$FullName}?answer=1|show answer]]> ||
(:if answer:)
|| <[[{$FullName}|hide answer]]> ||
(:if:)
!This is the question (:if answer:) And this is the answer (:if:)
! my Quiz * Question 1 * Question 2 * Question 3 DiscussionIts just a quick and easy implementation. Using the WikiTrails-feature will let you guide you through all the questions and answers of the quiz (i.e. of the group). Starting from the indexpage the question of the first quiz page is displayed with a link to display the same page with the question and the corresponding answer (which is contained on the same page hidden by the if-markup). The answer is displayed when the page is called using an additional parameter After displaying the answer you can use the wikitrail at the page's top to jump to the next question. possible improvements:
Notes and Comments
Thanks for the recipe. I'm doing my page footer a little different:
(:if ! answer:)
|| <[[{$FullName}?answer=1|show answer]]> ||
(:if answer:)
|| <[[{$FullName}|hide answer]]> ||
{$:answer}
(:if:)
then inside the page text I can put the answer in See AlsoChanges
Category: Cookbook
|