Register

Branching based on score

For version specific questions
User
User avatar
Posts: 63
Joined: Tue Sep 05, 2006 8:50 pm

Branching based on score

Postby musictec » Thu Jun 19, 2014 12:41 am

Hi,

I'm still experimenting on VB8's Randomize question feature when a question came to mind:
If a student does a 10 question MCQ how do I branch the OUTCOME of the student's quiz score on condition if the students passes or fails the quiz?

In other words, with 10 questions on 10 slides, IF students passes, VB will then go to slide 11 (Play Preview option), but if student fails, then this would go to slide 12 (as an example)

Can VB do this? How?
Thanks!

Khew

User
User avatar
Posts: 50
Joined: Mon May 29, 2006 12:47 am
Location: Dolny Kubin, Slovakia

Re: Branching based on score

Postby Michal » Fri Jun 20, 2014 7:26 am

Hi Khew,

it's possible to do this, with custom branching using JavaScript. We have similar posts in the forum, which best are these two:
- complete description on how to do custom branching in VB7, works the same way in VB8:
viewtopic.php?f=62&t=1406&p=4645&hilit=custom#p4645
- custom branching with examples:
viewtopic.php?f=37&t=596&p=1906&hilit=custom+javascript#p1906

For random question slides, you need to add the JavaScript call for all questions in the Question Bank. Then you need to check if the JavaScript is executed from the last question slide, in your case the 10th. And then based on the passed/failed you need to display slide 11 or 12.

I'll prepare an example for you and attach it to next post.

Michal
Michal

User
User avatar
Posts: 63
Joined: Tue Sep 05, 2006 8:50 pm

Re: Branching based on score

Postby musictec » Fri Jun 20, 2014 8:25 pm

Michal wrote:Hi Khew,

I'll prepare an example for you and attach it to next post.

Michal


Michal,

That would be super, as I'm a noobie in Javascript!! :mrgreen: \
Thanks!

Khew

User
User avatar
Posts: 63
Joined: Tue Sep 05, 2006 8:50 pm

Re: Branching based on score

Postby musictec » Fri Jun 20, 2014 8:28 pm

Another question came to mind as regards to this thread:
Would all this still work (with the use of JS), on VB even when compiling the final output to HTML5 format then?
Thanks!

Khew

User
User avatar
Posts: 50
Joined: Mon May 29, 2006 12:47 am
Location: Dolny Kubin, Slovakia

Re: Branching based on score

Postby Michal » Mon Jun 23, 2014 3:15 am

Hi Khew,

attached is the example. The archive has two files:
  • random_question_example.qframe - the HTML frame with custom javascript method, which is called from the Viewlet. You need to copy it to your Viewlet Library/HTMLFrames folder, located in "c:\Users\Username\Documents\ViewletBuilder8 Enterprise\Library\HTMLFrames" folder. Replace the "Enterprise" with "Professional" if you are using VB Pro version. The HTML Frame code is well commented, important is the "passed" function.
  • random_question_branching.qvp - the Viewlet Project

In the project, each slide in the question bank has updated the onCorrect and the onIncorrect events:
  • onCorrect - the "play" action is removed. Added is the JavaScript action with "passed();" call.
    onCorrect.png

    passed_code.png
  • onIncorrect - the "play" actions is removed from the "last attempt" and added is the JavaScript action with "passed();" call.
    onIncorrect.png

Project download link:
random_question_branching.zip
(450.36 KiB) Downloaded 246 times


The "passed" function is hard-coded for this example project, you'll need to update it with your values.

Best regards,
Michal
Michal

User
User avatar
Posts: 50
Joined: Mon May 29, 2006 12:47 am
Location: Dolny Kubin, Slovakia

Re: Branching based on score

Postby Michal » Mon Jun 23, 2014 3:17 am

Would all this still work (with the use of JS), on VB even when compiling the final output to HTML5 format then?


Yes, we'll add support for this in HTML5 format, but probably not in the first release.

Best regards,
Michal
Michal

User
User avatar
Posts: 50
Joined: Mon May 29, 2006 12:47 am
Location: Dolny Kubin, Slovakia

Re: Branching based on score

Postby Michal » Mon Jun 23, 2014 4:16 am

Hi Khew,

just one but very important note, custom branching for question bank slides will work only in VB 8.0.1, which should be released in few days.
Michal

User
User avatar
Posts: 50
Joined: Mon May 29, 2006 12:47 am
Location: Dolny Kubin, Slovakia

Re: Branching based on score

Postby Michal » Tue Jul 01, 2014 1:24 am

Hi Khew,

new ViewletBuilder 8.0.1 is out, you can download it from this URL: http://www.qarbon.com/ftp/download/

Best regards,
Michal

Return to ViewletBuilder8

Who is online

Users browsing this forum: No registered users and 1 guest