Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How can I Identify the number of questions in qcproject at the start of the project?

Participant ,
Sep 01, 2016 Sep 01, 2016

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

280
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Sep 01, 2016 Sep 01, 2016

Try extending the Quiz Scope to the first slide by placing a scored button on that slide that reports to the quiz.

Translate
Community Expert ,
Sep 01, 2016 Sep 01, 2016

Try extending the Quiz Scope to the first slide by placing a scored button on that slide that reports to the quiz.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 01, 2016 Sep 01, 2016

Brilliant! worked perfect.. thanks Rod!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 02, 2016 Sep 02, 2016

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 02, 2016 Sep 02, 2016

If you explained why you need to have the value of that system variable from the start?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 02, 2016 Sep 02, 2016

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 02, 2016 Sep 02, 2016

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:

Persisting Data with CpExtra | Infosemantics Pty Ltd

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 05, 2016 Sep 05, 2016
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources