Commit c8e47f1
committed
fix: Disable file buttons when actions in progress
In the student view "Your Response" section,
there were several race conditions and issues relating to file uploads:
- Selecting the file input while multiple file uploads are in progress
results in broken uploaded files and inconsistent UI.
- A file can be deleted after clicking Submit,
while the submission is still processing.
- Clicking "Upload files" again after successfully uploading files,
but before selecting more files,
results in an attempt to upload the same files again.
On a high speed network connection,
the race condition issues are not very noticeable,
but on a slower connection,
they are easy to trigger as there is more time
in the UI while processing is happening in the backend.
These changes fix the above issues by ensuring that the buttons
and other input fields relating to file uploads
are disabled while actions are in progress
(uploading, deleting, submitting).
Private-ref: https://tasks.opencraft.com/browse/BB-99381 parent 3e4bf88 commit c8e47f1
File tree
13 files changed
+87
-53
lines changed- openassessment
- xblock/static
- dist
- js/src/lms
13 files changed
+87
-53
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 17 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 0 additions & 3 deletions
This file was deleted.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
162 | 163 | | |
163 | 164 | | |
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
167 | 168 | | |
168 | | - | |
| 169 | + | |
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
172 | 173 | | |
173 | | - | |
| 174 | + | |
174 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
175 | 179 | | |
176 | 180 | | |
177 | | - | |
| 181 | + | |
178 | 182 | | |
179 | 183 | | |
180 | 184 | | |
| |||
307 | 311 | | |
308 | 312 | | |
309 | 313 | | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
310 | 340 | | |
311 | 341 | | |
312 | 342 | | |
| |||
523 | 553 | | |
524 | 554 | | |
525 | 555 | | |
526 | | - | |
527 | | - | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
528 | 559 | | |
529 | 560 | | |
530 | 561 | | |
| |||
547 | 578 | | |
548 | 579 | | |
549 | 580 | | |
550 | | - | |
| 581 | + | |
551 | 582 | | |
552 | 583 | | |
553 | 584 | | |
| |||
568 | 599 | | |
569 | 600 | | |
570 | 601 | | |
571 | | - | |
572 | | - | |
| 602 | + | |
| 603 | + | |
573 | 604 | | |
574 | 605 | | |
575 | 606 | | |
| |||
840 | 871 | | |
841 | 872 | | |
842 | 873 | | |
| 874 | + | |
843 | 875 | | |
844 | 876 | | |
845 | 877 | | |
846 | 878 | | |
847 | | - | |
848 | | - | |
| 879 | + | |
| 880 | + | |
849 | 881 | | |
850 | 882 | | |
851 | 883 | | |
852 | 884 | | |
853 | 885 | | |
| 886 | + | |
| 887 | + | |
854 | 888 | | |
855 | 889 | | |
856 | | - | |
| 890 | + | |
857 | 891 | | |
858 | 892 | | |
859 | 893 | | |
| |||
0 commit comments