No grades synced to Moodle-consumer via LTI

No grades synced to Moodle-consumer via LTI

by v k -
Number of replies: 10

Hi there,

I've two Moodle installations: Moodle-consumer and Moodle-provider. In the Moodle-provider, I've published a Quiz activity as LTI Tool, and integrated it into the Moodle-consumer.

Now, I can get access to the Quiz from the Moodle-consumer via LTI, but when the Quiz is finished, the grade isn't synced to the Moodle-consumer. And meanwhile, in the Moodle-provider here is now a new created user from Moodle-consumer, and grade from the Quiz. But no grade synced to Moodle-consumer, so there is only '-' on the Grades page.

In Moodle-provider's Publish as LTI tool settings, I haven't set up any actions/restrictions 'prior to grades synchronisation', so I expect grades to be synced immediately I pass the Quiz from Moodle-consumer. But as I said already, there're no grades synced to to Moodle-consumer.

Can anybody help?

How do I chech that at least the Moodle-provider sends proper data back to the Moodle-consumer, with student info and his/her grades?

I am trying to use LTI4WIN (http://www.spvsoftwareproducts.com/win/lti4win/) as LTI Consumer Emulator, but I don't understand how to see the outcomes there, which is turned on in the settings. 

Average of ratings: -
In reply to v k

Re: No grades synced to Moodle-consumer via LTI

by John Okely -

Sorry to hear you have hit problems. To help diagnose what's going on could you answer the following questions:

Is cron set up and running on the moodle provider site?

Is "accept grades" ticked on the moodle consumer site (external tool settings)?

In reply to John Okely

Re: No grades synced to Moodle-consumer via LTI

by v k -

  1. Is cron set up and running on the moodle provider site?
    Maybe it doesn't work automatically, but some tasks are being done when I go to https:\\MySite.com\admin\cron.php?password=MyPass (this is allowed in admin setting) and also via command line, 
    Regarding 'sync grades task', for all grades to be synced I get messages, that either the grades are same (though there is '0' in Provider and '-' in Consumer, which is different), or that 'Skipping - Invalid grade for the user '1029' in the tool '2' for the course '10006'.

  2. Is "accept grades" ticked on the moodle consumer site (external tool settings)?
    Yes.

Maybe it's worth mentioning that my moodle's source code files were slighlty edited. Particularly, the behaviour of the 'Start Attempt' button was changed: now it redirects to my other site, where a student does his test and then, the data with grades and other stuff is sent back to Moodle via Web-Service function, which stores it to quiz_attemts table.

Could all 'sync grades' failures occure due to the system is confused, that there is some grade for the quiz, but no questions within and therefore no marks for each question?

And in Moodle, what's different between marks and grades?

Thank you,  highly appreciate your help.

In reply to v k

Re: No grades synced to Moodle-consumer via LTI

by John Okely -

Very likely that the modified code is the cause. Although it won't get confused regarding the questions.

We can figure it out - what values are showing on the gradebook for the quiz on the provider site before you run the sync grades task? I'd try again with someone with a grade. 0 is complex behaviour as we have to handle the differences between the way LTI wants us to treat it and the way moodle treats it. I'll be interested to see if that is the cause of the problem.

In reply to John Okely

Re: No grades synced to Moodle-consumer via LTI

by v k -
I tried with grades >0, again no synchonization.


I then learned that on Provider side, LTI grabs grades from grade_grades table, field finalgrade.But I don't get how this table is filled, how new row is added: there're fields which I cannot understand how they're filled, particularly itemid - what is it?

So I see these solutions:

  1. Add rows to grade_grades table with finalgrade field to be grabbed by LTI code.
    But need to know, how to correctly form the row;

  2. Change LTI so it looks for grades to be synced in another table. Is it possible?


Again, help here is always highly appreciated.

In reply to v k

Re: No grades synced to Moodle-consumer via LTI

by John Okely -

On the provider side the grade logic is provided by the module in question, not LTI or an LTI module. We can't and shouldn't need to change this logic.

Are you saying grade_grades finalgrade has the wrong value?

What module are you sharing via LTI?

In reply to John Okely

Re: No grades synced to Moodle-consumer via LTI

by v k -
On the provider side the grade logic is provided by the module in question, not LTI or an LTI module

Yes, I understand this. LTI only reads grades from grade_grades table and then syncs them with Consumer.


We can't and shouldn't need to change this logic.

Ok, not change where from LTI grabs grades and how then they're synced with consumer, right?


Are you saying grade_grades finalgrade has the wrong value?

  No, my grade_grades table doesn't get filled at all, because as I said I changed how my mod/quiz works.

  In my case, pressing Start|Re- Attempt button redirects to some quiz on my another, non-Moodle web-site with all USERID, quizID and other needed data. Then, the web-site returns sumgrades to my Moodle, and my Moodle stores grades to quiz_attempts and some other tables.

  When I learned these days, that LTI reads grades from grade_grades table, I tried fill this table manually along with other tables (quiz_attempts and some other tables), but I didn't succeed. I then learned that this table can't be changed maually, and one should use grade_update function instead. I tried to call this function, but again no success without any warnings.


The question now is, how do I fill the grade_grades table? What function should I call?


What module are you sharing via LTI?
Quiz


Thank you, appreciate help here.

In reply to v k

回應: No grades synced to Moodle-consumer via LTI

by Adrian Cheung -

I had the same problem as yours on moodle 2.9, and I found that it seems some part in the code was not finished by the developer. I upgraded to moodle 3.0 and the problem solved.

In reply to Adrian Cheung

Re: 回應: No grades synced to Moodle-consumer via LTI

by v k -

Mine is 3.1.0+

In reply to Adrian Cheung

Re: 回應: No grades synced to Moodle-consumer via LTI

by Juan Carlos Molina -

I am facing the same problem with moodle 2.9 and I cannot understand why my grades are not sent back to the consumer. 

In reply to Juan Carlos Molina

Re: 回應: No grades synced to Moodle-consumer via LTI

by John Okely -

Are you using the old lti provider plugin from the plugins DB? If it's possible to upgrade your moodle version, I'd recommend it -- we updated all that code.