Explore the community Forums Lectora Lectora Questions & Answers Javascript to check if student answers a question correctly

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #438759 Score: 0
    Profile photo of cpliu
    curious george
    wise owl
    Group Member
    2 pts

    I’m trying to use Javascript to do the same thing as Lectora’s action that checks if a question variable is correct. I know you can pass the value/string of a question variable to Javascript and then compare the string to see if it’s correct, but that would require manual editing for each new cours.

    The reason I would like to do answer judging is that I have custom quiz that the quiz question would go to different questions based on whether a person answers a question correctly. The answer judging would be used for custom scoring. I can do these in actions but the actions lose links to question variables when we copy and paste questions from a different file (generated with script).

    It would save a lot of relinking if I can tap in Lectora’s internal function to check if the user answer is correct with Javascript.



    #438785 Score: 0
    Profile photo of Joe Wieloch
    Joe Wieloch
    friend finder
    LUC16 Attendee
    verified member
    wise owl
    LUC17 Attendee
    picture perfect
    74 pts

    What exactly loses variable references? If it is part of an action target or condition then please open a support ticket.

    You might try saving as a library object, then you can import the library object into other courses. Either way please let support know you are having an issue with losing references.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.