Forum Discussion

CCServiceCCServ's avatar
CCServiceCCServ
Community Member
3 years ago

Quiz question with JavaScript evaluation

Some things just cannot be achieved with the provided quiz forms. I belive my newest problem is one of them.

I have several items, which must be sorted into the right spots. Trouble is, the items can have multiple correct spots. I could evaluate this on-dropping of the items using JavaScript. This itself is not a problem. But where would I place the result, which in turn is taken as "result" from this question and evaluated.

Placing a text in a "Text Entry" or placing a number in a "Numeric Entry" box would do the trick, but how can this be done? Or is there a variable for such things?

  • Best would be share a sample of what your trying to achieve...and to show your specific question. As is i only can guess what you want...

    So my guess is, you have created a sort exercise with multiple correct spots. Using javascript to evaluate it. That all works fine, but now you'r wondering how to get the endresult... correct or wrong ( or maybe points... ) into the results...and maybe a resultslide.

    There are built-in variables in Storyline you could write too. Depending on your setup that might be an option. Or create an invisible question...that you set to true or false with JS when evaluating your sort exercise and use the results of that in your endresult.

    Kind regards,
    Math

  • Grüezi Mitenand,

    I figured out how to do it. This variable "TextEntry" is available and not locked as I expected.
    Hence, you can evaluate manually as easy/complicated you want. In the end (or whenever) write the correct/wrong answer into "TextEntry" and then let the trainee proceed with the "Submit" button.

    I have attached a story with just that example in it. I first thought the trainee will have to copy the random word manually into the text box. But this is no longer the case. Hence, the random cartoon characters could be replace with a simple true/false return value. But the one or other reader might like the "copy-manully" idea and use that option.  :)

    Please keep in mind: JavaScript does not work in the preview. You have to Publish.

    Have fun, all of you!
    And thank you for sharing your thoughts.

    Mit freundlichen Grüssen

    Manfred

  • PS:  Do not hide that text box with a click on the "eye". Cover it with some blanket, if you don't want to show it to the trainee.