Import/Export

Import/Export

by Dan Keefer -
Number of replies: 4

In another Forum here someone asked how they could best move data from a test Moodle server to their production Moodle server, and the answer was given "User Backup and Restore". I'm guessing that is really a Moodle interface to the databases' (MySQL likely) Backup/Retore functions.

Is there also a Moodle interface to define Import/Export files for the purpose of data exchange between a Moodle installation and a totally different database? In my experience you need to create something like a comma delimited text file, the format of which both systems know.

987115641,Smith,Jack,T,1111112234567123,Alegbra II,

For record matching, both need to share unique keys . . . a user ID (987115641) and a course ID (1111112234567123).

My questions are:

1. Does Moodle include functionality to create export files to a user's specifications?

2. Does Moodle include functionality to import files to a user's specifications?

3. How flexible is Moodle in defining keys? Can they be Alphanumeric? Any length?

4. How difficult would it be to change the keys? For example, if the original installation defined a 4 char user ID and it was discovered that they needed a 9 char ID for growth, would this be a huge problem? How about if they wanted to go the other way? For example, say the user ID was short-sightedly set as Last_name+first_name+middle_initial and someone came along and decided they needed to be changed to random unique keys, how difficult would it be to change? Would a Moodle function handle this or would they need to do some sort of direct database cascade update?

Any details would be appreciated.

Dan

Average of ratings: -
In reply to Dan Keefer

Re: Import/Export

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
You might need this....

http://sqlfairy.sourceforge.net/

...the logo is the best tongueout

Most of the changes you talk about are easily possible through Moodle's existing upgrade mechanism. I can't think why you would want to change stuff like that outside of mainstream developments.
In reply to Howard Miller

Re: Import/Export

by Dan Keefer -

Sorry but I'm not quite sure to what you are referring in each instance.

"upgrade mechanism" to upgrade what?

Change stuff like what?

Mainstream developments?

I think what I was talking about is a common problem for those of us not heavily invested in OSS solutions. Customers have existing systems to do other things that either Moodle doesn't do, doesn't do as well (in their opinion, at least), or does in a way different from what they are trained to do. Therefore, a customer might "buy into" Moodle only so far as it meets an unmet need. It doesn't mean they want to totally, for example, change how they register students, etc.

I'm not well-versed in what Moodle can do and how it does it. What I'm trying to do is investigate how our customers, who want to use BOTH systems, can do so as painlessly as possible. Typically the answer "Don't use their product just use ours because it does it better" not only is self-serving and less-than-accurate much of the time, but it isn't how customers necessarily view the world.

Thanks.

Dan

In reply to Dan Keefer

Re: Import/Export

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Sorry,

I may have picked you up wrongly.

At a superficial, yet very flexible, level. The database is readily accessible and can be used to interface to other projects. The usage of tables therein is not terribly obscure on the whole.

The latest version has a number of web services available and this will be grown on with the goal if making interoperability much easier.

There have already been a considerable number of projects to integrate Moodle with existing systems and there will be more. Your question is very general and it would be easier to answer if it was more specific, but the answer is generally "yes". If there is some system you wish to interface with then (from the Moodle side of the house at least) it should not be rocket science to acheive.

Anyway, your questions

1. No - excepting specific functions

2. as 1.

3. If you use MySql keys are generally based on MySql's numeric keys. An integer field can be big enough for most imaginable purposed. This method maps easily to other systems in my experience.

4. see 3, except I would expect to have to program some "glue" logic, but this shouldn't be so bad in most cases.

EDIT:

Thinking some more about this (and your other post), I maybe see where this is going. Some thoughts - Moodle is a stand-alone, open source VLE; and IMHO a very good one. It isn't a mail program, it isn't a portal, it isn't a CMS. If you go to BlackCT they will sell you a complete package to kit out your entire IT department that will no doubt knit together beutifully - or they will claim that it does anyway,

Moodle is what it is. The reality for most institutions is that they have all sorts of disparate systems. Some commercial, some OSS and some custom developments. It doesn't matter what VLE they are going to implement they are going to have do so work to make it interface to existing systems. The (by definition) open nature of Moodle makes this relatively (there's that word again) easy. A lot of more generally applicable solutions have found there way back into the core product or are available as optional addons; others will be much more specific to a particular institution. But in a general sense - "yes you can" and if you do, please give it back or at least document what you found out smile
In reply to Dan Keefer

Re: Import/Export

by Michael Penney -
Hi Dan, what are you trying to import/export? In your example of registration systems, Moodle accepts information in batch or flat file as the lowest common denominator. If you registration system supports more modern standards like LDAP or IMS Enterprise, those are also supported by Moodle. You can also have Moodle read student information directly from your DBMS, a very large number of systems are supported. If you go into the Administration/Users/Authentication, and Administration/Courses/Enrolment areas of your Moodle installation, you'll that there are a number of data exchange standards supported natively.

In addition, these systems are pluggable, so you can have a custom enrollment plug-in created for your specific system if it does not support the included standards or you have needs beyond what is supported by the standards.

For more specific advice, what is the other system and what data are you trying to exchange?