Fix invalid html for ans_array answers. #1318
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
format_matrix_HTML
method usesspan
tags to format the html output for matrices. This is a problem when that is used to format the output for anans_array
answer because the answer inputs inside now are wrapped indiv
tags (so that the feedback button works in a valid html way). So this just switches to usingdiv
s instead. This doesn't change the result at all since the containg array layout div already hasdisplay:inline-block
set.There is one minor tweak to the style. I added
text-align:center;
to the cells. This just looks better in about all of the cases that I have observed. Note that this is also consistent with when these objects are displayed in math mode via MathJax or as an image with the image display mode.Note that method is used ans_array matrix, vector, and point answer rules, as well as the "Entered" feedback preview of the student answer for those answers. It also affects the "textual" correct answer, but that actually isn't used for anything anymore.