fix capa textline to properly use inline if specified when using math preprocessor - #2869
Conversation
|
I see tests failed (https://jenkins.testeng.edx.org/job/edx-all-tests-auto-pr/6525/SHARD=1,TEST_SUITE=unit/testReport/junit/capa.tests.test_input_templates/TextlineTemplateTest/test_preprocessor/). I can take a look over the weekend. |
|
Thanks, @chrisndodge. I see where the test is failing; let's see if this fixes it. |
|
tests passing now. |
|
@ichuang thx. Likewise, could you forward some sample capa definition so I can try locally? Thx. |
There was a problem hiding this comment.
This trailing space seems error-prone. Best is to treat the class attribute as a set of space-separated words. That's awkward to do in XPath, but I think this would be a better fix: //div[contains(@class, "text-input-dynamath_data")]
|
Pinging @Lyla-Fischer on this one as well. |
|
@chrisndodge change to test made; added an additional new test to ensure inline appears on that element. |
|
Here is a sample capa XML code fragment: It needs a python check function, and the js preprocessor code as well; you can make dummy ones of these. The 6.002x course source uses such functions and js. |
|
This is not going to change any defaults - right? Any element that does not have the style="display:inline" will continue rendering in exactly the same way that it was rendering before? |
|
correct |
|
Seems fine to me then. |
…jspre fix capa textline to properly use inline if specified when using math preprocessor
|
thanks |
|
The sample code fragment provided here does not work on stage. |
|
it won't work unless you modify it to include an appropriate python check function and js math preprocessor. |
|
Ah - okay. Thanks |
When using the dynamic math javascript preprocessor feature, textline does not honor the "inline" flag, because of a div which is fixed to be
display:block.This PR fixes that bug, using the same approach as previously employed (https://github.com/edx/edx-platform/pull/845).
1 line, 12 character fix.
@chrisndodge ?