2 questions in a Pool of 8 questions random

I would to add at the end of a video a pool with 8 questions that take only 2 of these randomly.
If the user answer correctly the 2 questions, the test finishes, otherwise the user must return to the beginning of the video.
How to do that?

Hi,

Please take a look at the attached project.
random question in video.approj (3.3 MB)

The steps are quite similar to those mentioned in this video:

Besides, please remember to open the View tab > Feedback Master > select Incorrect Feedback Layer > add events - actions for it as in the below image:
image

Regards,
Yen

Hi Yen,
thanks for your reply.
But the problem is that when a user give the wrong answer and return at the beginning, the question is always the same.
Why?

Hi,

Random slides are initialized randomly only once when the viewer starts the presentation, so when the viewer goes back and forth the slides (and questions) are always the same.

In your case, you can use normal question slides, and use the following script to jump to a random slide:

// show a random slide in the range from minIndex to maxIndex
var minIndex = 2;
var maxIndex = 5;
var randomIndex = Math.floor(Math.random() * (maxIndex - minIndex + 1)) + minIndex;
if (randomIndex != prez.currentSlideIndex())
  prez.showSlideAt(randomIndex);

Regards

Hi Toan,
thanks for your reply.
Where I have to insert this code?

P.S. I would that the user must answer both the question correctly to pass the test.

Hi,

It depends.
If you want to show the question when the viewer clicks a button, add that script to On Click event of the button.
If you want to replace a slide by a random slide, add that script to On Load event of the slide.

Regards

I don’t understand.
Could you provide me an example with this script inside?
I would always use a random slide from a pull, naturally randomized when a user give the wrong answer.
Very thanks.

Hi,

You can’t use the random slide feature for your case. It doesn’t randomize the slides again when you restart the presentation as I said.

You can use script to show normal slides randomly as this sample: recreate-random-slides.approj (740 KB)

Regards

Very Thanks Toan.
I will buy 4 licenses of the software. :blush:

Two questions:

  1. this sample project will work also when I use a pool with 6 questions? (not 8 questions as your sample)

  2. I need another sample where I have a video and there will be 4 steps of quiz during the video (1 random question from a pool of 4).
    And so if the video is long 5 minutes, the random question must to appear, for example:

1st step - 02:00 min - 1st random question from pool 1
2nd step - 03:00 min - 2nd random question from pool 2
3rd step - 04:00 min - 3rd random question from pool 3
4th step - 05:00 min - 4th random question from pool 4

Naturally if the user gives the wrong answer, he must return to the previous step.
Please can you provide me another sample for this?

Very thanks

Hi,

  1. Yes, you just need to update the script in the first slide On Load event:
  // recreate random slides
  // 2 random slides in a pool of 6 slides, the pool starts from slide 5
  prez.myInitRandomSlides(2, 6, 5);

Please note that my sample is just a workaround with many limitations, such as:

  • Score in percentage will not work correctly because the total maximum score will take all questions from the pool into account.
  • Users can click on the player progress bar to jump to a slide in the pool. You should disable navigation in Player Settings > General tab to prevent it.

We’ll consider adding an option to recreate a new random set of slides (or something like that) if there are many requests from users.

  1. Do you want to show questions over the video, or questions and video are in different slides?

Regards

Hi,
very thanks.

  1. Ok, I will update the script.
  • Consider i will set up the score in points, and so, when a user gain 2 points, the quiz ends.

  • I have already disabled the player progress.
    Can I also hide the current-slide/total slide on the bar?

  1. I need that when the questions appears, the video must to stop, and if the user gives the wrong answer, he must return to the previous step.
    And so they could appear over the video.

Thanks

@ToanLS for the point 2?
Very thanks, this is foundamental for me before to buy the licenses.

Hi,

  1. The most simple way is hiding the progress bar in Player Settings > Toolbar
  2. Please see this sample: recreate-random-questions-at-random-time-2.approj (3.5 MB)
    You need to do the following steps:
  • Insert slide questions, set their max attempts to Infinite.
  • Copy the questions and question titles (without slides) and paste into the video slide.
  • Rename the questions and question titles (e.g. Q1_P1 for question 1 in pool1)
  • Set them initial hidden.
  • Update names of questions, question titles, section times, question random time ranges… in Project > Properties > Event.
    You can add as many sections and questions as you want.

Regards

Dear @ToanLS,
Very Thanks!!

Now, it works!
But I have 2 questions:

  1. I need the questions in “Multiple Choice” format
  2. After a user give the wrong answer, at the future attemps, the question has already taken (see image). Can I avoid this?

Thanks again
Schermata 2020-11-18 alle 04.51.11

Hi,

  1. You can use any question format.
  2. You an update the script in Project Event as follows:
// search for this line
this.object(this.myShowingQuestion.question).show();
// and change it to
this.object(this.myShowingQuestion.question).show().clear();

Regards

Hi,

  1. Perfect, done!
  2. How can I change the format (I need multiple choice), without creating a new question slide?

P.S.
My goal is:

  • 4 sections
  • 4 questions for each section (multiple choice format)

If the video is, for example 1hour long, how can set a section time range in milliseconds (e.g. from 14min to 16min)?

If you send me another sample project with these settings, I will be very grateful.

There’s no way, you must insert your new questions.

1 minute = 60 seconds = 60 x 1000 milliseconds

It’s very easy to add sections, questions to my sample. Please do it yourself.

Regards

1 minute = 60 seconds = 60 x 1000 milliseconds

Ok! Perfect!

There’s no way, you must insert your new questions.

Ok, but if I add a new question, the software, by default, create a new slide. How to insert like yours questions?

I’ve already mentioned it in my answer:

Regards

I have tried to copy and paste over the video, but there is not the same to your paste.
See the attachement.