Formulas question type

Re: Formulas question type

by Lev Abramov -
Number of replies: 5

It looks like my exhilaration about the long-awaited feedback field has been premature.

Turns out that there is only ONE feedback field available, and this feedback is displayed after EVERY answer, no matter what - correct or incorrect. Besides, clicking on the "Blanks for 2 more choices" button does not invoke any changes in the number of fields displayed. (Can I comment smth out - or uncomment smth - to make it work?)

A question: is it possible to further sophisticate this question plugin to make it work in one of the following ways:

a) display a different feedback for wrong answers that for the correct one;

b) display feedback ONLY for the wrong answer

as it is a bit confusing the way it works now: after all, if your answer is correct, why see an explanation as a result? If my answer is correct, apparently I already know how to solve this question, right?

Thanks in advance!

Lev

Attachment image02.gif
In reply to Lev Abramov

Re: Formulas question type

by Lev Abramov -

Hmmm... it also looks like I am talking to myself. Ah well, I will keep trying.

In addition to the problems reported above, we seem to have another one.

If we use numeric characters, everything works fine. But if we expect an alphabetic character as an answer, then we observe an interesting (not to call it unpleasant) phenomenon:

NO MATTER IN WHAT ORDER WE FEED THE ANSWERS, AS LONG AS THEY ARE OVERALL CORRECT THEY GET ACCEPTED INDISCRIMINATELY.

Take a look at the attached screenshots - these pictures explain it better than words.

building a question

 

wrong answer 1: correct answers, wrong order

 

wrong answer 2: just one of the correct answers in three fields

 

Looks crazy, eh?

Now tell me what is wrong here. Are we using the question for purposes it was not intended to be used for? Or is it some validation problem than needs to be addressed in the code?

Thanks in advance!

Lev

In reply to Lev Abramov

Re: Formulas question type

by Jean-Michel Védrine -

Hello Lev,

Yes I think you are right something is not good in the way feedbacks are managed in the formulas question type.

The problem is that feedbacks are attached to subquestion (1 feedback for each subquestion).

In the multichoice question type feedbacks are attached to choices (1 feedback for each choice) and that works well because in that way student get the feedback(s) attached to their response(s)

In the shortanswer question type feedbacks are attached to answers (1 feedback for each answer) and that works well because student get the feedback associated with their answer.

But for formulas, that deosn't works so well because each subquestion is in fact a complete question that can be either correct, incorrect or partially correct. And if you check the box to display feedbacks everybody will get the same feedback.

So what are the options ?

The first option wich would require the less work is to display the feedback only for incorrect and partially correct responses to the subquestion. I think this would require to do changes only in 1 place in the code so this is only a small amount of work (this option can be a short term solution for you Lev, if you agree I can look at what changes are needed to display the feedback only when the student's response is not correct, so that you can wait for a better solution to come in the offical version of formulas question)

The second option would be to add to the formulas question a "conbined feedback" as it is done in latest versions of multichoice and match questions. This conbined feedback is made of 3 feedbacks (correct, incorrect and partially correct) and only one is displayed to the student accordingly to his grade for the question.

This would not be a lot of work because most of the code for this already exists in Moodle and even some methods can be re-used.

The drawback of this option is that the fededback will only depend of the student's grade for the question but not of his answers to each subquestion.

The third option is to add conbined feedback to each subquestion (correct, incorrect and partially correct feedbacks). This would make sense because each subquestion of a formulas question is in fact a question on it's own, with variables and main question text shared for all subquestions of a formulas question.

Of course this last option is the richest for the teacher because it gives him the most possibilities to provide feedbacks to the students.

The possible drawbacks I can see are

- it is of course the option that require the more work wink.

- we need to add 2 fields to the subquestion table (we can re-use the existing feedback field for one of the three feedbacks and copy it's content in the other 2 during upgrade to maintain compatibility, letting teachers to type different contents in each 3 feedbacks after the upgrade process)

- it will make the question creation screen even more complex adding 2 more TinyMCE editors (and the associated time to load and init them !)

As Hon Wai is the creator of the formulas question I think it is up to him to take the decision. Once the decision is taken, we can see how implement it in the 3.0 version for Moodle 2.0 and in the future version for moodle 2.1

In reply to Jean-Michel Védrine

Re: Formulas question type

by Lev Abramov -

Ah! at last someone is talking to me about it! And not just "someone" - Jean-Michel himself! smile

OK, let me put things in their proper perspective. Imagine a drowning person in the sea. Som 40 feet away, a yacht is bobbing on the waves, and the person on the deck says to the poor guy:

- You can have a choice of three types of saving belts. The relative advantages of the first type....

At this moment the drowning person yells:

- Cut it short and just throw SOMETHING! ANYTHING!

This more or less reflects the situation. smile JUST DO IT!

And our gratitude will be boundless and eternal.

LOL

Lev

In reply to Lev Abramov

Re: Formulas question type

by Jean-Michel Védrine -

Hello Lev,

One more time I have not been clear !

I was speaking to several people at the same time without saying it explicitly.

Part of my explanation of the 3 possibles options was for Hon Wai lau so that he can choose wich one he wants and that I can code it

But when I said "this option can be a short term solution for you Lev, if you agree I can look at what changes are needed to display the feedback only when the student's response is not correct, so that you can wait for a better solution to come in the offical version of formulas question" i was writting this for you Lev.

But for me it was essential to make a difference between a small hack I can very easily do for you so that the feedback is only displayed in case of incorrect responses, and the future solution that we can implement in the future.

So enought explanations here is the hack

in the question/type/formulas/questiontype.php file in the get_subquestion_formulation_and_controls function,

replace the lines :

            $feedback = $this->get_substituted_question_texts($question, $cmoptions, $localvars, $part->feedback, 'feedback formulas_local_feedback');
            $feedback = quiz_rewrite_question_urls($feedback, 'pluginfile.php',
                $context->id, 'qtype_formulas', 'answerfeedback', array($state->attempt, $state->question), $part->id);

With the lines

if ($sub->fraction < 1) {

                $feedback = $this->get_substituted_question_texts($question, $cmoptions, $localvars, $part->feedback, 'feedback formulas_local_feedback');
                $feedback = quiz_rewrite_question_urls($feedback, 'pluginfile.php',
                    $context->id, 'qtype_formulas', 'answerfeedback', array($state->attempt, $state->question), $part->id);

}

Don't forget the final closing brace !

And the feedback will only be displayed in case of partially correct or incorrect response to the subquestion.

If you prefer you can only display the feedback for incorrect responses replacing :

if ($sub->fraction < 1)

with :

if ($sub->fraction ==0)

In reply to Jean-Michel Védrine

Re: Formulas question type

by Lev Abramov -

Now you're talking business! smile

That much I can do - find the place and add the code.

Thanx!!!!!!!!!!

Lev