Forums / Extensions / Quiz in ezsurvey

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

eZ debug

Timing: Jan 17 2025 23:50:18
Script start
Timing: Jan 17 2025 23:50:18
Module start 'content'
Timing: Jan 17 2025 23:50:18
Module end 'content'
Timing: Jan 17 2025 23:50:19
Script end

Main resources:

Total runtime0.7280 sec
Peak memory usage4,096.0000 KB
Database Queries195

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 587.6094180.8516
Module start 'content' 0.00500.5975 768.4609510.7422
Module end 'content' 0.60260.1253 1,279.2031332.7578
Script end 0.7279  1,611.9609 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00410.5633210.0002
Check MTime0.00140.1914210.0001
Mysql Total
Database connection0.00100.135710.0010
Mysqli_queries0.660190.67331950.0034
Looping result0.00200.27781930.0000
Template Total0.704396.720.3522
Template load0.00180.250320.0009
Template processing0.702596.494920.3512
Template load and register function0.00010.013810.0001
states
state_id_array0.00070.101410.0007
state_identifier_array0.00100.136520.0005
Override
Cache load0.00150.2063210.0001
Sytem overhead
Fetch class attribute can translate value0.00200.274030.0007
Fetch class attribute name0.00120.168140.0003
XML
Image XML parsing0.00200.280230.0007
class_abstraction
Instantiating content class attribute0.00000.001550.0000
General
dbfile0.00310.4269270.0001
String conversion0.00000.000930.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

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
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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