importing course via moodle network

importing course via moodle network

by Lukasz Czyzewski -
Number of replies: 6
Hello to everyone!

I've got two moodle instances on the same server and I want a teacher from instance A to be able to import courses from instance B.

Is it possible to import a moodle course via moodle network?

Thanks!
Lucas.
Average of ratings: -
In reply to Lukasz Czyzewski

Re: importing course via moodle network

by Peter Bulmer -
Hi Lukasz,

I'm aware that you haven't had a torrent of replies to your question, but reading it again, I take a little bit of a different interpretation than the first time I read it.

If you are asking is it possible for a teacher in Moodle A to get a copy of a course in Moodle B, then I'm afraid the answer is no.

What mnet does allow you to do is enrol students from MoodleA into the existing course in MoodleB. Then using mnet, the students roam from MoodleA (identity provider) to Moodle B (content provider) to take the course.

Hope this clears things up a little.
Pete.
In reply to Peter Bulmer

Re: importing course via moodle network

by Wen Hao Chuang -
Hi Peter, I think Lukasz was talking about "Import", not backup/restore. To do what Lukasz had in mind (with import), I believe that there is a walk-around using backup/restore to achieve the same thing. However, it would be really great to have "Import" to support mnet. Here at SFSU we have our own simple version of mnet (a modified course_list block using redirect() ), and we will be implementing such feature to allow "Import" to work between different Moodle instances. We will report back to this forum once this is done. Thanks! smile

Wen
In reply to Lukasz Czyzewski

Re: importing course via moodle network

by Wen Hao Chuang -
This sounds like a great feature request so I have logged this to the moodle bug tracker as a new feature request. See MDL-16734. Thanks!
In reply to Wen Hao Chuang

Re: importing course via moodle network

by David Mudrák -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Plugins guardians Picture of Testers Picture of Translators
Well, is this really so important and needed? There is a relatively simple way how to get a copy of a course from one server to another. Also I'm little bit afraid of performance issue - using XML-RPC to get a zip file from one server to another... mixed that smells to me.
In reply to David Mudrák

Re: importing course via moodle network

by Wen Hao Chuang -
David, good point. Well from user's perspective (at least for our users at SFSU), they prefer to use "Import" feature rather than using the backup/restore feature, simply because we are running 3 moodle instances (for current semester and previous semesters that can back track to 2 years ago) with a seamless login script. It would make great sense (our support team confirmed this) to provide such feature for users to be able to import some course materials from one course (say, Fall 2006 semester, sitting on moodle1 server), to, the course that he/she will be teaching this semester (say, Fall 2008 semester, sitting on moodle3 server).

Currently we are thinking of using base64_encode() and decode to implement this, instead of using XML-PRC. So it probably would look like this:

remotecourse.php
Input: a = hashed value of &action=getimportablecourses&username=[username]&password=[md5 password]

Output: Returned an encoded serialized array structure of courses with categories to the output buffer.

remoteimport.php
Input: a = hashed value of &action=getimportfile&username=[username]&password[md5 password]&courseid=[courseid]&output=[0=binary, 1=file location]

Output: Returns either the relative file location (relative to moodledata, e.g., /moodledata/xxx/1025/backups/abc.zip) or the encoded serialized zip file.

Comments or thoughts? Thanks!
In reply to Wen Hao Chuang

Re: importing course via moodle network

by Penny Leach -
Wen, you can actually use base64 encoded data as the response to an xmlrpc request, that's how profile images get passed around over mnet.

It doesn't have to be one or the other.

Penny