Dear Moodle community,

sorry for lengthy question, I spend quite a time by searching for the answer but did not succeed yet. I greatly appreciate any pointers.**TL;DR**

I want Moodle to automatically check numerical homework assignments with random/individual coefficients per student. Each assignment has several sub-questions with numerical answers. Student has unlimited number of trials and the random/individual coefficients should not change on each trial, so the student does not have to recompute his/her assignment. I want Moodle to indicate the correct answer, but it should never to tell the correct answer directly. I have no problem to generate the coefficient and correct answers by myself when there is possibility to import it via XML or something. How do I set up quiz with these properties?

Long read

At our department we use an in-house system for assigning and checking numerical homework. Due to various reasons we consider replacing our system with Moodle quizes or other suitable Moodle activity.

In our system, each student is assigned three individual coefficient which he/she keeps for entire term. All homework assignments are parameterized with these three coefficient. For each assignment the student enters the answered values and the system tells him/her whether these are correct within certain tolerance. If all answers are correct the assignment is indicated as solved.

The problem I encounter with quiz and the "formula" type of question is that when the student retake the quiz, the individual coefficient change, so the student would have to recompute his/her entire assignment. I want to avoid this.

I can imagine three paths leading to my goal but I did not get through with any of them:

1. The coefficients are random, but the student is not allowed tu submit incorrect quiz. (so there is no way that he/she needs to recompute with new random coefficients). The student start the quiz, gets the coefficients, works on his homework (possibly several days), then returns to the quiz and it waits there with the original coefficients.

2. The coefficient are fixed per student - the values are related to students number (or name). This would be optimal, but I do not know how to get student information within the quiz.

3. There is different way that I am not aware of.

Also note, that I have no problems to generate the individual coefficients and the correct answers outside Moodle and feed them via some CSV or XML if this is the way to go. But do not know how to link these to student accounts.

Could you please point me to some way how to set up such quiz/homework assignments?

Our Moodle version is 3.9.

Thank you for taking the time to reply.

Tomas