From afc9ec85b7bc04f5f35034d5f92d2790a5b7a879 Mon Sep 17 00:00:00 2001 From: Yannick Warnier Date: Mon, 24 Sep 2007 06:11:20 +0200 Subject: [PATCH] [svn r13201] Continued JS SCORM client library --- main/newscorm/js/api_wrapper.js | 126 ++++++++++++++++++++++++++++++++ 1 file changed, 126 insertions(+) diff --git a/main/newscorm/js/api_wrapper.js b/main/newscorm/js/api_wrapper.js index f2a2e12301..ac882e2e93 100644 --- a/main/newscorm/js/api_wrapper.js +++ b/main/newscorm/js/api_wrapper.js @@ -336,6 +336,7 @@ function convertTotalSeconds(ts) */ function doBack() { + checkAnswers(true); doLMSSetValue( "cmi.core.exit", "suspend" ); computeTime(); exitPageStatus = true; @@ -368,6 +369,7 @@ function doContinue(status) */ function doQuit(status) { + checkAnswers(); computeTime(); exitPageStatus = true; var result; @@ -384,4 +386,128 @@ function unloadPage(status) { doQuit( status ); } +} +/** + * Third section - depending on Dokeos - check answers and set score + */ +var questions = new Array(); +var questions_answers = new Array(); +var questions_answers_correct = new Array(); +var questions_types = new Array(); + +/** + * Checks the answers on the test formular page + */ +function checkAnswers(interrupted) +{ + alert('Test'); + var tmpScore = 0; + for(var i=0; i