Explore the community Forums Lectora Lectora Questions & Answers Web window communicate with Lectora course?

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #427774 Score: 0
    Profile photo of CarlFink
    CarlFink
    Member
    beginner
    intermediate
    contributor
    LUC16 Attendee
    wise owl
    curious george
    advanced
    20 pts
    @CarlFink

    Hi,

    Something I have never done, but it has come up for a new project I’m working on. I’m developing a training game using a game development tool (Godot). Godot can export to an HTML target, which I could then import into a web window. Is there any straightforward way for the web window to communicate with the course? At a minimum, to send a Boolean indicating that the student passed or failed, so the course can tell the LMS?

    Thanks.

    #427794 Score: 0
    Profile photo of Darrel Somoza
    Darrel Somoza
    Member
    contributor
    friend finder
    beginner
    intermediate
    junior moderator
    advanced
    wise owl
    curious george
    profile
    197 pts
    @Klaatu

    Yes, you can use JavaScript to communicate back and forth.

    #427804 Score: 0
    Profile photo of CarlFink
    CarlFink
    Member
    beginner
    intermediate
    contributor
    LUC16 Attendee
    wise owl
    curious george
    advanced
    20 pts
    @CarlFink

    @klaatu, like I say, I have not done this. Do you mean that JS in my game could set a variable which would be visible to the Lectora course’s JS, which in turn could set a Lectora variable that I could then test to determine pass/fail? Or would JS in the web window be able to directly set the JS equivalent of a Lectora variable?

    Thanks.

    #427993 Score: 0
    Profile photo of Darrel Somoza
    Darrel Somoza
    Member
    contributor
    friend finder
    beginner
    intermediate
    junior moderator
    advanced
    wise owl
    curious george
    profile
    197 pts
    @Klaatu

    Yes, you can use JavaScript to assign the Lectora reserved variable AICC_Score in a dummy hidden Lectora test..  VarAICC_Score.set(godotScore) if your variable in the Godot content that holds the final score is called godotScore.

    This is an over simplification, you still need to set up a dummy test in Lectora and if memory serves me correct, you might have other default Lectora test settings that need to be adjusted (perhaps include test score in overall score needs to be unchecked because there is no (Lectora) test score?)

    If you have a sample, including the Godot content authoring files, time permitting I will try to work on it. No promises though as I am busier than a long tailed cat in a room full of rocking chairs.

    #428034 Score: 0
    Profile photo of CarlFink
    CarlFink
    Member
    beginner
    intermediate
    contributor
    LUC16 Attendee
    wise owl
    curious george
    advanced
    20 pts
    @CarlFink

    Thanks, Darrel. I’m not ready to actually implement the Lectora–the game isn’t even fully designed yet!

    I also still have to figure out how to set JS variables from within the game. The Godot environment natively supports its own scripting language and C# only.

    I do appreciate the help, and offer of further help, though.

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

You must be logged in to reply to this topic.