Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS xAPI dispatcher into Moodle events #114

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
6 participants
@nadavkav
Copy link
Contributor

commented Oct 12, 2016

Add support for dispatching H5P (hvp) JS xAPI events into Moodle, and convert them into core Moodle events.

This patch is the 1st part of a larger patch which include implementing support for special (this one) hvp_xapi events on a 3rd party contrib plugin logstore_xapi that sends Moodle core events as xAPI events into a remote LRS.

@falcon-git

This comment has been minimized.

Copy link
Member

commented Dec 1, 2016

A lot is being done about xAPI and reporting in the release that will go out tomorrow or next week. Reports based on xAPI is added to the Drupal Quiz module, but will be added to Moodle in a later release and this Pull Request will be taken into account when these reporting capabilities are added to Moodle.

@falcon-git

This comment has been minimized.

Copy link
Member

commented Dec 1, 2016

Unofrtunately it might take some time before we're able to add the reporting capabilities to Moodle. Core team is extremely busy in December and January and since this PR is part of a bigger picture we can't just review it and add it the normal way.

@nadavkav

This comment has been minimized.

Copy link
Contributor Author

commented Dec 1, 2016

Sad to read. as it seems to me very small but important core reporting feature that could benefit other users too. I am wondering, is it such a time consuming code review that you plan to review it after January?

@Aldises

This comment has been minimized.

Copy link

commented Mar 31, 2017

Hi there,

I've tried to used this branch and add events in the moodle logstore. But it seem's that I always have an issue : Uncaught Error: No define call for mod_hvp/xapi-stmt-dispatcher

I've run grunt and add the code but still not working any idea ? Or better in update for sending Moodle xapi event directly to a remote LRS Espacially for a Interactive Video ?

Thanks in advance

@icc

This comment has been minimized.

Copy link
Member

commented Apr 5, 2017

Details on how you can hook into the events for sending them directly to the LRS are available at https://h5p.org/documentation/x-api

@nadavkav

This comment has been minimized.

Copy link
Contributor Author

commented Apr 5, 2017

@Aldises , not sure were are you getting this error message from PHP or JS?
This patch send all the xAPI JS events that happen inside the H5P player into Moodle. and inside Moodle into the mdl_logstore_standard_log (Moodle events)
We have also patched a 3rd party contrib plugin logstore_xapi that sends Moodle core events as xAPI events into a remote LRS. (which is out of the scope of this patch, and is a stand alone)

@falcon-git

This comment has been minimized.

Copy link
Member

commented Apr 18, 2017

Is the reason for this pull request to send xAPI events to an LRS? If that is so, would it be better to skip the Moodle logs and send aggregated xAPI events directly to the LRS without storing them in Moodle?

@nadavkav

This comment has been minimized.

Copy link
Contributor Author

commented Apr 18, 2017

Originally, it was sending xAPI statements to an external LRS directly, but after some architecture discussions and consulting with the H2O team that developed https://github.com/xAPI-vle/moodle-logstore_xapi for Moodle (which send xAPI statement from core Moodle event to an external LRS) we thought it would be better to have the HVP module send all event first to Moodle and then let Moodle decide if it wishes to send them to and external LRS using the logstore_xapi plugin together with other core modules events.

So this patch is sending all xAPI events into Moodle's mdl_logstore_standard_log which store them as regular Moodle events and I have also patched https://github.com/xAPI-vle/moodle-logstore_xapi and added new hvp_xapi events that are sending all those events as xAPI statements (once again) into an external LRS.

I know it seems like a detour from the HVP perspective, but it is better to have Moodle manage and regulate sending the xAPI statements to an external LRS instead of individual plugins doing so. hope you agree.

@falcon-git

This comment has been minimized.

Copy link
Member

commented Apr 18, 2017

Ok, are you using this in production? You're not concerned about the amount of data that is being stored in Moodle? Or privacy issues? H5P will eventually generate statements for every action the user does within the H5P content.

@nadavkav

This comment has been minimized.

Copy link
Contributor Author

commented Apr 18, 2017

Yes. production.

