qkzk / qcm_alchemy

Share multiple question choices with your student created from simple mardown files
https://qcmqkzk.fr
GNU General Public License v2.0
3 stars 1 forks source link

Records partial answer as soon as student click/type. #65

Closed qkzk closed 2 years ago

qkzk commented 2 years ago

Record partial answers.

It's a heavy one.

Problem

When a QCM is open, a student can access it. If the teacher closes the QCM, the student can't submit anymore. The student would have no point even if the answer is sent 1 second too late.

Solution

Record partial answers as soon as a student types something or selects an answer.

It allows us to have 'partial' answers for a student who started the QCM on time (when it was opened) and finished it late (when it was closed).

A js function is called every time a radio is clicked or a textarea lose focus and send an AJAX request with the student answers as a JSON object.

It is then recorded normally since the format is the same.

The only difference with a "Envoyer" answer is this work isn't marked as "submitted" (on purpose).

It will generate A LOT of requests, which is bad...

I had to add a "Je ne sais pas" answer for every radio choice in first position (ie. selected by default). It may go if I find a better way.

I had to write a lot of "dynamic JS" ie. JS with Jinja elements... which is prone to errors. I would like to change that, but I'll have to serialize the (questions, answers) object. Might not be that difficult.

Other solutions