Development:Matrix Question Type Specification: Difference between revisions
Penny Leach (talk | contribs) (New page: ==Introduction== I need to develop a n:n matching type of question that is suited to a matrix. The teacher should be able to define the matrix and the various grading options. The follow...) |
(Adding Likert Scale example) |
||
(10 intermediate revisions by 2 users not shown) | |||
Line 6: | Line 6: | ||
The follow serves as my very high level (mostly technical) specification. | The follow serves as my very high level (mostly technical) specification. | ||
=== | ===Some examples=== | ||
Here are three simple examples of the way this question type could be used. ( ) is mean to be a radio button. [ ] is a checkbox. | |||
=====question_matrix | ----- | ||
Evaluate the following statements: | |||
{| | |||
! !! True !! False | |||
|- | |||
| Moodle is a learning management system || (*) || ( ) | |||
|- | |||
| Mahara is an ePortfolio system || (*) || ( ) | |||
|- | |||
| Moodle has no bugs || ( ) || (*) | |||
|- | |||
| This proposal is a good idea || (*) || ( ) | |||
|} | |||
----- | |||
Which colours are mixed on your computer's monitor to make each of the listed colours: | |||
{| | |||
! !! Red !! Green !! Blue | |||
|- | |||
| Red || [*] || [ ] || [ ] | |||
|- | |||
| Magenta || [*] || [ ] || [*] | |||
|- | |||
| Cyan || [ ] || [*] || [*] | |||
|- | |||
| Black || [ ] || [ ] || [ ] | |||
|- | |||
| White || [*] || [*] || [*] | |||
|} | |||
----- | |||
Match the adult to their young: | |||
{| | |||
! !! Tadpole !! Joey !! Foal !! Puppy | |||
|- | |||
| Poney || ( ) || ( ) || (*) || ( ) | |||
|- | |||
| Frog || (*) || ( ) || ( ) || ( ) | |||
|- | |||
| Kangaroo || ( ) || (*) || ( ) || ( ) | |||
|} | |||
But the most useful example is probably the Likert Scale: | |||
How often do you do the following? | |||
{| | |||
! !! Never !! Very rarely !! Rarely !! Occasionally !! Frequently !! Very Frequently | |||
|- | |||
| Brush your teeth || [] || [ ] || [ ] || [*] || [ ] || [] | |||
|- | |||
| Cook your own dinner || [*] || [ ] || [] || [] || [ ] || [] | |||
|- | |||
| Make your bed || [ ] || [] || [] || [] || [ ] || [*] | |||
|- | |||
| Dye your hair || [ ] || [ ] || [ ] || [*] || [ ] || [] | |||
|- | |||
| Pick your nose || [] || [] || [*] || [] || [ ] || [] | |||
|} | |||
==Database Tables== | |||
===Question Definition Tables=== | |||
====question_matrix==== | |||
Contains basic information about the matrix - what the grading method and | Contains basic information about the matrix - what the grading method and | ||
whether multiple checks per row are supported(eg checkboxes vs radio buttons) | whether multiple checks per row are supported(eg checkboxes vs radio buttons) | ||
The grading methods translate to: | The grading methods translate to: | ||
ALL - the student must select ALL correct answers and get 100%, else 0%. | * ALL - the student must select ALL correct answers and get 100%, else 0%. | ||
the student must select at least one of the correct answers, and get 100% else | * ANY - the student must select at least one of the correct answers, and get 100% else 0%. | ||
0%. | * WEIGHTED - each cell has a weighting from -100% to 100%. The "correct" answers must add up to 100%, but the 0 and negative ones don't have any constraint on them. | ||
answers must add up to 100%, but the 0 and | * NONE - this could be used for example for Likert scales. | ||
constraint on them. | |||
{| class="nicetable" | {| class="nicetable" | ||
Line 29: | Line 99: | ||
|sequence | |sequence | ||
|- | |- | ||
| | |questionid | ||
|fk to mdl_question | |fk to mdl_question | ||
|- | |- | ||
|multiple | |multiple | ||
Line 36: | Line 106: | ||
|- | |- | ||
|grading | |grading | ||
|(ALL or ANY of WEIGHTED) enum or fk to another table containing these values. | |(ALL or ANY of WEIGHTED or NONE) enum or fk to another table containing these values. | ||
|- | |- | ||
|roundzero | |roundzero | ||
Line 45: | Line 115: | ||
|} | |} | ||
==== | ====question_matrix_cols==== | ||
Contains the definition of the matrix | Contains the definition of the matrix columns | ||
{| class="nicetable" | {| class="nicetable" | ||
Line 56: | Line 126: | ||
|sequence | |sequence | ||
|- | |- | ||
| | |matrixid | ||
|fk to question_matrix | |fk to question_matrix | ||
|- | |- | ||
Line 64: | Line 134: | ||
|longtext | |longtext | ||
|title or hover or something | |title or hover or something | ||
|} | |||
====question_matrix_rows==== | |||
Contains the definition of the matrix rows | |||
{| class="nicetable" | |||
|- | |||
!field | |||
!notes | |||
|- | |- | ||
| | |id | ||
| | |sequence | ||
|- | |||
|matrixid | |||
|fk to question_matrix | |||
|- | |||
|shorttext | |||
|short word to fit in | |||
|- | |||
|longtext | |||
|title or hover or something | |||
|} | |} | ||
==== | ====question_matrix_weights==== | ||
Contains more information about how each cell should be graded. | Contains more information about how each cell should be graded. | ||
EVERY cell should have an entry in this table. When the grading method is | EVERY cell should have an entry in this table. When the grading method is | ||
Line 84: | Line 172: | ||
|sequence | |sequence | ||
|- | |- | ||
| | |rowid | ||
|fk to | |fk to question_matrix_rows | ||
|- | |- | ||
| | |colid | ||
|fk to | |fk to question_matrix_cols | ||
|- | |- | ||
|weight | |weight | ||
Line 96: | Line 184: | ||
===Student Answer Tables=== | |||
==== | ====question_matrix_answers==== | ||
This table contains a list of all the cells that the student has selected. | This table contains a list of all the cells that the student has selected. | ||
Line 109: | Line 197: | ||
|sequence | |sequence | ||
|- | |- | ||
| | |rowid | ||
|fk to | |fk to question_matrix_rows | ||
|- | |- | ||
| | |colid | ||
|fk to | |fk to question_matrix_cols | ||
|} | |} | ||
==Implementation notes== | |||
===Grading=== | |||
There should be classes to match the grading types (all or any or weighted) so | There should be classes to match the grading types (all or any or weighted) so | ||
that new options could be written. | that new options could be written. | ||
===Renderers=== | |||
It may make sense for some point for some different method to be used to render | It may make sense for some point for some different method to be used to render | ||
this to the user, so we can start with a matrix class and maybe add more later | this to the user, so we can start with a matrix class and maybe add more later | ||
if necessary. | if necessary. | ||
==Penny's TODO== | |||
* Find out about roundzero | |||
* Find out about constant namespacing in qtypes. |
Latest revision as of 13:17, 26 February 2009
Introduction
I need to develop a n:n matching type of question that is suited to a matrix. The teacher should be able to define the matrix and the various grading options.
The follow serves as my very high level (mostly technical) specification.
Some examples
Here are three simple examples of the way this question type could be used. ( ) is mean to be a radio button. [ ] is a checkbox.
Evaluate the following statements:
True | False | |
---|---|---|
Moodle is a learning management system | (*) | ( ) |
Mahara is an ePortfolio system | (*) | ( ) |
Moodle has no bugs | ( ) | (*) |
This proposal is a good idea | (*) | ( ) |
Which colours are mixed on your computer's monitor to make each of the listed colours:
Red | Green | Blue | |
---|---|---|---|
Red | [*] | [ ] | [ ] |
Magenta | [*] | [ ] | [*] |
Cyan | [ ] | [*] | [*] |
Black | [ ] | [ ] | [ ] |
White | [*] | [*] | [*] |
Match the adult to their young:
Tadpole | Joey | Foal | Puppy | |
---|---|---|---|---|
Poney | ( ) | ( ) | (*) | ( ) |
Frog | (*) | ( ) | ( ) | ( ) |
Kangaroo | ( ) | (*) | ( ) | ( ) |
But the most useful example is probably the Likert Scale:
How often do you do the following?
Never | Very rarely | Rarely | Occasionally | Frequently | Very Frequently | |
---|---|---|---|---|---|---|
Brush your teeth | [] | [ ] | [ ] | [*] | [ ] | [] |
Cook your own dinner | [*] | [ ] | [] | [] | [ ] | [] |
Make your bed | [ ] | [] | [] | [] | [ ] | [*] |
Dye your hair | [ ] | [ ] | [ ] | [*] | [ ] | [] |
Pick your nose | [] | [] | [*] | [] | [ ] | [] |
Database Tables
Question Definition Tables
question_matrix
Contains basic information about the matrix - what the grading method and whether multiple checks per row are supported(eg checkboxes vs radio buttons) The grading methods translate to:
- ALL - the student must select ALL correct answers and get 100%, else 0%.
- ANY - the student must select at least one of the correct answers, and get 100% else 0%.
- WEIGHTED - each cell has a weighting from -100% to 100%. The "correct" answers must add up to 100%, but the 0 and negative ones don't have any constraint on them.
- NONE - this could be used for example for Likert scales.
field | notes |
---|---|
id | sequence |
questionid | fk to mdl_question |
multiple | boolean |
grading | (ALL or ANY of WEIGHTED or NONE) enum or fk to another table containing these values. |
roundzero | If the total for the question is less than 0, set it to 0. (This can be triggered by highly negative weights) |
renderer | 'matrix' hardcoded at the moment (see implementation notes) |
question_matrix_cols
Contains the definition of the matrix columns
field | notes |
---|---|
id | sequence |
matrixid | fk to question_matrix |
shorttext | short word to fit in |
longtext | title or hover or something |
question_matrix_rows
Contains the definition of the matrix rows
field | notes |
---|---|
id | sequence |
matrixid | fk to question_matrix |
shorttext | short word to fit in |
longtext | title or hover or something |
question_matrix_weights
Contains more information about how each cell should be graded. EVERY cell should have an entry in this table. When the grading method is 'all' or 'any', the 'correct' answers will be stored here as a non-zero percentage automatically and the non-correct answers will be zero.
field | notes |
---|---|
id | sequence |
rowid | fk to question_matrix_rows |
colid | fk to question_matrix_cols |
weight | percentage value |
Student Answer Tables
question_matrix_answers
This table contains a list of all the cells that the student has selected.
field | notes |
---|---|
id | sequence |
rowid | fk to question_matrix_rows |
colid | fk to question_matrix_cols |
Implementation notes
Grading
There should be classes to match the grading types (all or any or weighted) so that new options could be written.
Renderers
It may make sense for some point for some different method to be used to render this to the user, so we can start with a matrix class and maybe add more later if necessary.
Penny's TODO
- Find out about roundzero
- Find out about constant namespacing in qtypes.