Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Shaly 3 posts 23 karma points
    Jun 07, 2011 @ 08:54
    Shaly
    0

    How to manage Quiz type content in Umbraco

    Hi there,

    I want to use Umbraco to manage quiz content for our website.

    • Each quiz may have any number of questions that are single or multiple selection type
    • Each question may have 3 or more answers
    • Correct answers are specified when defining the questions and answers
    • People who create/edit the quiz are not tech. guys and they don't even do XML coding very well
    • Our website will use the generated data from Umbraco to run the quiz (for us the key is how to give people an easy way to manage the quiz Qs and As)

    Any suggestion on how to use document type and templates to do this?

    Or is it possible to create a customized content editor for such content? How easy is it?

    Your any input is appreciated.

    Thanks

    S.S

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Jun 07, 2011 @ 13:55
    Tom Fulton
    0

    Hi,

    You should be able to achieve a simple solution using built in Document Types.  I would create a Quiz document type and a Question document type beneath them (or multiple Question doctypes if you need majorly some different functionality)

    Your Question document type could have fields like:

    - Question (text)
    - Answer Type (choice - single/multiple)
    - Possible Answers - one idea is to use an Embedded Content-type package for the answers, and setup the control with two fields - Choice (text) and Is Answer (checkbox).  You could add all your choices here and check the one that is correct.

    You could then use Templates & XSLT (or Razor or C#) to list out the questions, and retrieve their choices/answers pretty easily.

    If you wanted more flexibility/validation on the Possible Answers you could write a customized content editor (called a datatype) as you mentioned.  There are a few different ways to do this, but the simplest is using the usercontrolwrapper:

    http://www.nibble.be/?p=24
    http://www.nibble.be/?p=97
    http://umbraco.com/help-and-support/video-tutorials/developing-with-umbraco/data-editors/creating-a-custom-datatype-using-the-usercontrol-wrapper

    There's also a blog post about creating quizzes with Contour, in my opinion it's a little too much for the content editor though.  http://www.nibble.be/?p=83

    Hope this helps,
    Tom

  • Comment author was deleted

    Jun 07, 2011 @ 14:59

    Well using Contour the content editor will have to set a weight to the possible answers as seen here: 

    http://www.screenr.com/toG

     

  • Shaly 3 posts 23 karma points
    Jun 14, 2011 @ 11:54
    Shaly
    0

    Thanks Tom and Tim for the reply. We are first trying on document types + templates.

    Best

    S.

Please Sign in or register to post replies

Write your reply to:

Draft