LTI from Sakai to Moodle , transferring Grades

LTI from Sakai to Moodle , transferring Grades

by philipp lesmana -
Number of replies: 21

Hi, 

I am using Sakai 10 as an LTI consumer , and Moodle 3 as LTI provider. 

The issue I am having is that the grades are not being transferred over. Have anyone successfully done this, and can help?


Thanks, 

Phil

Average of ratings: -
In reply to philipp lesmana

Re: LTI from Sakai to Moodle , transferring Grades

by Mark Nelson -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Philipp,

The grades are synced via a task in Moodle that is run during the cron. Are you running the cron on your site?

Regards,

Mark

In reply to Mark Nelson

Re: LTI from Sakai to Moodle , transferring Grades

by philipp lesmana -

Hi Mark!


Sorry, I didn't see this response. Must not have set my notification preferences correctly. 

No, i did not set the moodle cron jobs yet. Thanks for the tip. I have now set it up according to this : 


https://docs.moodle.org/24/en/Cron_with_web_hosting_services


using CPanel , using the command wget -q -O /dev/null http://www.mydomain.com/moodle/admin/cron.php

Do you know if this suffice? Its been more than an hour, and no marks have come through, so I am not sure if I did it correctly.


Phil


In reply to philipp lesmana

Re: LTI from Sakai to Moodle , transferring Grades

by Mark Nelson -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
I would visit http://www.mydomain.com/moodle/admin/cron.php directly and see what it tells you. It may only allow the cron to be run via cli. You can either change this setting so that isn't required or run it via CLI. See https://docs.moodle.org/31/en/Cron#Setting_up_cron_on_your_system for more information.
In reply to Mark Nelson

Re: LTI from Sakai to Moodle , transferring Grades

by philipp lesmana -

Hi, 


Thank you for the help! I've successfully managed to get a couple courses to return marks to Sakai, after the cron job ran. 




However, i have not been able to get any other courses to return marks. I've duplicated settings as much as I know, but i must be missing something. Any ideas on whether there is a setting i could have missed? 


Thanks, 


Philipp


In reply to philipp lesmana

Re: LTI from Sakai to Moodle , transferring Grades

by philipp lesmana -

Hi, 


I have been able to get Cron jobs working using WGET command from Cpanel. Immediately after, 2 of the 3 test courses transmitted grades to SAKAI. 


However, I have been unable to duplicate this process for any of the other courses, new or old. I can keep adding quizzes to these 2 working courses, and the marks will all be transferred, however, not for new courses. 


Any ideas? I am backtracking any possible setting i've done but i can't think of any that would make those two work. It seemed to me that i have simply activated LTI, then created a new connection allowing marks to be transmitted. That is all. On the SAKAI side, i am not even making new connections. I am simply saving the new URL and secret, and specifying a different gradebook location. And it stops working. 

Any ideas on what would hidden settings i may have toggled to make LTI grade transfer work for one item but not for the other?

In reply to philipp lesmana

Re: LTI from Sakai to Moodle , transferring Grades

by Mark Nelson -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Each LTI enrolment instance can specify whether or not it wishes to sync grades with the consumer. Have you confirmed this setting is enabled in the new courses? To confirm visit the course then go to 'Course administration' > 'Users' > 'Enrolment methods' and edit the LTI enrolment instance to view the setting.

In reply to Mark Nelson

Re: LTI from Sakai to Moodle , transferring Grades

by philipp lesmana -

HI Mark, 


Thank you for being so patient with me. 

I have ensured that the "LTI provider" setting under "Course Administration" is toggled to "Send Grades Back" for each courses. Did you perhaps mean this setting? 


For my installation, there is no "LTI Enrolment" instance under 'Course administration' > 'Users' > 'Enrolment methods'.

The two courses that works, have both their 'Manual enrolments' turned on, and one of them also have a 'Self Enrolment' instance turned on. 


In reply to philipp lesmana

Re: LTI from Sakai to Moodle , transferring Grades

by Mark Nelson -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Philipp,

There seems to be some confusion here - sorry. In Moodle 3.1 we released our own LTI provider in the form of an enrolment plugin (enrol/lti). This is the plugin I thought you were talking about - but it seems instead you are referring to https://moodle.org/plugins/pluginversions.php?plugin=local_ltiprovider. I have not used this plugin thoroughly so it's hard for me to debug your issue. The cron should normally tell you what courses it processed and which ones it missed and why. Is there any information there?

In reply to Mark Nelson

Re: LTI from Sakai to Moodle , transferring Grades

by philipp lesmana -

Hi Mark, 


Thats okay, this has been quite the process! Haha. I have tried more than multiple things while keeping our thread alive. Please bear with me: 


In regards to Cron

