Clearing suspend_Data and Javascript List

Nov 18, 2019

Hi everyone!

I hope there is someone who knows some trics and can help me out, as I think it cannot be too hard. I’ve been looking around the forum but haven’t found an answer yet.  

Short story:

1- does anybody know, how to empty the suspend_data of a training, through e.g. a script?

2- does anyone know, how to clear a list made in javascript?

 

Context:

It is about a WBT that has to be exported in SCORM 1.2 (no 2004 allowed) and consists out of two large quizzes including a feedback function where the user sees, which questions he/she answered wrong after each quiz. 

The first issue is related to the limit of the suspend data (4kb) and by compressing the content I found (partly) a workaround.  

1. Unfortunately even when I compress the data, the limit will be reached when the user has to redo the quiz a few times. If I can reset the suspend-data, this will be undone, hence my first question. For the second quiz this is no option as I don't want the user to lose its progress, but the second quiz is smaller and the chance that it will reach the limit is very small. 

2. The Feedback function has a script, that adds questions which are answered wrong (as text) to a list as an overview. Unfortunately, this list is not cleared when I redo the test and I see all questions which I answered wrong in my attemps before, too. Probably when I clear the suspend_data this will be cleared too, but for the second quiz I don't have this option. Therefore I am looking for a solution to empty the list, which is build through this script:  

var player = GetPlayer();
var List = player.GetVar("listText3");
var NewText= player.GetVar("m1b_01");
var Concat = List + NewText + "\n";
player.SetVar("listText3",Concat);

 

Where m1b_01 is the question (text) that is added to the list. I want to clear this list when the user re-starts the test and don't know which script to use for that.  

Is there anyone who have some tips for these issues? I am not sure whether one solution might actually fix both instances, but that I can figure out if I have some input to test with. 

Thank you very much in advance! 

3 Replies