3 Replies Latest reply: Oct 14, 2014 7:16 AM by RodWard RSS

    Storing multiple captivate quiz results, and then aggregating them without an LMS.

    MPI-IT Community Member

      I have 7 lessons that make up one course. Each of this lessons has a post assessment that determines if the user can go on to the next lesson. I need to collect these lesson scores separately, and then be able to get a course score. Right now I am using user variables to pass the scores through the course to the last lesson, here they are displayed on a results slide. My issue is that I cannot seem to get these scores to aggregate. I wrote a javascript function, which runs fine when I test it alone in a single lesson. But when I aggregate the lessons into one course the javascript no longer runs. I would eventually like to get these individual scores into a database as well, but for now fixing this is a priority. Here is a copy of my javascript. It is just taking the uservariables that hold points scored and points possible and adding them together. Pretty simple, but I'm not sure why it wont run when the project is aggregated. Any help would be appreciated.

       

      var mymovie = window.cpAPIInterface;

      var $quizresults1 =+mymovie.getVariableValue("quizresults1");

      var $quizresults2= +mymovie.getVariableValue("quizresults2");

      var $quizresults3= +mymovie.getVariableValue("quizresults3");

      var $quizresults4= +mymovie.getVariableValue("quizresults4");

      var $quizresults5= +mymovie.getVariableValue("quizresults5");

      var $quizresults6= +mymovie.getVariableValue("quizresults6");

      var $quizresults7= +mymovie.getVariableValue("quizresults7");

       

       

      var $quizresultstotal = ($quizresults1 + $quizresults2+ $quizresults3 + $quizresults4 + $quizresults5 +$quizresults6 + $quizresults7 );

      alert( "you scored" + $quizresultstotal);

      mymovie.setVariableValue ("quizresultstotal", $quizresultstotal);

       

       

      var $quizpoints1= +mymovie.getVariableValue("quizpoints1");

      var $quizpoints2= +mymovie.getVariableValue("quizpoints2");

      var $quizpoints3= +mymovie.getVariableValue("quizpoints3");

      var $quizpoints4= +mymovie.getVariableValue("quizpoints4");

      var $quizpoints5= +mymovie.getVariableValue("quizpoints5");

      var $quizpoints6= +mymovie.getVariableValue("quizpoints6");

      var $quizpoints7= +mymovie.getVariableValue("quizpoints7");

       

       

      var $quizpointstotal= $quizpoints1 + $quizpoints2 + $quizpoints3 + $quizpoints4 + $quizpoints5 + $quizpoints6 + $quizpoints7 ;

      mymovie.setVariableValue("quizpointstotal", $quizpointstotal);

       

      -Drew H