Quiz in ezsurvey

Author Message

Michael Enger

Wednesday 16 February 2011 12:52:38 am

I want to create quizzes for my site and I was wondering if it was possible to do this using ezsurvey. I'd like to validate the answers given to show a final score, associate the quiz with a user to prevent multiple entries and have statistics on how many people answered correctly.

Can this be done using ezsurvey or should I create a new extension?

Michael Enger

Tuesday 08 March 2011 11:46:42 pm

I have discovered that you can add custom entry types in ezsurvey by using the ini setting QuestionTypeList. Does anybody have any information about this?

Also: bump

xavier cousin

Thursday 10 March 2011 1:47:41 pm

Hi Michael,

eZ Survey allows you to add your own question type so it is possible to do but it requires a bit of development.

I just released an extension that adds a "matrix" type to the question types:

http://www.mugo.ca/Blog/New-Matrix-question-type-for-eZ-Survey

You should find in this extension the information you need to create a new question type.

I'm sure you can even re-use it and with little changes make it work for your specific needs. You would probably just need to store an extra information in the question description which would be for each possible answer the correct one and then in the report just change the logic so that you get a report per user rather than per question.

Hope this will help!

Xavier

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 18 2025 02:11:12
Script start
Timing: Jan 18 2025 02:11:12
Module start 'layout'
Timing: Jan 18 2025 02:11:12
Module start 'content'
Timing: Jan 18 2025 02:11:13
Module end 'content'
Timing: Jan 18 2025 02:11:13
Script end

Main resources:

Total runtime0.6320 sec
Peak memory usage4,096.0000 KB
Database Queries58

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0149 588.9141152.6094
Module start 'layout' 0.01490.0034 741.523439.4375
Module start 'content' 0.01830.6114 780.9609505.6797
Module end 'content' 0.62970.0022 1,286.640612.1875
Script end 0.6319  1,298.8281 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.6278160.0002
Check MTime0.00130.2116160.0001
Mysql Total
Database connection0.00110.170610.0011
Mysqli_queries0.567789.8252580.0098
Looping result0.00060.1020560.0000
Template Total0.588693.120.2943
Template load0.00230.362120.0011
Template processing0.586392.773420.2931
Template load and register function0.00010.018010.0001
states
state_id_array0.00100.152410.0010
state_identifier_array0.00110.176420.0006
Override
Cache load0.00190.2967210.0001
Sytem overhead
Fetch class attribute can translate value0.00050.080920.0003
Fetch class attribute name0.00170.276640.0004
XML
Image XML parsing0.00200.324120.0010
class_abstraction
Instantiating content class attribute0.00000.002050.0000
General
dbfile0.00210.3354160.0001
String conversion0.00000.001740.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/emphasize.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/emphasize.tplEdit templateOverride template
1content/datatype/view/ezxmltags/link.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/link.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs