Copy link to clipboard
Copied
I need to read the total questions in a project and use that value to control a custom nav bar, however the value for "cpQuizInfoTotalQuestionsPerProject" is only set once the first quiz slide is entered. I need to know it at the start of a project. How can this be done?
Thanks
Gary
Try extending the Quiz Scope to the first slide by placing a scored button on that slide that reports to the quiz.
Copy link to clipboard
Copied
Try extending the Quiz Scope to the first slide by placing a scored button on that slide that reports to the quiz.
Copy link to clipboard
Copied
Brilliant! worked perfect.. thanks Rod!
Copy link to clipboard
Copied
Hi Rod, the problem i have run into with your initial solution is that when the user resumes on one of the standard slides the "cpQuizInfoTotalQuestionsPerProject" value is not set as I only put the scored button on slide 1. If I put a scored button on each slides it defeats the purpose of creating an expression to output the number of standard slides less the quiz slides, so we're back to square one of hardcoding the number of both instead of dynamically generating them. Any suggestions?
Thanks
Gary
Copy link to clipboard
Copied
If you explained why you need to have the value of that system variable from the start?
Copy link to clipboard
Copied
True I see now i should have explained in a bit more detail at the start.. my mistake! i thought maybe there was something simple i was missing with the variable cpQuizInfoTotalQuestionsPerProject.
Copy link to clipboard
Copied
It seems you are talking about the leaner exiting the course at some point before completing it and then when they re-launch the content next time the bookmarking kicks in and they are jumped straight to the slide they left on. Is that correct?
IF so then my solution was simply extending the quiz scope to the first slide. But when you resume the lesson with bookmarking it doesn't visit the first slide. So you either need to turn off the bookmarking so that the learner ALWAYS begins at the first slide, or else you need to use a method of persisting the value of a User Variable between user sessions.
If your published output is HTML5, you can persist variables with JavaScript or you can use the CpExtra widget from Infosemantics:
Copy link to clipboard
Copied
Thanks again Rod. I don't think i can use that solution as the user may not always resume the course on the same computer. I may just have to hardcode the number of questions into a variable in each course. Not a big deal really I just wanted to automate as much as possible. Really appreciate your help on this!
Gary