adaptlearning / adapt-contrib-xapi

TinCan/xAPI extension for the Adapt Framework
GNU General Public License v3.0
12 stars 28 forks source link

Is there a way to show the learnerInfo within course body text? #72

Closed RobertPeek closed 4 years ago

RobertPeek commented 4 years ago

Spoor extended the course _globals so that {{_globals._learnerInfo.firstname}} could be used within body text.

moloko commented 4 years ago

relevant bit of code in spoor is here: https://github.com/adaptlearning/adapt-contrib-spoor/blob/b2af716f4de77a46ff19be4aa595058b3080b3bb/js/adapt-stateful-session.js#L43-L53

RobertPeek commented 4 years ago

Has this functionality not been included in the xAPI plugin then? Or does it work/store the data differently?

moloko commented 4 years ago

@RobertPeek from what I can see it's got a function there to retrieve the data from the LRS - so you can access the learner's details using JavaScript - but an extra step is required to allow you to be able to do the same from the course JSON

brian-learningpool commented 4 years ago

This is handled as part of the PR https://github.com/adaptlearning/adapt-contrib-xapi/pull/76.

brian-learningpool commented 4 years ago

@RobertPeek this is now in v0.8.