Get Logstore Info from Moodle REST API

Get Logstore Info from Moodle REST API

by Eduardo Chaves -
Number of replies: 5

Hi,

I'm writing an application aimed to download and analyze report logs from a moodle course. The process should go something like:

1. User (teacher) inputs their credentials, which will be used to authenticate in Moodle REST API
2. Download Logs from their students (which components they interacted with, timestamps etc)
3. The application uses the data to generate reports and analysis.

In the Web Interface downloading this INFO is simple, however I did not find any way to get the data using Moodle REST API. Am I missing something? How could I get around this issue?

Thanks in advance

Average of ratings: -
In reply to Eduardo Chaves

Re: Get Logstore Info from Moodle REST API

by Dominique Palumbo -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Hi,

In fact, it seems that API doesn't exist in WS. You'll have to write it yourself.
https://docs.moodle.org/dev/Web_services
https://gist.github.com/timhunt/51987ad386faca61fe013904c242e9b4


Hope it's help.

Dominique.
Average of ratings: Useful (1)
In reply to Dominique Palumbo

Re: Get Logstore Info from Moodle REST API

by Eduardo Chaves -
Hi Dominique,

In my case, I don't have access nor permission to modify the target Moodle server, so I can't add or remove plugins. Guess I am out of luck then, right?
In reply to Eduardo Chaves

Re: Get Logstore Info from Moodle REST API

by Dominique Palumbo -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Hi Eduardo,

Could you've a direct access to the database ? Maybe you can ask for a user with read-only rights on that table ? It's the last best solution I think.
Maybe you can also try a curl and suck log pages... But it's tricky !
(https://moodle.org/mod/forum/discuss.php?d=153297) I don't know it it's still working for make a login...

Dominique.
In reply to Eduardo Chaves

Re: Get Logstore Info from Moodle REST API

by Hamd Zulfiqar -

Hi Eduardo,

I'm in a similar situation where I need to fetch Logs of all students from a Moodle instance that's hosted somewhere else. I was wondering if you have figured out a solution for this problem yet?

Thanks!

In reply to Hamd Zulfiqar

Re: Get Logstore Info from Moodle REST API

by Stoo Sepp -
I've been exploring this for about a year - the fact that Moodle doesn't have this built in makes it feel like 2003.  I've got an LTI app working with LTIJS, but for the life of me I can't figure out how to pull any log data or student access data from my classes. The only way it seems I can do this is to download a csv like it's 1987.

Anyone got any ideas on how to pull this data? It's literally in every other LMS out there, and it's making Moodle appear incredibly dated on the API side of things.