Commit Graph

9 Commits

Author SHA1 Message Date
Waqas Khalid
4834e51aca Mathjax should be used after complete loading
Student couldn't able to submit his answer in ie9
becuase mathjax was used before its complete loading
thats cuase the problem. Mathjax operations should be
handled synchronously inorder to avoid error.

BLD-1199
2014-09-05 17:19:48 +05:00
Chris Terman
d3149f66aa add initial_state attribute to jsinput tag 2014-07-23 09:21:42 -04:00
stv
fd10fbf725 Fix JSInput scope leak
Declare variables locally
- The `allSections` variable was leaking into the global scope, due to a
  typo in the declaration.
- `dataProcessed` can be declared more narrowly within the callback.
2014-06-13 11:04:24 -07:00
Jonas Jelten
3de30aba2e fixed retry invokation for calling setState
to successfully call a function with parameters by setTimeout,
it needs to be a function that will be called by setTimeout internally.

this patch actually enables multiple tries for calling the setState function.
2014-04-18 23:00:25 +02:00
jmclaus
5478525a42 Added JSInput template to Studio and a sop attribute to JSInput. Only if it's set to false, as in JSInput's template, will JSChannel be used to bypass it. In all other cases (attribute not present or set to something else), SOP is enforced. Compatibility with jsVGL is therefore maintained. Multiple JSInput are supported in a vertical. Also, save button now functions. [BLD-523, BLD-556, BLD-568] 2013-12-20 17:03:56 +01:00
Peter Baratta
48cb05c037 Reset 'correctness' visual indicator of a problem on new input
Affects:
Choicegroups, option inputs, textline, and formula equation inputs
2013-08-30 12:03:41 -04:00
Peter Baratta
e312344dfa Fix initial loading bug.
Change the `MathJax.Hub.Queue(initializeRequest)` to a simpler function call
(`initializeRequest.call(this)`). This was failing to give a proper context
to initializeRequest, and `this.value` was turning up as `undefined`.

Also add a fallback if we need to display some code before MathJax finishes
its original typesetting.

I was stubbing out `Queue` in my specs, so the tests had to be changed around
a little.
2013-08-13 13:33:51 -04:00
Peter Baratta
735e3b01a2 Create a new response type for Numerical/Formula
Named `FormulaEquationInput` (name up for debate)

- Based off ChemEqnIn
- Add FormulaEquationInput in inputtypes.py
- Add a call to a skeleton method for a preview

javascript:

- Queue up some MathJax
- Put some ordering on the AJAX requests: add a parameter when the request was started, when it returns check that it isn't outdated before displaying the preview
- Tests

Note: we moved the `jsinput` tests and DISABLED them, because they were causing the tests to fail.
2013-08-12 11:48:45 -04:00
Julian Arni
fd6abc88e2 Incorporate review comments 2013-07-08 14:32:02 -04:00