Success in adding values to statement.context.extensions array, how do I add a value to statement array or statement.actor array?

24 views
Skip to first unread message

keith...@gmail.com

unread,
Feb 3, 2016, 10:48:43 AM2/3/16
to Learning Locker
Using moodle plugins for learning locker. I have been able to add a site specific value (user tenancy) to statement.context.extensions array by appending into $opts array in public function read(array $opts) of moodle-xapi-translator/src/Events/Event.php.

But a similar approach to add a single value to the statement.context.actor array is failing. I suspect it has something to do with TinCan namespace, but I am not versed enough to know where to edit.

current document array for statement.actor:

[actor] => Array (
[objectType] => Agent
[name] => $name
[account] => Array (
[name] => $userid
[homePage] => $wwwroot
)
)

desired document array for statement.actor:

[actor] => Array (
[objectType] => Agent
[name] => $name
[account] => Array (
[name] => $userid
[homePage] => $wwwroot
[tenant] => $tenantid
)
)

Thoughts?

Brian Miller

unread,
Feb 3, 2016, 10:56:01 AM2/3/16
to keith...@gmail.com, Learning Locker
In general the xAPI objects can't accept arbitrary properties, outside of 'extensions' properties, so 'tenant' doesn't make sense in the 'account' of an 'actor'.

Tenancy would be an odd thing to capture in a statement as it won't make sense to any other LRS. Having said that, you could include the tenant identifier as part of the 'homePage'.

HTH,

Brian


--
You received this message because you are subscribed to the Google Groups "Learning Locker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to learning-lock...@googlegroups.com.
To post to this group, send an email to learnin...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Brian J. Miller
Rustici Software
Reply all
Reply to author
Forward
0 new messages