How to reference a variable name in text throughout the course?

aschultze6968
aschultze6968 Community Member Posts: 5
Hi,

I am trying to make my courses more custom and I want to be able to be able to reference the participant's name throughout the course is text components. ie - "Good job answering that question John", etc.

I have set up a variable in the beginning of the course to collect the name. I then try to reference the variable within a text box but when tested it doesn't work.

Can someone lay out the order of operations I need to make this work. Please and thanks!

Comments

  • jasonadal
    jasonadal Community Member Posts: 441 ♪ Opening Act ♪
    The first question is: How is the variable with the name set? Is it a text entry box or is it trying to pull it from the LMS using AICC_Student_Name? If you're grabbing it using this method, testing won't work unless it's published to an LMS.

    Depending on how and when it's established, you may have to "trigger" it before it can be used elsewhere.

    One trick might be to have a Change Contents in the place where the variable is first set using a button to submit the name. The button would then modify the variable, then use Change Contents - Text Block - "Thanks, VAR(your_var)."

    Once it's set and referenced the first time, it should carry through the rest of the course. I had this happen with a variable I used that calculated a specific date referenced through out the course and had to use the Change Content to "trigger" it before it carried through the course.

    If I have some time on Monday, I can try and whip something up. Otherwise, if you post a sample, at least one of us can take a look!
  • aschultze6968
    aschultze6968 Community Member Posts: 5
    Jason,

    The change content solution worked! You are a Lectora Wizard!!

    Thanks for your insight!

    -Alex