ActivePresenter Saola Animate Pricing Download

Restart and random questions from pool

Hello,
I have a small interactive presentation which draws 4 slides from a pool of 7.
Then on a last closing slide I have a restart button.
It seems that if I use the restart button the 4 selected slides stay the same.
Only if I refresh the page do I get a new random set of 4.

Is there a way to force a new random set of slides when hitting the restart button?

Thanks and regards,

Michael

Hi,

You can add a Javascript code in your restart button to reload the presentation:
image

Please notice that this only works if you run the presentation without LMS.

Regards,

Hi,
Thanks for that.
And for an LMS any solution or must the user close it and restart it?
Regards,
Michael

Hi Michael,

If you run on LMS, there should be an option for users that they can choose a new attempt or just resume a previous section. Users must close and restart it.

Regards,

Hello,
Ideally I would like to have it work inside the SCORM itself as it autoplays and the users do not see the course page where you select start new attempt.
Interestingly enough - location.reload() works in the LMS… it comes up with a new random set of slides… but it also indicates and error -
“GetValue(cmi.entry) failed
Retrieve data after termination”.
This error doesn’t prevent it from working as should. Is there a way to prevent the error or prevent it from popping up ?
Thanks,
Michael

Hi Michael,

Calling location.reload inside the SCORM package may produce unexpected result since all SCORM related calls will be invalid after that.

Regards,

Hi,
Well noted.
Any other idea how to force a new attempt and slide reloads from inside the SCORM?
Can I initialize it again or something like that?
Thanks,
Michael

Hi Michael,

Unfortunately, it seems there is no way to do that.

Regards,

Hi,
Ok - I will work around the problem.
Thanks

Hi Michael,
have you found a solution for this issue?
I mean the refresh in the SCORM package.

Hi,

I didn’t use pool and place all my slides in the main presentation and used a random list of numbers to move from one to another.
On my first slide - on load - I have this script

var slideNumbers = [3,4,5,6,7,8,9];

var obj = prez.object(“Scenarios”);
var draw = 0;
var num = 0;

for (i = 0; i < 4; i++)
{
draw = getRandomInt(0,slideNumbers.length-1)
num = i + 1;
prez.variable(“slide”+num,slideNumbers[draw]);
//window.alert(prez.variable(“slide”+num))
slideNumbers.splice(draw,1)
//window.alert(slideNumbers)
}

if (obj)
{
obj.text("SlideIDs: " + prez.variable(“slide1”)+ ", " + prez.variable(“slide2”)+ ", " + prez.variable(“slide3”)+ ", " + prez.variable(“slide4”));
}

function getRandomInt(min, max) {
min = Math.ceil(min);
max = Math.floor(max);
return Math.floor(Math.random() * (max - min + 1)) + min;
}

Then on my start button I have
prez.showSlideAt(prez.variable(“slide1”),0)

Then on my continue button on each slide
I have prez.showSlideAt(prez.variable(“slide”+prez.variable(“slideViewCount”))
and I add one to the variable slideviewcount before this

Then once I have viewed enough - the button goes to the last slide.

Hope this helps,
You can see it in action here:

All the best,

Hi Michael,
thanks for your reply.
Could you also have a script solution to randomize also a time range when this questions appears?
For example, if a video is long 2min, the questions appears random in a range from 1.45 to 1.55?

Very thanks

Hi,
I guess, theoretically, you could randomized your start times like I did the slide numbers and use “showSlideAt(index,
time)” but hard to say.
I cannot help more - I believe this is a different situation from mine and I don’t have any experience working with videos. The ActivePresenter team may be able to be better assist you.
Regards,
Michael

@namnt What do you think about this solution?
showSlideAt(index,time)

I need this, please.

1 Like

@EspeD, you can find the sample in this post: 2 questions in a Pool of 8 questions random

Regards