Google Assignments doesn't work at end - Moodle 3.7+

Google Assignments doesn't work at end - Moodle 3.7+

by Diego Corral Molero -
Number of replies: 7

Hi everyone.

Im using Moodle 3.7+

Im stuck with a problem with Google Assignments (GA). I set up with all this instructions https://docs.google.com/document/d/1UgmHqb8112ZQWT-CddfBwGsDwRGbUktOGJy2L3YkkYM/edit.

Now, when i want create a new "task" I just go in like that. All right.

Create new task

Then i just add doc, set the score and press Create (Crear).

So page pop-up window reload and redirect to me to home screen. Photo:

Home screen

Only way is close this window with no results.

Thanks you all.

Average of ratings: -
In reply to Diego Corral Molero

Re: Google Assignments doesn't work at end - Moodle 3.7+

by Jake Dallimore -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Diego,

We are probably going to need more information. That document you linked isn't public and it's hard to work out what steps you're taking to launch the tool from Moodle.

Can you please explain clearly how you've set up the tool, and how you're launching it? It looks like our "content selection" (deep linking) modal in that last picture. Are you using the deep linking workflow?

Jake
In reply to Jake Dallimore

Re: Google Assignments doesn't work at end - Moodle 3.7+

by Diego Corral Molero -

I go to Administration →  Site administration →  Plugins →  Activity modules →  External tool →  Manage tools.
So enter all data.

I dont know what is deep linking workflow but i have same external tool in other moodle and works fine (with same version and specs).
In reply to Diego Corral Molero

Re: Google Assignments doesn't work at end - Moodle 3.7+

by Jake Dallimore -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi Diego,

Thanks for clarifying. The deep linking workflow is just the "Select content" button in the activity settings, and is what I imagine you clicked based on your last screenshot (The one with the "Seleccionar contentido" header). I've not used Google assignment with Moodle personally, however, I do note there were some issues with samesite cookies recently (Moodle issue), and this was only patched in the in support versions of Moodle. That is, 3.9 onwards. To get a better understanding of what's happening in your case, we'd need a trace from the network tab of your browser's dev tools, clearly showing the requests being made as part of that content selection process - along with all params. Chrome should be able to export this for you (https://developer.chrome.com/docs/devtools/network/reference/#save-as-har).

In the meantime, I'd suggest using an in support version of Moodle.

Hope that helps,
Jake
In reply to Jake Dallimore

Re: Google Assignments doesn't work at end - Moodle 3.7+

by Diego Corral Molero -
Hi Jake,

Thank you for all help. Seeing console im seeing some "block" with CSP, I dont know exactly what it mean. Here you have the HAR file you request https://wetransfer.com/downloads/ab41eec3283537747cb6d90eac7b0a2520211202070503/bf264679391b5e7333af0172c57268a520211202070513/b443f6 .

In console I get those errors:
Console errors

I have pending upgrade Moodle to newest version but we are now in middle of course and there are a lot of students using Moodle.

Thank you again.
Diego
In reply to Diego Corral Molero

Re: Google Assignments doesn't work at end - Moodle 3.7+

by Jake Dallimore -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Thanks for sending that over, Diego. That HAR file confirms what I was suspecting - that this issue is case of the cookie handling in deep linking / content selection.

If you filter by "Doc" and inspect the headers for the response from content_item.php, you'll see there's a clear "Set-Cookie" header there, indicating that prior session has been lost and a new one is being created. That's why you see the login page. This was patched in MDL-71887 but you'll need to upgrade to get access to that.

Cheers,
Jake
Average of ratings:Useful (1)
In reply to Jake Dallimore

Re: Google Assignments doesn't work at end - Moodle 3.7+

by Diego Corral Molero -
First at all, I thank you very much for all clarifications and quick response.

I will upgrade moodle at end of course.

Again, thank you so much.
Diego
In reply to Diego Corral Molero

Re: Google Assignments doesn't work at end - Moodle 3.7+

by Jake Dallimore -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
No trouble at all, Diego. It's nice when we do know what the problem is and how to solve it
Jake