Change final course grade.

Can I replace the Submit.results by a Javascript execution amending the final grade and the status of the course?
My script is like this:

 

var player = GetPlayer();
var score = player.GetVar("UltimaNota");

var lmsAPI = parent;

lmsAPI.SetScore(score, 100, 0);

if(score >= 80){

    SetStatus('passed');

}else{

    SetStatus('failed');
}

 

3 Replies