Multiple Choice Questions: Class or Datatype?

Author Message

Eric Weik

Wednesday 31 March 2004 9:53:17 am

We are currently exploring the possibility of using eZpublish for a simple Learning Management System. The system would revolve around the concept of "assessments", where an assessment is a multi-page activity consisting of:
- meta data (keywords, etc.)
- formatted text (i.e. XMLText)
- an arbitrary number of images
- an arbitrary number of multiple-choice and true/false questions. Each question needs to also have an arbitrary number of answers. And each answer should have a discussion of why it was the correct (or incorrect) answer.

Example:

-----

[Meta category: movie]
[Meta subcategory: Monty Python]

[Image: photo from The Holy Grail]

This test will see how well you would have faired against The Old Man from Scene 24.

Question 1. What is your favorite color?
A. Blue
B. No, Yellow.
C. Aeeiiii!

-----

The correct answer is "A". If they select "A" they'll get the discussion: "(Correct) Oh, ok, off you go.". If they select "B", they'll get the discussion: "(Incorrect) You changed your mind! Have a nice flight...". Etc.

I've already created a working prototype in plain-jane PHP. But I've been trying to decide if/how to implement a complete solution in eZpublish (so content can be easily created/maintained by subject-matter experts).

So, my question is this: does anyone have an opinion on the best method to implement the multiple choice questions, pure classes or a mix of new datatypes and classes:

Pure Class Method:
Assessment - Class with property: activity_text (XMLText), and acts like a folder, holding Images and AssessmentQuestion.

AssessmentQuestion - Class with the property: question_text, and acts like a folder, holding AssessmentAnswer objects.

AssessmentAnswers - Class with properties: is_correct (True/False), id (i.e. "A", "B", "C", etc.), text (Text field -- "No, yellow"), discussion (Text field -- " You changed your mind! Have a nice flight...").

This method works, but it isn't terribly user friendly to create and maintain the questions and answers (selecting an AssessmentQuestion and having to select "AssessmentAnswer" click "Create Here" 5 times is sort of awkward for a non-technical user.

Mixed Method:

Create a new question datatype that looks similar to the "enum" type (i.e. when you add a question, it has a button to define multiple answers like the "New Enum Element" button).

This seems like the more friendly and flexible way to go, but I'm still learning my way around eZp, so I'm not sure its possible or optimal.

Any eZp gurus have an opinion on these (or better ways) to do this functionality?

Thank you,
Eric

Eirik Alfstad Johansen

Thursday 01 April 2004 5:38:21 am

Hi Eric,

<i>This method works, but it isn't terribly user friendly to create and
maintain the questions and answers (selecting an AssessmentQuestion and
having to select "AssessmentAnswer" click "Create Here" 5 times is sort of
awkward for a non-technical user.</i>

Have you thought about creating an override of the object/edit template in the admin interface to make it easier to add new alternatives when creating/editing a question? Also, you might be able to use the matrix datatype for this purpose.

Sincerely,

Eirik Johansen

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

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 19:38:52
Script start
Timing: Jan 18 2025 19:38:52
Module start 'layout'
Timing: Jan 18 2025 19:38:52
Module start 'content'
Timing: Jan 18 2025 19:38:52
Module end 'content'
Timing: Jan 18 2025 19:38:52
Script end

Main resources:

Total runtime0.6669 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 588.0469152.6406
Module start 'layout' 0.00670.0024 740.687539.4766
Module start 'content' 0.00910.6563 780.1641546.7266
Module end 'content' 0.66540.0015 1,326.890612.1250
Script end 0.6668  1,339.0156 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00340.5031160.0002
Check MTime0.00130.1972160.0001
Mysql Total
Database connection0.00150.221110.0015
Mysqli_queries0.612991.9068540.0114
Looping result0.00050.0696520.0000
Template Total0.638495.720.3192
Template load0.00200.302020.0010
Template processing0.636495.428120.3182
Template load and register function0.00010.014210.0001
states
state_id_array0.00080.115410.0008
state_identifier_array0.00220.331120.0011
Override
Cache load0.00170.2538440.0000
Sytem overhead
Fetch class attribute can translate value0.00040.063120.0002
Fetch class attribute name0.00120.186140.0003
XML
Image XML parsing0.00100.156420.0005
class_abstraction
Instantiating content class attribute0.00000.001140.0000
General
dbfile0.00090.1393220.0000
String conversion0.00000.001540.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
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs