I'm about to start working on this new question type for a client and I bugged Tim for feedback and he (rightfully so) suggested I should discuss it here instead... so here we go.
The idea is that it's for the teacher to define a matrix, with either checkboxes or radio buttons in each cell, and the student puts checks in the boxes.
Grading works one of a few ways:
- Get all of the defined boxes checked for 100%, else 0%
- Get at least one of the defined boxes checked for 100%, else 0%
- Some sort of weighting which I'm trying to finish defining.
I made a very brief spec to follow what I'm doing over here: http://docs.moodle.org/en/Development:Matrix_Question_Type_Specification which is mostly technical.
Ideas/feedback welcome!
Looks very interesting. In a different focus and for a s;ightly different purpose we have used the Moodle database (which is really more like a flat file table) for a similar purpose and that met our needs without needing to develop anything as swish as what you are planning - but then of course it didn't feed into the Gradebook - which at the time wasn't a key issue for us - will be very interested in this if it pans out OK
good luck
Neil
The question type will solve a lot of my problems. Please go ahead!
I offer to test it with my students in our (not proctive) testing site.
Could you please provide a few concrete examples of how this new question type might be used? I always find it difficult to understand this kind of stuff if I don't have concrete, real-world examples under my eyes! Thanks,
Joseph
And just to make you feel really welcome, here are some comments on the database design
- Remember that the coding guidelines say that foreign key columns should have names like questionid, not question. A lot of the question database tables are so old, they predate that change in the guidelines, so there is plenty of inconsistency - oh joy! - but new tables should do the right thing.
- I think that the row and column options are fundamentally different, so I would have separate question_matrix_subquestions and question_matrix_answers tables and lose the xory column - even though that is one extra table, and at the moment they will have identical columns.
- I think it is better to change the foreign key matrix refrerences question_matrix to foreign key questionid refrerences question. If you want just one practical example of why that is better, think about the code required in the delete_question($questionid) method, but really I think linking to the question table is just better design.
- In a similar vein, is it worth adding a redundant questionid column to the question_matrix_weight table? (I don't know)
- If you replace the question_matrix_option table as above, then the natural column names to use in question_matrix_weight change.
- Another bit of the coding guidelines: The table names should be question_matrix_options and question_matrix_weights - but, I think, not question_matrices. Although that would be strictly consistent with the coding guidelines, it would be inconsistent with all the other question types.
- The roundzero = false option will be inconsistent with adaptive mode. See MDL-1647 and duplicates for the equivalent wrangling about multichoice.
More, about the grading. Presumably you will grade each sub-question separately, and they add/average the scores to get the overall grade. So, if you have
- a question with three sub-questoins,
- the total mark for the question is 6, and
- the student gets two of three sub-questions right,
Here my ideas for using this type
***********
Ein Kunde zahlt durch Bank unter Abzug von Skonto. Wie ist zu buchen?
Konto |
Soll |
Haben |
Bank |
[x] |
[] |
Forderungen |
[ ] | [x] |
Mehrwersteuer |
[x] | [ ] |
Vorsteuer |
[ ] | [ ] |
Kundenskonto |
[x] | [ ] |
*********************
Penny:
Pierre Pichet modified the Cloze-Question to a special-type "Newmultianswer" that can be used similar. Perhaps you can use his ideas.
I couldn't find that in the modules & plugins db - do you have a link?
You're right about the db schema, I was really just trying to get it out of my head rather than follow rules, but yup. I'll change it.
About the other points
2. xory... yes, I didn't like that either. Happy to change it, no argument on this one
3. referencing referencing question instead of matrix.. I thought about that but then wrote some delete code: http://paste.dollyfish.net.nz/138693?filetype=php (UNTESTED!!!) and didn't think it was too hard. I'm not sure I agree with you that it's better design, but that's probably a tangental conversation we can have elsewhere
4. I'm not sure about that either... generally I don't think this schema is complicated enough to warrant it...
5. sure
6. ha, ok.
7. I need to read about that more after I've had coffee I think - are you saying that that should just be forced all the time? Or forced during adaptive mode?
Grading - yes.
Cheers for feedback!
P
In terms of editing UI, the image target question type has a refresh button you click after choosing of changing the image.
Calculated makes use of some infrastructure that lets you have a multi-page form, but Pierre and I are not sure that is a good idea - that might go away eventually.
I would go with a refesh button to set up the weights matrix when you set up the rows and columns and grading options. Later, you could try ajaxifying it to save page loads.
http://docs.moodle.org/en/Development:Quiz_database_structure#quiz_states
Says:
answer
text NOT NULL,
This field is deleted during runtime and replaced with the responses field. For legacy reasons it is still called answer in the database. Questiontypes can store students' responses (usually in a serialized format) in this field using the method save_session_and_responses. Questiontypes are allowed to deviate from this and handle their response storage in any desired way. Some questiontypes do not use this field but instead store the student response in their own table extending this table.
I have been meaning to update the remainder of that page, after my diagram, for years. Sorry.
I've looked at the image target qtype and I see it's adding extra submit buttons that send particular values (addcropper etc), but I can't see where the submit gets hijacked not to do the normal save and redirect.
I wondered if it might be in validation, but it doesn't seem to be , and I can't find any moodledocs about it.
Anyone have any ideas? Tim?
Imagetarget uses optional_param directly and then does some magic I haven't been able to figure out.
The *correct* way to do it, is as Tim has pointed out above.
Still - this has piqued my curiosity and if anyone can figure out what the imagetarget magic is, I would be interested to know
I'm a little wary of just giving users the html editor because they could theoretically generate totally whack looking pages. What do people think about this?
Seriously, it would be nice to be able to add images, audio, video, etc. Putting HTML code into the question and answer fields that don't have the HTML editor seems to work fairly well and would be consistent with how quiz questions with 1.9, and I don't see in the docs that question creation is going to drastically change with the new quiz UI for 2.0.
Depending on the question type, the main question has an HTML editor. Sub-questions (think matching) and answers do not. If you think of the matrix definition rows as being sub-questions and columns being answers, then I would think that to keep the question type consistent with the rest, you wouldn't have the HTML editor available, but that it would support the use of HTML in the fields.
Thanks,
Matt
Hello Penny,
I know this is a different topic, but Tim mentioned that you are good at back porting stuff from 2.0 to 1.9. Could you incorporate the new quiz navigation in 2.0 with the ability to flag questions and a summary page at the end for answered and unanswered questions from 2.0 to 1.9 for me? It is a feature we really need now and the wait for 2.0 might be a little too long for us.
Many thanks
Tieku
I did backport the roles ui work from 2.0 to 1.9, but I did it as part of my job and it was funded by a client who wanted it.
If you'd like to discuss a potential project with me, please email me directly using the address on my profile page
Cheers
Penny
Hello Penny,
I know this is a different topic, but Tim mentioned that you are good at back porting stuff from 2.0 to 1.9. Could you incorporate the new quiz navigation in 2.0 with the ability to flag questions and a summary page at the end for answered and unanswered questions from 2.0 to 1.9 for me? It is a feature we really need now and the wait for 2.0 might be a little too long for us.
Many thanks
Tieku
The actual cloze code can handle the storage of student different answers.
The problem is how to set and store the rules to grade this multiple multichoice question.
We could create a new questiontype that will use much of the actual Cloze code with new fields in the question_multianswer table or a similar table.
Tim has a better knowledge than me on how to store things in a database.
Pierre
P.S. The sequence field question_multianswer table already store the subquestions id.
The question:
answering correct
scored
answering (one wrong)
Sscored
Pierre
Thanks,
Eric
Put this up on my to-do list
Pierre
After much bashing my head against the rather formidable wall that is formslib (making a matrix of checkboxes or any other form elements is not recommended!) I have a basic, somewhat working, implementation.
I put it in contrib just now (the 1.9 branch only) but it does include two patches as well as just the question type. Both formslib related (documented in the README)
I would be extremely grateful if people could have a play with this and see how it goes - I really didn't know that much about question types or the quiz module or anything before starting this (and in fact there are still some unimplemented functions that I didn't seem to need to implement and I guess should remove).
Thanks!
http://cvs.moodle.org/contrib/plugins/question/type/matrix/?pathrev=MOODLE_19_STABLE