Supporting each other

Community forums

Welcome, Guest
Username: Password: Remember me
Report any technical problems you discover and discuss solutions.
  • Page:
  • 1

TOPIC:

Glossary not displaying on words within flashcard 4 years 2 weeks ago #6989

  • filipa.santos
  • filipa.santos's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 10
  • Thank you received: 0
Hello there,

The glossary isn't displaying a hover over box (or indeed highlighting the words either) for any words added that are contained within a flash card. Is this a bug or just a limitation of the feature? Any ideas on a fix?

Thanks!
Filipa

Please Inloggen or Create an account to join the conversation.

Glossary not displaying on words within flashcard 4 years 2 weeks ago #6990

  • JohnSmith
  • JohnSmith's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 397
  • Thank you received: 71
Hi Filipa,

Looks like you found a bug! Thanks for making us aware - I will get this fixed for the next release...

In the meantime, try adding a Script optional property to the main Learning Object in the editor and then put this code in the box:
function x_findText(pageXML, exclude, list) {
    var attrToCheck = ["text", "instruction", "instructions", "answer", "description", "prompt", "question", "option", "hint", "feedback", "summary", "intro", "txt", "goals", "audience", "prereq", "howto", "passage", "displayTxt", "side1", "side2"],
        i, j, len;
	if (pageXML.nodeName == "mcqStepOption") { attrToCheck.push("name"); } // don't include name normally as it's generally only used in titles

    for (i=0, len = pageXML.attributes.length; i<len; i++) {
        if ($.inArray(pageXML.attributes[i].name, attrToCheck) > -1) {
            x_insertText(pageXML.attributes[i], exclude, list);
        }
    }

    for (i=0, len=pageXML.childNodes.length; i<len; i++) {
        if (pageXML.childNodes[i].nodeValue == null) {
            x_findText(pageXML.childNodes[i], exclude, list); // it's a child node of node - check through this too
        } else {
            if (pageXML.childNodes[i].nodeValue.replace(/^\s+|\s+$/g, "") != "") { // not blank
                x_insertText(pageXML.childNodes[i], exclude, list);
            }
        }
    }
}

If you are using the latest version or a relatively recent version then that should fix your issues. Use this patch in any LOs where you need glossary terms within Flashcards.

Regards,

John
The following user(s) said Thank You: filipa.santos

Please Inloggen or Create an account to join the conversation.

Glossary not displaying on words within flashcard 4 years 1 week ago #7024

  • filipa.santos
  • filipa.santos's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 10
  • Thank you received: 0
Thanks so much John, the code has worked for me! :)

Please Inloggen or Create an account to join the conversation.

  • Page:
  • 1
Moderators: ronmjultenJohnSmith
Time to create page: 0.045 seconds
Copyright © 2024 The Xerte Project.
Xerte logo Apereo logo OSI Logo

Search