Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed:question.isSolved is not keeping things the way the student submitted them. #35

Closed
easyflhomeschool opened this issue Jul 20, 2023 · 4 comments
Labels

Comments

@easyflhomeschool
Copy link

dragDollarWallet.txt

I added a file (renamed it txt, however it is an xml file) I want the money to stay where the student 'drops' it on the screen. Can you please let me know if it is a bug or a programming error on my part. Thank you, Wendy

@andreas-web
Copy link
Collaborator

Dear Wendy!
Thank you for your question. I took a closer look at the XML file and tried it on my Moodle.

If I understand you correctly, you want students to drag the dollar bills into the black box in this question. When they submit the question, you still want the notes to be where they were dragged previously.

This is not possible with your current programming. To "remember" where the bills were positioned, a database entry must be made. For this there is the functionality described here: https://github.com/jsxgraph/moodleformulas_jsxgraph/blob/master/README.md

So my idea for your case would be to expect more answers in the question. The first one is the one that counts and you have already implemented it that way. As memory you would have to create further answers, in which the coordinates of the bills are saved. Of course, these must not be used for the evaluation.

An example, how one could save the coordinates, you can find here: https://github.com/jsxgraph/moodleformulas_jsxgraph/blob/master/README.md#example.

I hope I could help. A change to our code does not seem necessary to me. Therefore I close the issue. If you still have questions, feel free to open it again.

Kind regards,
Andreas

@easyflhomeschool
Copy link
Author

easyflhomeschool commented Jul 21, 2023 via email

@easyflhomeschool
Copy link
Author

easyflhomeschool commented Jul 21, 2023 via email

@andreas-web
Copy link
Collaborator

Dear Wendy.

Please have a look. I have edited your question a little bit. You have to query at the beginning what the last value of the variable was and use this then to position the bills. Then it works!

I also introduced a variable where you can find the correct answer. This consists of [number, '0.5' (as often as there are "superfluous" bills), -2 (as often as there are needed bills)].
At this point you have to work further to implement the whole randomized. But you can do it!

Best regards,
Andreas

questions-test-Drag-dollars to wallet ($4) (WIP)-20230726-1132.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants