The Cocktail Party Effect

I recently saw some twitter posts pointing to tutorials about how to write javascript that will pull the username from an LMS and allow you to insert that name (or variable holding that name) into your project/course content. This is a very common practice in eLearning as is displaying many other inputs collected by the LMS. 

I would agree that this is an excellent strategy for engaging your learner when used appropriately.  The same tweeter pointed to references of social psychologists highlighting the use of one's name as a trigger for increased attention or focus. They call it "The Cocktail Party Effect". Certainly there is more to good design, and gaining learner attention (as Gagne suggests), than simply using someone's name. But when we are struggling to keep what little attention we have from our learners it's helpful to use every advantage and cognitive trick we can... even the little things. 

You'll be happy to know that as a dominKnow|ONE user there is no need to write javascript, or any code, to do the same thing using system variables. More on that below.

How to insert a User Name from LMS into Text within a Project/Course

If you've gone through the comprehensive training guides then you are familiar with variables and the existence of system variables.

User name is 1 of 5 system variables within the Learner category. dominKnow|ONE doesn't use the term user name. 

Instead dominKnow|ONE uses Student Name. And when it is inserted into your text field it is shown as {x}.

However, if you click the View tab and select Show Variables then {x} will display as {{sys.learner.name}}

 

Start by double clicking inside the text element and make sure the cursor is where you want the variable to be placed.

  1. select the "..." (the 3 dot menu item) on the far right of the tool tip bar now displayed just above your text element.
  2. select the bottom item in the popup called Variables.
  3. select Learner to display the system variable options associated with the learner.
  1     0

Similar Projects

Questions  ( 0 )

Comments ( 2 )


  • 2
    Posted 3 months ago PamT 4   |   0  
    Chris,
    In many LMSs, the learner name comes out as last name, first name, and middle initial. So Student Name and the associated {{sys.learner.name}} variable works...kind of. For a project I did this week, I went a few steps further.

    The use case was that I wanted to display the learner's name in a simulated document assigning them to a task. The document was just a table with text, but we wanted the name to be a normal version of the name - just first and last name. Later I simulated an email document and used the variables again to personalize the email for each learner.

    How I did it after much teeth gnashing and trial and error:

    First, on project entry based on page timing of 0:00 I set three variables.
    1) LearnerName (string) with a value of {{sys.learner.name}}
    2) firstName (string) = null value (no value input)
    3) lastName (string) = null value (no value input)

    I then created an action (player controls > Execute Javascript) to execute 1 second later to get the LearnerName variable and parse it into first name and last name, and put those parsed values back into dominKnow as firstName and lastName.

    Javascript code:

    //Script follows:
    //get the existing variable populated from dominKnow
    var name = contentApi.getData("LearnerName");

    //Now split the name into first and last names
    var nameArray = name.split(", ");
    var firstName = nameArray[1];
    var lastName = nameArray[0];

    //Lets get rid of everything after the first name like the middle initial and their Jim Bob second name
    var newFirstName = firstName.split(" ", 1);

    //Finally put the variables back into the dominKnow so we can use them
    contentApi.setData("firstName", newFirstName);
    contentApi.setData("lastName", lastName);
    //End script

    Hope this helps someone else!

      

  • 0
    Posted 21 days ago Paul Schneider 192   |   4  
    If you want to use this information over and over again in multiple courses, one great way to do so is to create a reuseable HTML widget. These widgets, once created can be used by other team members.

    You can create your own, by copying this HTML/Javascript code into your own HTML file, zipping it up and uploading it as an HTML widget.