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

Equation not rendering when using equation in gap filled question #71

Open
crystalvaughn opened this issue Apr 5, 2021 · 5 comments
Open

Comments

@crystalvaughn
Copy link

When using a table with multiple rows in a gap filled question, if an equation is entered into the first cell of the table, Mathjax does not convert the equation. This seems to only happen if the first cell in the table is blank. If the equation is placed in the first cell of the table then it renders correctly.

2021-04-05_14-13-42

2021-04-05_14-12-31

@marcusgreen
Copy link
Owner

Could you export to xml and attache the question to a comment here. I generally do not recommend this question type for any numerical/mathematical work. This question type by contrast is specifically designed for such things, and the person who supports it is excellent.
https://moodle.org/plugins/qtype_formulas
If you want the ultimate math quiz questions then stack question type awesome but complex to set up.
https://moodle.org/plugins/qtype_stack
However I'd be happy to help you configure that up.

@crystalvaughn
Copy link
Author

Yes here is a copy of the XML file of the question

questions-quiz-Gapfill test (copy)-20210405-1549.zip

@marcusgreen
Copy link
Owner

I have no idea why, but if you put () just before the table the MathJax seems to render. I tried on a core question type wordselect and this issue does not manifest, so it implies an issue in the parsing code in renderer.php in Gapfill.

@chen21590
Copy link

chen21590 commented Nov 9, 2021

I have the same problem without any table [](url
questions-מטמטיקה - 7 class 19 - Admin User - (2)-שאלה של אלנט - בניה מחדש-20211109-1551.zip
)
you can solve this by adding
$output = format_text($output, FORMAT_HTML, ['noclean' => true]);
before you return the output in rendere.php

@marcusgreen
Copy link
Owner

I will investigate

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

No branches or pull requests

3 participants