- I made a mistake and used /usr/local/bin/php -q /real/path/to/script/admin/cli/cron.php on my shared hosting to activate cron every 30 minutes. Up until yesterday I have been using my browser pointed towards the admin/cron.php to refresh cron whenever i needed to see if its working, rather than wait that 30 minutes. Thats why I didn't realize that the shared hosting cron was not working until yesterday. up to this point i have never received any emails from cron jobs. 

I have now fixed it by using WGET, pointing towards admin/cron.php. This seems to be working, because i finally started getting emails from cron jobs. 

On your suggestion, i looked at the actual email sent to me, and turns out it has been sending me error messages. 

This is what the email sent me : mount: /var/fake/azlsbroc/var/lib/mysql not mounted already, or bad option

Please note that running the cron manually from browser never gave this error. From browser, i get the report (attached) . I don't see anything that I need to be aware of?


In regards to Moodle 3.1 : 

Realizing that my LTI issue may be related to a bug that could have been subsequently fixed, i tried installing Moodle 3.1 on my sharing server on bluehost.com 2 days ago. 

The installation went like a breeze, however, the LTI link did not work. The link gave an error 500.  I opened a different thread elsewhere for this issue : 

https://moodle.org/mod/forum/discuss.php?d=334824 However it does not seem like anyone has any idea on what is wrong. I have also called bluehost, which was of no help. 

Considering that the issue may be server related, i then installed Moodle 3.1 on my XAMPP installation (localhost). Turns out, the LTI link worked just fine. Realizing that the issue is indeed server related, i then tried to install Moodle 3.1 on Godaddy. 

Halfway through installation, CSS stops loading. The installation page effectively becomes a text only page. I started another thread on installation issue here : https://moodle.org/mod/forum/discuss.php?d=334924 . It looks like no one has dealt with this either. Calling Godaddy was of no use. 


I now have 3 subdomain on Bluehost trying to get LTI to work, I have tried reinstalling Moodle 3.1 thrice on godaddy thinking maybe i had chosen the wrong PHP version (it is 5.4), and I have a local installation of moodle as well on my machine. 


I am really quite at a loss, and losing track of what i have tried doing to make things work. The current tally means I have more than few issues now : 

- LTI is patchy (not always working) when using Moodle 3.0

- Cron job sends me email with execution error

- Moodle 3.1 wouldnt install correctly, will only load text and textboxes. 


I think I need to figure out how to install Moodle 3.1 correctly first, because the LTI issue i have may be corrected then. Do you have a suggestion on what to do either in regards to the issue with Bluehost installation or with Godaddy installation? 


Thanks for patience. 

Phil

In reply to philipp lesmana

Re: LTI from Sakai to Moodle , transferring Grades

by Mark Nelson -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Philip,

Sorry you are having to try so many different approaches in an attempt to get this working. Unfortunately without having access to your site and possibly your server it will be difficult for me to figure out what is going on. According to your cron the local_ltiprovider was called but did not sync any grades -

Processing cron function for local_ltiprovider...
... started 15:31:41. Current memory use 9.4MB.
Running cron for ltiprovider
Deleting LTI tools assigned to deleted courses
Sync user profile images
0 profile images updated
done. (10 dbqueries, 0.01 seconds)

"The installation went like a breeze, however, the LTI link did not work. The link gave an error 500" - this sounds like a permissions issues on the server.

