C2 game on moodle

Get help using Construct 2

Post » Mon Aug 03, 2015 7:30 am

Hello

I have a problem using an exported C2 game into moodle (a learning management system).
The problem is that the game is not loading. In the chrome console i can see errors loading images.

Error loading image 'http://127.0.0.1/moodle/pluginfile.php/25/mod_scorm/content/2/images/titlebar-sheet0.png'

For every images of my game.
If i follow the link, the image exists and is displayed correctly in the browser.

I tried an other LMS, "scorm cloud" for exemple and it is the same.

If i run the game directly on a web server, it works fine.

Does someone is able to run a C2 game in an LMS correctly ?

thanks :)
B
13
S
3
G
4
Posts: 72
Reputation: 3,455

Post » Fri Aug 21, 2015 6:39 pm

Hello Mimiste,

I am running into the same problem with a C2 project and SCORM Cloud. I am getting a 401 Authorization Required error when it chooses not to load. I think the problem might be related to a cancelled 'data.js' request that occurs at the same time as the 401 error. Have you found a solution or workaround?
B
7
S
2
Posts: 2
Reputation: 491

Post » Thu Aug 27, 2015 3:38 pm

Hello,

yes i found a solution... Not a really good one but at least it's working for now.
After exporting my project, i opened c2runtime.js (not minimified) and deleted the lines of code setting the crossorigin of a loaded url to anonymous (search for "anonymous" in the code). And after that, the game is loading fine on any LMS i tried (moodle, scorm cloud)
B
13
S
3
G
4
Posts: 72
Reputation: 3,455

Post » Fri Aug 28, 2015 3:16 pm

Thank you so much Mimiste! I was just looking at those "crossOrigin" snippets in "c2runtime.js" when I happened to log back into this forum site. Scorm Cloud looked into the issue and said that whatever was loading the images, which we know is "c2runtime.js", was not accepting/using their authentication cookie. I guess the "crossOrigin" property that was being set on the loading objects as "anonymous" must, in some way, ignore or overwrite the accepting of the cookie from Scorm Cloud and like sites.

Thanks again!
B
7
S
2
Posts: 2
Reputation: 491

Post » Mon Sep 05, 2016 10:05 pm

Hello! How are you guys publishing the game to the LMS? Can you please point me to any tutorial on SCORM or whatever method you´re using??

Thanks!
B
3
Posts: 3
Reputation: 181

Post » Tue Sep 06, 2016 3:35 pm

I created a construct2 plugin for scorm to be able to connect to the LMS and send scorm statements.
Unfortunately I can't share it here because i'm using some copyrighted code created by the company i am working for.
But eventually, i'll make a version without this code if people are interested in this.
B
13
S
3
G
4
Posts: 72
Reputation: 3,455


Return to How do I....?

Who is online

Users browsing this forum: tarek2, Yahoo [Bot] and 14 guests