I am (we are) aware of the amount of data stored in Moodle's log. (Not even considering HVP, you can imagine there are other core modules and 3rd party plugins that send their events into that log. it's a hugeeee log.)
It would actually be useful if you had some kind of a LEVEL property, to control how detailed or how frequent the xAPI statements are. At the moment, even when the user is clicking the different options in a multi choice question inside Interactive Video, we save it. (even before he/she clicks the final answer). It is a very interesting learning analytics data. but indeed, a lot of it 😢

btw, what do you mean by "Privacy issues"?

@falcon-git

This comment has been minimized.

Copy link
Member

commented Apr 18, 2017

Our thought regarding the amount of data is that it should be up to third party software to filter it before storing it somewhere. That is part of the reason why I'm reluctant to have H5P store it directly.

Regarding privacy, there are quite strict regulations in many countries, especially regarding children. If you store all the xAPI data H5P generates you'll know quite a lot about what the user is doing, probably more than the user thinks you'll know. Things she writes and then later deletes for instance will be stored without her knowing it. You'll also know exactly how much time she uses on everything she does, if she finds a particular part of a video interesting you'll know it etc. I think logging all this data might be in conflict with Norwegian regulations at least, but I'm no expert on this.

@nadavkav

This comment has been minimized.

Copy link
Contributor Author

commented Apr 19, 2017

If H5P is part of an hosting platform, it seems to me that the hosting platform should collect all the data and decide what to do with it, including forwarding it to an external LRS, if at all. all Moodle plugins report learning progress into Moodle, including grades, outcomes, completion, ...
Regulating the amount of it should be a system setting, or if relevant, a course setting.

I am very much familiar with privacy law. we are required to have a privacy officer on each institute. and we have a legal department in each institute that supervise everything we do in each IT department.
We are very strict with it and we have similar regulations as the Norwegian law has. as far as I am aware. all the is on premise and highly secured.
We store and manage user's data for many (many) core LMS activities and also for 3rd party plugins like the H5P.
For the last year or so, we are experimenting with forwarding some of the data to an external LRS, we anonymize it. when regarding Moodle, we use an adapted fork of: https://github.com/moodlehq/moodle-local_anonymise
Thank you for your concerns and information regarding this!

I would like to add that using SCORM outside of simple practice is not allowed with our systems as its learning data can be easily manipulated on the client side, using the browser's console with little knowledge of JS. (that can be found on the internet). we hope the xAPI events together with the grading data sent from the H5P client into the server will set a higher level of challenge to those who try to manipulated the data. For now, important online exams are held on campus. but we are also looking into technologies that will enable us to have remote secure online exams in the near future.

@falcon-git

This comment has been minimized.

Copy link
Member

commented Apr 19, 2017

I see. Thank you for sharing your thoughts on this. It feels like a quite big decision to me, and we'll be talking to more Moodle users to gather more views on this before starting to store xAPI events from H5P in Moodle directly. I'm going to a Moodle Moot in May and will try to get some feedback there as well before deciding. In the meantime, I suggest that you consider creating a third party plugin that listens to the xAPI events from H5P and stores them in Moodle with or without filtering them.

Unfortunately, it is probably just as easy to manipulate xAPI data from H5P as it is for SCORM data. We will create a server-side evaluation of answers soon that will make it possible to use H5P for exams and other formal tests. In this case the js won't know the correct answer, instead, the user's answer will be matched against the correct answer server side and the score will be added to the statement on the server.

@nadavkav

This comment has been minimized.

Copy link
Contributor Author

commented Apr 19, 2017

Thanks you for sharing your thoughts on this. you should definitely get more use cases from other Moodle out there and event put a question at the Moodle forums, as this is a very important issue.

I just came back from the London Moodle MOOT #mootieuk17 and there was much talk presentation about H5P. your formal presence would have been appreciated a lot! I am very happy to read that you are going to one of the other MOOTs.

btw, I consider coming to your upcoming conference, thought I am interested in a much more in depth code development, if at all possible. Is there any chance for that happening during the conference or on some parallel venue?

@falcon-git

This comment has been minimized.

Copy link
Member

commented Apr 20, 2017

Glad to hear that you're considering to join the conference! There will be at least two core team members available on the training session "Customizing and extending H5P, for advanced users." and all seven on the hackaton on Day 2 so in both of these sessions it will be possible to join other experienced developers and go in depth. If during this time a group of people wants to carry on on day 3 as well we'll be more than happy to facilitate this and make sure at least on core team member participates in an extra hackaton :)

