I don't believe that there's a way to dynamically set the quiz duration via normal development interface mechanisms, i.e., I think you get to set the quiz duration on the Results slide at development time but that's it.
I would investigate a mechanism whereby you throw out the automated timing and do it manually via a mechanism similar to the following:
- Have a variable called 'quizSeconds' or similar. This would hold the number of seconds that the person has actually spent in the current quiz/re-take. This would need to be set to 0 at the start of each quiz attempt (not each question, but at the top of the initial quiz and then any re-takes).
- Set a variable called 'allowableQuizDuration' with the total number of seconds allowable for the quiz attempt. E.g., if the quiz has 10 questions and you'd like to allow 1 minute per question then allowableQuizDuration would be 600 (i.e., 10 x 60). If a later re-take had 5 questions then you'd set allowableQuizDuration to 300 (5 x 60). You'd set this at run-time as appropriate the top of the initial quiz and any re-takes. This gives the dynamism you're looking for in the timer duration.
- On the Slide Master/Layout for the quiz questions, have an object (e.g., rectangle) off-screen (i.e., off the edge of the screen) with a path animation that runs for 1 second. Let's call that object 'Ticker'. You put a couple of triggers on that Ticker object:
- When the animation of Ticker ends (i.e., at the end of its 1 second animation), you add 1 to the value of quizSeconds.
- When the animation of Ticker ends you also do a Move trigger on Ticker along its path animation so that it starts again.
- These two triggers collectively just make the Ticker object continually run along the motion path each second and on each iteration it increments how many times (seconds) has accumulated whilst the learner is in the quiz/re-take. Like the ticks of a clock or a heartbeat regularly ticking away.
- At the end of each tick, you compare quizSeconds (the number of seconds spent in the quiz) against allowableQuizDuration. If quizSeconds is more than allowableQuizDuration (i.e., the learner has spent more seconds doing the quiz/re-take than you allocated) then you jump to the result slide or submit the results. This effectively forces an end to the quiz/re-takeif too much time has been spent.
- You could present the respective numbers (quizSeconds and allowableQuizDuration) on the Layout as some kind of countdown so the learner can see the amount of time left.
- Note that this all happens on a Slide Master Layout so it only needs to be setup once and the functionality would be automatically applied to all quiz questions that use that layout.
The logic and mechanism presented may not be perfect but it might give you something to consider/play with.
Good luck!