Commit Graph

147 Commits

Author SHA1 Message Date
zubair-arbi
dbe4410d44 set overflow to scroll so that user can see full content with increased font size
TNL-256
2014-10-02 19:34:57 +05:00
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
David Baumgold
2e02cefc90 Update comments to point to openedx.atlassian.net
And whitespace corrections (automatically made by my editor, and I'm too lazy
to remove them)
2014-08-18 15:34:06 -04: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
stv
cf14dee790 Fix JSInput test fixture
Clean up fixtures automatically between tests
- Nesting test fixture markup within a DIV allows Jasmine to
  automatically restore the fixture to a clean state between each test
  run.

Fix id attribute collision typo
- This looks like a copy/pasta gone wrong; the two test INPUT elements
  were both declared with the same id, `input_1`.

Remove trailing whitespace
2014-06-13 11:04:24 -07:00
stv
bdf90bfcfb Remove superfluous JSInput test
The behavior previously tested here was to check that if a JSInput
element was marked as not processed, re-walking the DOM *should* have
reinitialized it. Unfortunately, this behavior is not supported by the
underlying JSChannel library. In fact, if JSChannel detects an existing
channel with the same origin and scope, it throws an uncaught exception,
leaving the DOM in a "broken" state.

JSInput will prevent duplicates from being added, as long as we don't
manually update the `data-processed` attribute. This behavior is already
being tested.
2014-06-13 11:04:24 -07:00
stv
60a9e99871 Fix JSInput tests
Select DOM elements with wildcard syntax

- DOM lookups were being done with non-existent literal selectors, so it
  was returning empty lists. As assertions were to be made while
  iterating over the list of elements, nothing was actually being
  verified.

- Common code has been centralized in the setup function. By declaring
  CSS selectors once, we minimize the odds of inadvertently using the
  wrong selector, as happened here.

- Had these tests actually been iterating over a non-empty list, this
  would have thrown undefined exceptions. jQuery.each calls its handler
  with an index and an item/object as the arguments. However, the object
  is a DOM-object, not a jQuery-object.  These tests break, as they had
  assumed the latter.
2014-06-13 11:04:24 -07:00
stv
e2cab19084 Ensure JSInput tests actually run
This test currently fails, meaning that the existing tests weren't
testing what they claimed.

Assertions are made for each element returned by the CSS selectors.
However, the selectors are assumed to be wildcard matches, but are
actually literal selectors. As there are no matched elements, this
causes the assertions to be (silently) checked zero times, without
failure.
2014-06-13 11:04:24 -07:00
Dave St.Germain
b073cfaece Fixes BLD-1104 2014-06-03 10:30:58 -04:00
Dave St.Germain
285c07fc22 Addressed review feedback. 2014-05-22 10:40:31 -04:00
Dave St.Germain
232df30b3e support aria-grabbed and aria-dropeffect 2014-05-22 09:51:50 -04:00
Dave St.Germain
f4391b5eb9 fixing drag and drop 2014-05-22 09:51:50 -04: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
Dave St.Germain
376b040775 Removed circuit editor setup code that had always been in
codemirror-compressed.js
2014-03-20 14:33:32 -04: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
Valera Rozuvan
1542a74d2b Removed logme module. Using console.log() instead.
Removing "logme" from comments.

