eZusrvey: how to have one question per page

Author Message

Gaetano Giunta

Tuesday 26 August 2008 10:03:34 am

What would be the best way to achieve a survey presentation where the questions are given one per page - and the final result calculated only after the last question is answered?

Hits-friendly webmasters would love to have that, but it looks like the current code is not structured for such a case...

Ideas:
- add a kind of question_id unordered param to the urls
- store previous questions in either session or cookies, or
- add hidden input fields for all previous questions to every page where a single question is displayed

Principal Consultant International Business
Member of the Community Project Board

Gaetano Giunta

Tuesday 26 August 2008 2:54:38 pm

Related to the above request, it would be nice to have a fetch function to get the results of a survey taken from a given user id (for speed it would need an extra index on ezsurveyresult.survey_id + user_id).
Plus some hooks to allow a "result calculation and display"...
This way it can be used as a general-purpose "test" extension and not only for surveys

Principal Consultant International Business
Member of the Community Project Board

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 30 2025 19:50:48
Script start
Timing: Jan 30 2025 19:50:48
Module start 'layout'
Timing: Jan 30 2025 19:50:48
Module start 'content'
Timing: Jan 30 2025 19:50:48
Module end 'content'
Timing: Jan 30 2025 19:50:48
Script end

Main resources:

Total runtime0.0268 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0058 588.2656151.2266
Module start 'layout' 0.00580.0037 739.4922220.7188
Module start 'content' 0.00950.0147 960.2109997.8359
Module end 'content' 0.02420.0026 1,958.046929.9922
Script end 0.0267  1,988.0391 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.003713.9572140.0003
Check MTime0.00186.6025140.0001
Mysql Total
Database connection0.00103.610610.0010
Mysqli_queries0.00186.830430.0006
Looping result0.00000.040910.0000
Template Total0.00134.810.0013
Template load0.00103.883010.0010
Template processing0.00030.945410.0003
Override
Cache load0.00082.807610.0008
General
dbfile0.00186.649780.0002
String conversion0.00000.022340.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs