hedyorg / hedy

Hedy is a gradual programming language to teach children programming. Gradual languages use different language levels, where each level adds new concepts and syntactic complexity. At the end of the Hedy level sequence, kids master a subset of syntactically valid Python.
https://www.hedy.org
European Union Public License 1.2
1.34k stars 292 forks source link

Store parsons problems attempts in database #2786

Closed TiBiBa closed 2 years ago

TiBiBa commented 2 years ago

Description As we now support parson problems on production (really nice @xxxpokemon !) it would be great if we kept track of the attempts of different users. Storing their attempts in the database such as how we store run programs. We do have to think about what is relevant to store as I'm struggling a bit with relevant information. The correct order of the lines is always A, B, C.... Possible information we can store:

Any suggestions on what would be relevant? @MarleenGilsing @Felienne

Felienne commented 2 years ago

Hi @TiBiBa!

This might serve as a good trial for a feature where we also track usage, so just: how many users have opened the tab at all?

Any suggestions on what would be relevant? @MarleenGilsing @Felienne

I guess a first question is: do we want to store all attempts by all users? Could be very nice to correlate with quiz scores and error rates, but it would be a lot of data since then we also want to know the order of the submissions to see the path to correctness (f.e. with a timestamp), like this:

ACBD, user1, 22-05-2022 10:01 ABCD, user1, 22-05-2022 10:03

We could also store all orders and their frequency without the user info? Something like:

ACDB: 1 ABCD: 12 BCDA: 3

We might want to store both these forms to easily show it in an admin overview to understand the quality of the questions.


Also: I think in the future we want to change the data model so that there can be multiple puzzles per eleven (like we have multiple questions in a quiz) so it would be good to take that into account already.

TiBiBa commented 2 years ago

ACBD, user1, 22-05-2022 10:01 ABCD, user1, 22-05-2022 10:03

I like this idea! Will take a look to implement this. If I remember correctly we already have some session identifier (which is of course the username when logged in) for anonymous users. Will look into implementing this! We do need an additional database table I think.

ACDB: 1 ABCD: 12 BCDA: 3

We might want to store both these forms to easily show it in an admin overview to understand the quality of the questions.

I think if we use the order as an index key we don't need additional storing as we can quickly retrieve this info. Making the structure a bit less complex.

Also: I think in the future we want to change the data model so that there can be multiple puzzles per eleven (like we have multiple questions in a quiz) so it would be good to take that into account already.

We already support this! I altered the YAMLs so we can automatically iterate over the parsons problems in the file and show them together (which is one at the moment). We do need some type of identifier on the question itself, but will look into this as well.

Felienne commented 2 years ago

We already support this! I altered the YAMLs so we can automatically iterate over the parsons problems in the file and show them together (which is one at the moment). We do need some type of identifier on the question itself, but will look into this as well.

Great!! When @MarleenGilsing runs out of tasks (:D) she could design a few more problems over the next few weeks.