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:
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
How to manage Quiz type content in Umbraco
Hi there,
I want to use Umbraco to manage quiz content for our website.
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
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
Well using Contour the content editor will have to set a weight to the possible answers as seen here:
http://www.screenr.com/toG
Thanks Tom and Tim for the reply. We are first trying on document types + templates.
Best
S.
is working on a reply...