BLD-608
2013-12-20 16:25:44 +02:00
RobertMarks
e3b8ce708f changes to allow multiple choicetextresponses in one problem 2013-11-19 09:55:35 -08:00
David Baumgold
8906cffb22 correct placement of baseUrl variable, use it to configure requirejs 2013-10-09 11:28:46 -04:00
David Baumgold
e53680bb92 make drag_and_drop component work with requirejs and changed static url 2013-10-09 10:26:22 -04: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
RobertMarks
46ae2f9c26 Added support for a new problem type: ChoicetextResponse 2013-07-18 10:12:56 -07:00
Julian Arni
fd6abc88e2 Incorporate review comments 2013-07-08 14:32:02 -04:00
Julian Arni
386029bee3 Adding jasmine tests; code cleanup. 2013-07-01 10:18:38 -04:00
Julian Arni
b03d93901f Pass arguments from ctxCall forward to set state 2013-06-26 12:36:04 -04:00
Julian Arni
1e0702f374 Allow nested object methods for the grade and state functions 2013-06-25 16:14:34 -04:00
Julian Arni
74bb976ef5 Abort submission and alter user if gradefn throws an exception 2013-06-24 16:54:30 -04:00
Julian Arni
e08215e62a JSinput input type 2013-06-19 17:42:55 -04:00
jmclaus
edfa456483 Grading works when sequence is loaded from saved state 2013-04-15 14:05:39 +02:00
John Hess
17fa312b26 Merge pull request #1695 from MITx/jmclaus/genex-save-state
Genex now saves its state
2013-04-02 07:58:17 -07:00
Victor Shnayder
b0356e32b2 Merge pull request #1589 from MITx/peter/symbolic
Added support for superscripts in variables
2013-03-27 10:40:50 -07:00
jmclaus
d763a6fc3a CSS from JSME doesn't affect surrounding content now 2013-03-21 12:19:40 +01:00
jmclaus
8e7990598c Merge branch 'master' into jmclaus/genex-save-state 2013-03-20 09:23:16 +01:00
jmclaus
57b43d7a6c Genex now saves its state 2013-03-19 16:36:55 +01:00
Calen Pennington
029d8c8085 Merge remote-tracking branch 'origin/master' into feature/alex/poll-merged
Conflicts:
	common/lib/xmodule/xmodule/capa_module.py
	common/lib/xmodule/xmodule/tests/test_capa_module.py
2013-03-15 09:46:47 -04:00
Valera Rozuvan
c54ad38fef Better positioning of elements draggables with labels in slider. 2013-03-14 19:42:55 +02:00
Peter Baratta
bac9f1f571 Merge branch 'master' into peter/symbolic 2013-03-14 06:31:17 -06:00
jmclaus
db282d891c Problem 5 grades correctly. Also added missing images 2013-03-13 16:27:56 +01:00
Peter Baratta
49f85211fa More documentation for the javascript 2013-03-08 03:39:34 -07:00
Victor Shnayder
84f05f9f61 Merge remote-tracking branch 'origin/master' into feature/alex/poll-merged
Conflicts:
	common/lib/xmodule/xmodule/capa_module.py
	common/lib/xmodule/xmodule/foldit_module.py
	common/lib/xmodule/xmodule/tests/__init__.py
	common/lib/xmodule/xmodule/tests/test_capa_module.py
	common/lib/xmodule/xmodule/tests/test_combined_open_ended.py
	common/lib/xmodule/xmodule/tests/test_conditional.py
	common/lib/xmodule/xmodule/tests/test_self_assessment.py
2013-03-08 00:40:18 -05:00
Victor Shnayder
57700a56d4 remove links to missing image files. We can add them if needed later. 2013-03-06 19:11:36 -05:00
jkarni
3bb108b12e Merge pull request #1608 from MITx/feature/jkarni/genex
Feature/jkarni/genex
2013-03-06 14:35:01 -08:00
Victor Shnayder
12b6b7d403 Merge pull request #1609 from MITx/diana/refactor-chemical-equation
Refactor Chemical Equation Preview
2013-03-06 12:09:03 -08:00
Victor Shnayder
fb350ed1e3 Merge pull request #1569 from MITx/feature/abarrett/annotatable_xmodule
Feature/abarrett/annotatable xmodule DO NOT MERGE
2013-03-06 12:05:27 -08:00
Diana Huang
42e711e7d2 Update tests and documentation. 2013-03-06 14:53:13 -05:00
Diana Huang
1aa3580dcb Switch over to using the inputtype ajax handler for chemical input. 2013-03-06 14:41:48 -05:00
Julian Arni
d05e82e35c Merge branch 'master' into feature/jkarni/genex 2013-03-06 13:25:30 -05:00
Peter Baratta
c6545eb092 Begin to document symmath as we go 2013-03-06 06:21:08 -07:00