common.js 788 B

12345678910111213141516171819202122232425
  1. var questions = new Array();
  2. var questions_answers = new Array();
  3. var questions_answers_correct = new Array();
  4. var questions_types = new Array();
  5. var questions_score_max = new Array();
  6. var questions_answers_ponderation = new Array();
  7. /**
  8. * Adds the event listener
  9. */
  10. function addListeners(e) {
  11. loadPage();
  12. var myButton = document.getElementById('chamilo_scorm_submit');
  13. addEvent(myButton, 'click', doQuit, false);
  14. addEvent(myButton, 'click', disableButton, false);
  15. addEvent(window, 'unload', unloadPage, false);
  16. }
  17. /** Disables the submit button on SCORM result submission **/
  18. function disableButton() {
  19. var mybtn = document.getElementById('chamilo_scorm_submit');
  20. mybtn.setAttribute('disabled', 'disabled');
  21. }
  22. addEvent(window,'load', addListeners, false);