home *** CD-ROM | disk | FTP | other *** search
- class com.argosy.PALReporting
- {
- static var q_array;
- static var t_elapsed;
- static var t_total;
- static var timestamp;
- static var correct;
- static var total;
- function PALReporting()
- {
- }
- static function setData(testID, stop_time, questions, time_elapsed, duration)
- {
- com.argosy.PALReporting.q_array = questions;
- if(time_elapsed)
- {
- com.argosy.PALReporting.t_elapsed = time_elapsed;
- }
- if(duration)
- {
- com.argosy.PALReporting.t_total = duration;
- }
- com.argosy.PALReporting.timestamp = stop_time;
- com.argosy.PALReporting.correct = 0;
- com.argosy.PALReporting.total = 0;
- var _loc1_ = 0;
- while(_loc1_ < com.argosy.PALReporting.q_array.length)
- {
- if(com.argosy.PALReporting.q_array[_loc1_].isCorrect != undefined && com.argosy.PALReporting.q_array[_loc1_].isCorrect != null && com.argosy.PALReporting.q_array[_loc1_].isCorrect)
- {
- com.argosy.PALReporting.correct = com.argosy.PALReporting.correct + 1;
- }
- com.argosy.PALReporting.total = com.argosy.PALReporting.total + 1;
- _loc1_ = _loc1_ + 1;
- }
- trace("NEW DATA SET:");
- trace("Correct Answers: " + com.argosy.PALReporting.correct + " / " + com.argosy.PALReporting.total);
- trace("Completed on: " + com.argosy.PALReporting.timestamp.toString());
- trace("Completed in: " + time_elapsed + " milliseconds");
- trace("Out of a total of: " + duration + " milliseconds");
- }
- static function sendData(returnSet)
- {
- var _loc1_ = new LoadVars();
- _loc1_.correct = com.argosy.PALReporting.correct;
- _loc1_.total = com.argosy.PALReporting.total;
- _loc1_.elapsed = com.argosy.PALReporting.t_elapsed;
- _loc1_.duration = com.argosy.PALReporting.t_total;
- _loc1_.timestamp = com.argosy.PALReporting.timestamp.toString();
- _loc1_.sendAndLoad("testsubmit.php",returnSet,"POST");
- }
- }
-