From a55f37cd9dde8419c4dbfb786658923c6f9e0328 Mon Sep 17 00:00:00 2001 From: kimth Date: Thu, 13 Sep 2012 11:04:37 -0400 Subject: [PATCH] Problem js runs MathJax only over its own contents rather than full page --- common/lib/xmodule/xmodule/js/src/capa/display.coffee | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/common/lib/xmodule/xmodule/js/src/capa/display.coffee b/common/lib/xmodule/xmodule/js/src/capa/display.coffee index 54ffd4dafa..c152c382ff 100644 --- a/common/lib/xmodule/xmodule/js/src/capa/display.coffee +++ b/common/lib/xmodule/xmodule/js/src/capa/display.coffee @@ -11,7 +11,8 @@ class @Problem $(selector, @el) bind: => - MathJax.Hub.Queue ["Typeset", MathJax.Hub] + @el.find('.problem > div').each (index, element) => + MathJax.Hub.Queue ["Typeset", MathJax.Hub, element] window.update_schematics() @@ -267,7 +268,9 @@ class @Problem showMethod = @inputtypeShowAnswerMethods[cls] showMethod(inputtype, display, answers) if showMethod? - MathJax.Hub.Queue ["Typeset", MathJax.Hub] + @el.find('.problem > div').each (index, element) => + MathJax.Hub.Queue ["Typeset", MathJax.Hub, element] + @$('.show').val 'Hide Answer' @el.addClass 'showed' @updateProgress response