@nadavkav

This comment has been minimized.

Copy link
Contributor Author

commented Apr 20, 2017

Super cool!

@davidpesce

This comment has been minimized.

Copy link

commented May 9, 2017

@nadavkav I believe this is exactly what I'm looking for! Are you still using this in production?

@nadavkav

This comment has been minimized.

Copy link
Contributor Author

commented May 9, 2017

Yes 😄
We also patched the logstore_xapi with 3 h5p_events.php files that is later on pushing this information to an external LRS. if you are interested... let me know. as it is not yet public on github.

@nadavkav

This comment has been minimized.

Copy link
Contributor Author

commented May 9, 2017

You can see it in action, if you register (free) to http://study.onl.co.il/ (use auto google translate) to view this Academic English MOOC, and them white viewing one of the Interactive H5P videos activities, open the browser's console and watch the events that are fired while you interact with H5P modules.

@davidpesce

This comment has been minimized.

Copy link

commented May 9, 2017

@nadavkav Yes, very interested in the 3 logstore events! I'm most interested in the question set h5p content type. How do I go about getting the 3 additional events from you?

@nadavkav

This comment has been minimized.

Copy link
Contributor Author

commented May 9, 2017

Next week, I will clean them up and push a branch here: https://github.com/nadavkav/moodle-logstore_xapi

@falcon-git falcon-git referenced this pull request May 11, 2017

Open

xAPI support #153

@davidpesce

This comment has been minimized.

Copy link

commented May 15, 2017

@nadavkav I met with the maintainers of logstore and they're on board with me helping get things updated and enhanced. I'm digging in deep this week to get things done. If you can submit a PR with your changes, that'd be awesome! I'll add it to my weeks todo list.

@nadavkav

This comment has been minimized.

Copy link
Contributor Author

commented May 15, 2017

Still not finding time to get this done. hope next Sunday (we work on Sunday ;-)

@davidpesce

This comment has been minimized.

Copy link

commented May 23, 2017

@nadavkav any chance you had some time this past Sunday?

@davidpesce

This comment has been minimized.

Copy link

commented Jun 5, 2017

@nadavkav did I lose you?

@nadavkav

This comment has been minimized.

Copy link
Contributor Author

commented Jun 5, 2017

No. just have too much on my plate :-(
A while ago, I have started a process of coordinating all the patches made by several academic campuses I work with, into a Trello board, so we can get the best code versions upstream into H5P.
I have very little weekly time available to this process, and that is why it seem to take such long time, especially, considering this issue.
I added you the the Trello board, so you can be more up to date with the process, as I do not want to spam this issue with unrelated discussions and mini updates 😉

@davidpesce

This comment has been minimized.

Copy link

commented Jun 5, 2017

@nadavkav thanks for the update (and invite to the board). Just a heads up that we are clearing out PRs in the 3 Moodle logstore sub-repositories (expander, translator, emitter) to move the code into one repository.

@nadavkav

This comment has been minimized.

Copy link
Contributor Author

commented Jun 5, 2017

Great move!

@garemoko

This comment has been minimized.

Copy link

commented Jan 23, 2019

@davidpesce @nadavkav did this ever go anywhere? Has there been any start on adding H5P support to the logstore plugin?

@davidpesce

This comment has been minimized.

Copy link

commented Jan 23, 2019

@garemoko I haven't heard anything since the last posting here. :(

@nadavkav

This comment has been minimized.

Copy link
Contributor Author

commented Jan 23, 2019

H5P is sending xAPI statements from the JS client and its various sub widgets to the Moodle server, those xAPI statements are saved inside a special db table, and not on the main Moodle mdl_logstore_standard_log where all the potential events that can be sent via the moodle-logstore_xapi
are saved.
Two years ago, I was involved in a project that tried pushing those H5P events to LL, so I made a generic all purpose H5P-xAPI event for that. but it was never integrated into upstream core H5P.
It was a bit hacky, and in retrospect, I am not sure it is a good way to go about it.

@garemoko

This comment has been minimized.

Copy link

commented Jan 24, 2019

@nadavkav thanks for the explanation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.