public
Description: Radiant Quiz Extension
Homepage: http://terralien.com/
Clone URL: git://github.com/ntalbott/radiant-quiz-extension.git
name age message
file LICENSE Wed May 14 12:40:01 -0700 2008 Update with licensing/copyright info. [ntalbott]
file README.rdoc Wed Jun 11 09:20:51 -0700 2008 Cleaned up docs. [ntalbott]
file Rakefile Wed Jun 11 11:24:52 -0700 2008 Added an initial integration test and fixed a b... [ntalbott]
directory app/ Loading commit data...
directory lib/
file quiz_extension.rb
directory test/
README.rdoc

Quiz

This little extension allows one to define simple multiple-choice quizzes that will select a result from a range of options and display a sub-page accordingly.

Installation

  $ cd <radiant_app>/vendor/extensions/
  $ git clone <quiz_git_url> quiz

Usage

A quiz body part might look like this:

  <h1>Quiz:</h1>
  <r:quiz:form>
    <r:questions:each>
      <h2>Question: <r:question /></h2>
      <ol style="list-style:none;">
        <r:options:each>
          <li><r:option_radio /> <r:option_label /></li>
        </r:options:each>
      </ol>
    </r:questions:each>
    <input type="submit">
  </r:quiz:form>

And the quiz part would look like so:

  questions:
    -
      - "What do you think of me?"
      - 1: You're great
      - 3: Can't stand you
      - 2: I'm pretty ambivalent
    -
      - "Do you like ice cream?"
      - 1: "Yes"
      - 2: Not so much
      - 3: Hate it
  results:
    3: cool
    5: ok
    6: messed-up

When a quiz is submitted, the weights that prefix each option get summed, and the first result who’s weight exceeds the total gets redirected to (as a sub-page).

Home

  http://github.com/ntalbott/radiant-quiz-extension/tree/master

Credits

Sponsored by Ignite Social Media LLC - ignitesocialmedia.com/, with initial work done by Nathaniel Talbott of Terralien, Inc. (terralien.com/).

See LICENSE for copyright and licensing details.