From Gustav Delius (gwd2 at york.ac.uk) Tuesday, 17 May 2005, 03:15 AM:
Wouldn't it be better to just ask the teacher what length of answer field he wants when he sets up the question? Maybe the teacher does not want the answer field to correspond the the length of the correct answer.
From (miksik at mrakoplas.phil.muni.cz) Tuesday, 17 May 2005, 01:27 PM:
Setting field lengths individually for hundreds of questions could be quite tedious; and it seems unncecesarry to me: if the teacher should have a choice, maybe this could rather be an option on the cloze setup page: adaptive/fixed-length fields.
I think we can count on teachers wanting to have the field long enough so that students can see their whole answer filled in. Maybe I could post this into Using Moodle to discuss it with others?
From Gustav Delius (gwd2 at york.ac.uk) Tuesday, 17 May 2005, 01:52 PM:
How about giving the teacher the option to either choose a length OR have it determined from the answer. I am thinking of situations where the answer is very short but the teacher does not want to give this information away.
In any case the length of the answer field should be determined at authoring time. I.e., your code for calculating the length of the answer field should be moved into save_question(). Recalculating it each time the question is presented to a student is too inefficient.
This option should not be specific to cloze questions but apply to shortanswer, numerical, calculated, ..
From (miksik at mrakoplas.phil.muni.cz) Tuesday, 17 May 2005, 02:47 PM:
I would be happy with this being specific to cloze qs as with all other question types what would usually do would be fixed length: if it's long enough, it solves both the visibility of the whole answer filled in AND the information about the length of the answer not being given away.
The case is different with cloze qs where you need to embed the form fields into the flow of the text - it's here where too long fixed fields could degrade readability and too short fixed fields could impair students' control of their own answering.
What I have in mind is trying to keep things simple where it is possible, i.e. not adding new options if the current solution suits the needs of most users.
> In any case the length of the answer field should be determined at authoring time. [...]
Yes, if there is a db field for it, it would be much more efficient.
From Gustav Delius (gwd2 at york.ac.uk) Tuesday, 17 May 2005, 02:55 PM:
We could add such fields to the database. It should not be a field to the quiz_multianswers table but to both the quiz_numerical and the quiz_shortanswer tables. I agree with you that having variable length fields is much less important for these question types by themselves, but because a cloze question can contain several numerical or shortanswer questions as subquestions it would be easier to store the length information for each of these in the table of the corresponding question type rather than in the quiz_multinaswers table.
From (miksik at mrakoplas.phil.muni.cz) Tuesday, 17 May 2005, 03:56 PM:
OK, so the information about field length would be stored with all shortanswer and numerical questions conditionally?
a) If they are used by themselves the db field would be prefilled with a fixed value.
b) If they are used in a cloze question, the length would be calculated from the answer - provided the teacher opts for this during the cloze question setup.
Do I understand you right, Gustav?
(I'm not a programmer so I don't feel competent to comment on this really but) to me, storing the length information in the quiz_multianswers table would seem convenient if this information would not be used and needed elsewhere. An example:
id question sequence length
1 14 15,16,17,18,19 36,12,0,0,60
The zero values being filled in automatically for other then numerical/shortanswer questions.
BTW, looking at the Moodle 1.5 quiz_questions database table I can see there is a field named 'length' but I'm uncertain about its purpose.