Joomdle integration in Joomla via Menu Item (Moodle Wrapper)

  • Wanda Bostock
  • Topic Author
  • Offline
  • New Member
  • New Member
More
13 years 9 months ago #1 by Wanda Bostock
Just migrated a site to production that uses Joomla (2.5.6) & Moodle (2.2) integration (using Joomdle 0.61). I used a menu item to display the Moodle site (using the Moodle Wrapper menu item type). When clicking on the menu item in Firefox, the url resolves fine and the moodle page displays as expected; however, when clicking on the same menu item in either Google Chrome or Safari, the Moodle page does not display at all. Instead, there's a blank section where the Moodle page should be.

When I float over the menu item in Firefox, I can see that it prefaces the url for that menu item with "www."; however, in Chrome and Safari, it is not showing the "www.". My assumption is that this is the root cause of the issue. To prove it, I went directly to the moodle site without typing "www." in the address bar. When I did that, I received an error "Incorrect access detected, this server may be accessed only through "http://www...." and then it redirected successfully to that location. The Joomdle integration doesn't appear to be able to complete that redirection.

I did some further testing after this and made a little progress; however, it's still not where it needs to be for a production system:

In Moodle – I went to Site Admin->Security->Http Security – and enabled the option for Allow Frame Embedding. Appears to fix it for google chrome but not safari.

In Joomdle config in Joomla set “Autoheight in wrapper = no” (it was set to yes). Changing only this setting and testing in safari shows the error message ("Incorrect access detected, this server may be accessed only through "http://www....") inside the moodle page inside Joomla but doesn’t automatically redirect. Clicking Continue to force the redirect doesn’t do anything. Chrome shows the error message, but automatically redirects.

Applying both of these changes at the same time appears to fix the issue in both Chrome and Safari, however, the error message ("Incorrect access detected, this server may be accessed only through "http://www....") still appears. Both Chrome and Safari show the message but both automatically redirect (as did Firefox).

I need to get rid of this error message that displays to users. If I can do that, then I can apply both of these changes above.

Optimally, I would like to get rid of the error message by eliminating the root cause. If that can't be done, then how can I get this error message to stop displaying?

Thanks...

Please Log in or Create an account to join the conversation.

  • Wanda Bostock
  • Topic Author
  • Offline
  • New Member
  • New Member
More
13 years 9 months ago #2 by Wanda Bostock
Resolved how to suppress the error message. Did the following (according to info on another post on the Moodle.org forum):

In the Moodle installation on the server, in lib/setuplib.php change:
redirect($CFG->wwwroot, get_string('wwwrootmismatch', 'error', $CFG->wwwroot), 3);
to
redirect($CFG->wwwroot, get_string('wwwrootmismatch', 'error', $CFG->wwwroot), 0);

This, combined with the 2 setting changes in my previous post, resolved the issue. B)

Please Log in or Create an account to join the conversation.

More
13 years 9 months ago #3 by Chris
Great.

Thanks for the solution Wanda

Please Log in or Create an account to join the conversation.