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

html answers evaluated correctly #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Amrita1991
Copy link

@Amrita1991 Amrita1991 commented Sep 12, 2022

this resolves the problem i mentioned in #43 where answers containing html tags are evaluated falsely. this pull request solves this by stripping html tags and comparing the correct answer with user given one as plain texts

@marcusgreen
Copy link
Owner

Thank you, I should have some time to look at this after this week (though I will be tempted in the mean time)

Copy link
Owner

@marcusgreen marcusgreen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think will work because the distractors are written to the question_answers tables with html tags stripped. The problem is I cannot see where the stripping happened. I was expecting it to be a bit like

    $stripexcptions = "<hr><a><b><i><u><strike><font>";

and then $stripexceptions is fed as a second parameter to striptags, though that cannot be correct as it doesn't contain a
If you can find where tags are being stripped from the distrators/wrong answers, it might be able to make a working patch.

@Amrita1991
Copy link
Author

I understand your point. I tried to look for where the stripping happens too but wasnt successful. I will look again.
However, just to remind you this PR doesnt correct the distractors. My aim here is to correct the situation when a student drags the correct answer into the gap but it gets evaluated wrong if the correct answer has html tags in it.

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

Successfully merging this pull request may close these issues.

2 participants