May I suggest approaching a Moodle partner (see https://moodle.com/partners/). That way you will be receiving quality support by people who understand Moodle and its features as well as contributing back to Moodle development.

In reply to Mark Nelson

Re: LTI from Sakai to Moodle , transferring Grades

by philipp lesmana -

Hi Mark, 


Thanks for responding. I would not have known from the cron log paragraph you showed that no grades were synced! Since i don't actually know what the report would have looked like if grades were synced. I think that basically sums up the difficulties i've had with moodle. Not knowing how it should look like if it works right, i don't even know how to fix it. Haha. 

I feel  helpless as obviously i have no access to the actual godaddy or bluehost shared server either. I just have to take it by their words that everything seems to be running fine on their end, and there is no error messages in their logs. I am tasked with exploring moodle as a simple, right out of the box solution to untie ourselves from 3rd party partners of our current platform, so my initial difficulties makes it less likely that i would get permission to dig ourselves in deeper. 


I am going to try and dig a little deeper on all these issues. You've helped me tremendously in just pointing towards the right directions. 

Cheers, 


Phil

In reply to philipp lesmana

Re: LTI from Sakai to Moodle , transferring Grades

by Mark Nelson -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Phil,

You could always use MoodleCloud.com to create a free Moodle 3.1 site to test out. Once you have created a site be sure to read up on https://docs.moodle.org/31/en/Publish_as_LTI_tool on how to set up as an LTI provider.

Hope that helps!

Mark

In reply to Mark Nelson

Re: LTI from Sakai to Moodle , transferring Grades

by philipp lesmana -

Hi Mark, 


I am sorry for continuing the thread, but a new error message that i have never seen before just popped up.

Following your suggestion, i now have an installation of the latest moodle version 3.1 on moodle cloud. Thank you. 

On trying to connect to it through Sakai after setting the LTI up, I receive this error 


Unknown exception related to local files (Can not fetch file form URL)


Are you possibly aware of this error? To verify my setup, i have successfully connected it via LTI from one of the other MOODLE installation i had. 


LTI url : https://azlsbrock.moodlecloud.com/enrol/lti/tool.php?id=1 

secret : k9hGiXy84yhTNdhXHUAP5bGqK8c1xFKn



In reply to philipp lesmana

Re: LTI from Sakai to Moodle , transferring Grades

by philipp lesmana -

PS: 

SAKAI also have some sort of Sakai Cloud that could be used for testing of its latest version. I am going to try and request my SAKAI expert to create one and have both of these approved cloud versions to connect to each other. 


In reply to philipp lesmana

Re: LTI from Sakai to Moodle , transferring Grades

by Mark Nelson -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hmm, could be something to do with the moodlecloud configuration. Thanks for bringing this to my attention. Will follow it up.

In reply to philipp lesmana

Re: LTI from Sakai to Moodle , transferring Grades

by Mark Nelson -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Philip,

I was able to create a moodlecloud site and have it act as an LTI provider with no issues.

Looking at the error message I suspect the error is due to the call to \enrol_lti\helper::update_user_profile_image($user->id, $image) in enrol/lti/tool.php. What this function does it update the user's profile image on the LTI provider site when the consumer has passed a profile image URL. So, what I believe is happening is that your consumer is passing either 'user_image' or 'custom_user_image' (which specifies the URL of the image) but that URL is not accessible by moodlecloud so it is failing to update the profile image and throws an exception.

In reply to Mark Nelson

Re: LTI from Sakai to Moodle , transferring Grades

by philipp lesmana -

Hi Mark, 


I am not aware of an option on Sakai's end to allow or pass profile image through LTI..

Did you happen to try create a Sakai cloud site as well to see how the LTI works between the two platform? The reason why i am adamant about trying to get LTI to work between Sakai and Moodle is because Sakai is maintained by a different department in our organization and it is integrated to the AD - while Moodle would be something new and won't be integrated.


Link to Sakai cloud site : 

https://sakaiproject.org/try-sakai


I have created a Sakai cloud site on each of the cloud solution , Longsight and Edia. 

I have attached screenshots of the setting pages for each of the installation and the result. 

1. Longsight SAKAI Cloud solution : LTI did not load (empty screen)

2. Edia SAKAI Cloud solution : LTI loaded, but for some reason Edia Sakai is the only one that does not even have an option to create gradebook connectio, so the Edia Sakai option is not very useful. 

3. Internal Sakai solution : LTI connection gave the error I wrote above, and clicking continue brings me to a login page for Moodle (instead of automatically logging in user). 

Can you spot anything in my setting that seems off? Keeping in mind that Longsight and Moodlecloud are both cloud solution that should...theoretically work together (Sakai and Moodle approved installations?)

I am happy to give you my moodlecloud/Edia/longsight passwords and username if that would help you see what my settings are. 



PS: If you download the screenshots it gives the descriptive names of what it is actually showing. 


Attachment Internal Sakai LTI setting and result.png
Attachment Longsight Sakai LTI.png
Attachment MoodleCloud LTI Setting.png
In reply to philipp lesmana

Re: LTI from Sakai to Moodle , transferring Grades

by Mark Nelson -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Philip,

I was able to reproduce the error message from a test consumer connecting to my LTI provider site. I have created https://tracker.moodle.org/browse/MDL-53222 and will work on a fix. It is because of the image URL that is sent to the provider not being valid. I am not familiar with Sakai but in order to access the provider you will need to discover how to fix the image URL, or you can wait for the issue to be fixed.

Regards,

Mark

In reply to Mark Nelson

Re: LTI from Sakai to Moodle , transferring Grades

by Mark Nelson -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Whoops - linked to the wrong issue. I meant https://tracker.moodle.org/browse/MDL-55027.

In reply to Mark Nelson

Re: LTI from Sakai to Moodle , transferring Grades

by philipp lesmana -

Thanks Mark. I hope that when its integrated it will solve the problems i have in regards to LTI with Sakai as well. 


Cheers, 

Phil

In reply to philipp lesmana

Re: LTI from Sakai to Moodle , transferring Grades

by Mark Nelson -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Philipp,

https://tracker.moodle.org/browse/MDL-55027 passed testing and should be pushed to Moodle core shortly (once the status is set to 'Closed' it will be available for download from https://download.moodle.org/releases/latest/ (Built weekly version)). However, Moodlecloud only updates every point release. So, it wouldn't take effect until late July. You could either wait for that update to take effect on the Moodlecloud servers or try and install Moodle 3.1 again once the patch is available (or if you were able to figure out why Sakai was sending a bad URL that would work as well).

Regards,

Mark