Open nborie opened 5 years ago
This is linked to PremierLangage/premierlangage#130, due to a bug this feature of a multiple step exercise is not accessible for the moment. You can go around it by using the feedback but the previous text and form are style visible ... bad.
You could put everything in the feedback except the form so the workaround doesn't work.
Another approach would be via exercise which are callable with parameters and can return a value. They would be called and theire return values processed by the strategy. This way a multiple-question exercise would be a strategy.
I completely agree with that : Please do not make an exercise with 10 questions, please do a pltp with 10 exercises containing each one question.
Anyway, for a lot of reason, I really thing we also need exercise with several forms before grading.
For example, thing about a pedagogical resource of type "choose your own adventure books" (histoire dont vous êtes le héro). The exercise tell a story about a professional situation in which the student has to make some choices. The first choice influence the second form and so on. There are several different ways to complete the situation. Very bad choice can make you loose. Anyway, several forms and clics on submit button are needed before establishing the grade for this kind of exercises. For information, Ahmed Mebarki wanted this kind of serious games for student in civil engineering.
More generally, exercise with multiple good answer based on different strategy could have this kind of design.
I did try to abuse pl to implement such exercise. For hurry guys, this can be tested by loading this repo : https://github.com/nborie/OSbank and by testing exercise --> OSbank/exercises/MCQ/generalities/parametrized_MCQ.pl
The prototype has bug because this use-case has not been discussed/implemented (We are still at the point : please do not do this because 1 exo --> 1 form and not more).
My strategy was : buider --> seletion of 5 questions out of a file of question formated like automultiplechoice proceed. grade first clic --> prepare the first question with random possible answer from a fixed large set of answers. use output(-1, feedback, context) and place the question inside the feedback grade more clic --> prepare question, register anwser and grade at each clic, still use output(-1, feedback, context) grade last clic --> really grade (by meaning on all grade of all the 5 questions) and call output(grade, feedback)
So it do not work for sure as things has not been design to be used this way...
Anyway :
In my prototype of parametrized MCQ, do not tell me : "just make a pltp with 5 times your exercice : OSbank/exercises/MCQ/generalities/qcm/pl". Because even my qcm.pl is fully randomized everywhere (select a random question in a file by parsing it, select some bad proposition, select some good proposition, mixing with Knuth mix everything, and display it...). My parametrized_MCQ.pl is algorithmicaly able to select with uniform law k questions out of n without repetition. By calling k time a random exo inside a pltp, one can't have the warranty of avoiding repetition. Also, i think that exercise like "rapid MCQ" should not be too much fractionned. We want something light in this case, we don't need a navigation panel or relaod of header of html page...