points
2 TopicsSending Points to the LMS using Javascript
I have a quiz that contains 14 free-form questions and one custom built question for a total of 15 points. Variable: customScore stores the custom question result. Variable: quiz.ScorePoints stores the built in quiz result. Variable: finalScore combines both values. On the result slide i can see all of these variables working as intended and being combined correctly. When i try and print the score to Moodle however the score repeatedly returns 0. I have played around with switching Results.ScorePercent with quiz.ScorePercent and quiz.ScorePoints without luck. Can anyone see any error in the script? Here is the code: var player = GetPlayer(); var customScore = player.GetVar("customScore"); var quizScore = player.GetVar("Results.ScorePercent"); var finalScore = quizScore + customScore; // Set the final score (0-100 scale) lmsAPI.SetScore(finalScore, 100, 0); // Mark the course as completed lmsAPI.SetReachedEnd();107Views0likes5CommentsQuiz submitting 10 points to Moodle for every 1 point scored
Hi My Quiz is submitting 10 points to moodle for every 1 point the user scores. So if the student receives 5/10 in the quiz, 50 points are synced to the LMS instead of 5. Each quiz question is worth only 1 point in storyline. I cannot find a reason for this happening?44Views0likes3Comments