Closed danjjohnson closed 9 years ago
@davidpagepsycle was there a reason you didn't include those fields? Do you think it's worth adding support for them?
It was more because of how the client was using the system. LaTeX wasn't being added to question titles, instead it was getting added to the (optional) question description, which has 'the_content' filters applied so it was covered. Multiple choice seemed to be the only time they use LaTeX, it had never been used on the gap fill questions. Those are used instead as text based answers. And there has never been a use of the file upload type so far.
The JetPack module adds it's function "latex_markup" to the filters "the_content" and "comment_text". You could apply one of those to Sensei questions/answers to ensure LaTeX support, but that could cause knock-on effects. Thus my creation of the filter 'sensei_answer_text'.
It's possible that someone else might consider using LaTeX in a question title, on the file upload help, or the gap fill fields.
I'll create a PR for this idea. It would mean that all someone would have to do is to add Jetpack and active the Beautiful Maths module and they'd be ready to go.
This all sounds great to me - happy with all of your proposed changes.
Only thing I'd be wary of is adding add_filter( 'the_title', 'latex_markup', 9 );
as that would affect all titles on the site. It might be better to just apply the filter directly to the question titles. Maybe a custom filter sensei_question_title
that simply applies the latex_markup
filter, but it would also allow us (and users) to do further processing of question titles in the future.