Skip to content

Commit

Permalink
Regression: Reset button and Ajax downloads of question fields in aut…
Browse files Browse the repository at this point in the history
…hor form weren't working.
  • Loading branch information
trampgeek committed Jul 26, 2024
1 parent 2200af3 commit 1a0332c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion amd/build/authorform.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion amd/build/authorform.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion amd/build/resetbutton.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/build/resetbutton.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion amd/src/authorform.js
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ define(['jquery', 'qtype_coderunner/userinterfacewrapper', 'core/str'], function
if (useace.prop('checked')) {
for(var i = 0; i < taIds.length; i++) {
ta = $(document.getElementById(taIds[i]));
uiWrapper = ta.data('current-ui-wrapper');
uiWrapper = ta.get(0).current_ui_wrapper;
if (uiWrapper && stateOn) {
uiWrapper.restart();
} else if (uiWrapper && !stateOn) {
Expand Down
2 changes: 1 addition & 1 deletion amd/src/resetbutton.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ define(['jquery'], function($) {
resetButton.on("click", function() {
if (window.behattesting || window.confirm(confirmText)) {
var reloadText = resetButton.attr('data-reload-text');
uiWrapper = studentAnswer.data('current-ui-wrapper');
uiWrapper = studentAnswer.get(0).current_ui_wrapper;
if (uiWrapper && uiWrapper.uiInstance) {
// If the textarea has a UI wrapper, and it's active.
uiWrapper.stop();
Expand Down

0 comments on commit 1a0332c

Please sign in to comment.