Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix multiple loading of javscript for the single problem grader.
This is the cause of issue #2588. If a gateway quiz has mulitple problems on the same page, then the single problem grader template is loaded once for each problem. Each time the template is loaded, it adds the single problem grader javacript to the page. So as many instances of the javascript are active on the page as there are problems on the page. As such, the save button event handlers are added once for each problem on the page as well. So when the save button is clicked, the score and comment for that problem are submitted once for each problem on the page. All of those requests firing at the same time can cause authentication to fail because the session key can be deleted and put back in again by different processes, and the timing of things can mess things up. Note that this does reveal some deeper database issues though.
- Loading branch information