Moodle MNET - Accessing Resources Print

  • 0

 

 

First, this tip is kinda "criptic" and one has to replace [variables] with appropriate values for functioning MNet'd Moodles.  It takes "study". ;)

Discovery:
It's possible to link directly to a resource contained in a course on an M'Netted Moodle.

Situation:
Moodle A is a HUB and has Moodle B as one of it's MNet'd host.
Moodle B is setup to force all users to login before viewing/accessing any course content.

Teacher in Moodle A course wants to use a resource in a course they teach on Moodle B.

Example:
Resource entitled: Video for Inserting Audio File into a Quiz Question
on Moodle B inside the course the link is:
videos/audio_in_quiz.swf
and is set to be a popup window with no controls

The URL in the Moodle B course is:
https://[siteB]/[moodle_directory]/mod/resource/view.php?id=1417

On Moodle A (the HUB) one has to build the URL using the following:


https://[siteA]/[moodle_directory]/auth/mnet/jump.php?hostid=[m'nettedhostIDnumber]&wantsurl=/mod/resource/view.php?id=1417

The first part of the link gets authorization to roam to the MNet'd host:
https://[siteA]/[moodle_directory]/auth/mnet/jump.php?hostid=[m'nettedhostIDnumber]

The second part of the link is the short version of the resource:
&wantsurl=/mod/resource/view.php?id=1417

In the HUB, the MNet'd host is defined as https://[siteB/[moodle_directory]
That's ID'd with a number which will get inserted into the URL passed.
The &wantsurl is the variable that the HUB server will use to access the resource.
The only thing remaining is a "relative" URL as it exist on the B MNet'd Moodle:
/mod/resource/view.php?id=1417

[localmoodleurl]/auth/mnet/jump.php?hostid=[m'nettedhostIDnumber]&wantsurl=[relativeresourceURL]

Truth in advertising ... have tried this with some resources in 2 MNet'ed Moodles.  It does work but requires some tweaking.  Your mileage might vary!

 


Was this answer helpful?

« Back

Powered by WHMCompleteSolution