Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Calculated multiquestions proposal: Difference between revisions

From MoodleDocs
No edit summary
No edit summary
 
(28 intermediate revisions by 2 users not shown)
Line 1: Line 1:
This page will be used to document and structure a project of adding multiquestion capability to the calculated question like the cloze questiontype and allowing the calculated questions to be used as usual calculated question or as multiplechoice question.
Working on it now. If you have ideas - you are welcome!
This imply developping a structure similar to the multiquestion 
General idea is: We have general set of variables and need to ask many questions related with some theory and this set of variables.
i.e adding calculated questions records with the main question as parent. An additional multiplechoice record is necessary to each calculated question.


Actually (august 2007) the general interface to create and edit this improved calculated questiontype almost completed.
Now I'm working about questions for financial field. Which has now up to 20 variables and up to 10 questions.
The real difficulties are to modify the code related to grade each subquestion and store the session and responses parameters.


stdClass Object
But for example could be in Geometry field. '''Right circular cone''' which has ''variables'' such as r(base radius), h(height), <math>\theta</math>(aperture)
(
 
    [category] => 1
And ''many questions'' could be such as:
    [parent] => 0
 
    [name] => my first multichoice
1. Calculate slant height s? (Formula  <math>s=\sqrt{r^2+h^2} </math> )
    [questiontext] => What is the surface of a rectangle of {h} m by {l} m ?
 
{#0}
2. Calculate volume V? (Formula <math>V=1/3\cdot \pi\cdot r^2\cdot h </math> )
What is the perimeter of this rectangle?
 
{#1}
3. Calculate surface area S? (Formula <math>S=\sqrt{\pi\cdot r\cdot s} </math> ) (depends on 1 question)
    [questiontextformat] => 1
 
    [image] =>
Forum discussion: Multipart calculated questions using students answers in calculating correct answers
    [generalfeedback] =>  
[http://moodle.org/mod/forum/discuss.php?d=132225]
    [defaultgrade] => 1
    [penalty] => 0.1
    [qtype] => calculated
    [length] => 1
    [stamp] => 132.208.141.198+070613190851+gCcidQ
    [version] => 132.208.141.198+070812043753+37cXs7
    [hidden] => 0
    [id] => 382
    [maxgrade] => 1
    [name_prefix] => resp382_
    [options] => stdClass Object
        (
            [answers] => Array
                (
                    [1141] => stdClass Object
                        (
                            [question] => 382
                            [answer] => {h}* {l}
                            [fraction] => 1
                            [feedback] => OK
                            [tolerance] => 0.01
                            [tolerancetype] => 1
                            [correctanswerlength] => 2
                            [correctanswerformat] => 1
                            [id] => 1141
                        )
                    [1142] => stdClass Object
                        (
                            [question] => 382
                            [answer] => 2*({h}+{l})
                            [fraction] => 0.5
                            [feedback] => You give me the perimeter !
                            [tolerance] => 0.01
                            [tolerancetype] => 1
                            [correctanswerlength] => 2
                            [correctanswerformat] => 1
                            [id] => 1142
                        )
                    [1143] => stdClass Object
                        (
                            [question] => 382
                            [answer] => {rr}
                            [fraction] => 0
                            [feedback] => Go back and try again
                            [tolerance] => 0.01
                            [tolerancetype] => 1
                            [correctanswerlength] => 2
                            [correctanswerformat] => 1
                            [id] => 1143
                        )
                )
            [multichoice] => stdClass Object
                (
                    [id] => 257
                    [question] => 382
                    [layout] => 0
                    [answers] => 0
                    [single] => 1
                    [shuffleanswers] => 1
                    [correctfeedback] =>
                    [partiallycorrectfeedback] =>
                    [incorrectfeedback] =>
                    [answernumbering] => abc
                )
            [subquestions] => Array
                (
                    [383] => stdClass Object
                        (
                            [category] => 1
                            [parent] => 382
                            [name] => {#1}
                            [questiontext] => {#1}
                            [questiontextformat] => 1
                            [image] =>
                            [generalfeedback] =>
                            [defaultgrade] => 1
                            [penalty] => 0.1
                            [qtype] => calculated
                            [length] => 1
                            [stamp] => 132.208.141.198+070613203735+MrdwQ3
                            [version] => 132.208.141.198+070812043754+Os3B8Z
                            [hidden] => 0
                            [id] => 383
                            [options] => stdClass Object
                                (
                                    [answers] => Array
                                        (
                                            [1144] => stdClass Object
                                                (
                                                    [question] => 383
                                                    [answer] => 2*({h}+{l})
                                                    [fraction] => 1
                                                    [feedback] => OK 1
                                                    [tolerance] => 0.01
                                                    [tolerancetype] => 1
                                                    [correctanswerlength] => 0
                                                    [correctanswerformat] => 1
                                                    [id] => 1144
                                                )
                                        )
                                    [multichoice] => stdClass Object
                                        (
                                            [id] => 258
                                            [question] => 383
                                            [layout] => 0
                                            [answers] => 0
                                            [single] => 0
                                            [shuffleanswers] => 1
                                            [correctfeedback] =>
                                            [partiallycorrectfeedback] =>
                                            [incorrectfeedback] =>
                                            [answernumbering] => abc
                                        )
                                    [units] => Array
                                        (
                                        )
                                )
                            [editasmultichoice] => 0
                        )
                )
            [units] => Array
                (
                )
        )
    [editasmultichoice] => 0
)

Latest revision as of 13:04, 14 May 2010

Working on it now. If you have ideas - you are welcome! General idea is: We have general set of variables and need to ask many questions related with some theory and this set of variables.

Now I'm working about questions for financial field. Which has now up to 20 variables and up to 10 questions.

But for example could be in Geometry field. Right circular cone which has variables such as r(base radius), h(height), (aperture)

And many questions could be such as:

1. Calculate slant height s? (Formula )

2. Calculate volume V? (Formula )

3. Calculate surface area S? (Formula ) (depends on 1 question)

Forum discussion: Multipart calculated questions using students answers in calculating correct answers [1]