Transferring a database from one course to another

Transferring a database from one course to another

by Peter Ho -
Number of replies: 3
Hi,

Apologies if this is the wrong place to submit this query.

I have a database which I have created in one course that has been used for the past 5 months. I now need to move this database to a new course. I want to import the database and the database entries.

There is an import function in the Course administration block, but following the suggestions from Moodle Doc (http://docs.moodle.org/en/Import_course_data) permits me to import only the database without any data entries.

I have tried to backup the database and have uploaded it into the new course. I was thinking of using the restore function, but I am not sure if this is the way to do it.

Is there a way I can move all my data and the database from an old course to a new one?


Peter

Average of ratings: -
In reply to Peter Ho

Re: Transferring a database from one course to another

by John Isner -
following the suggestions from Moodle Doc (http://docs.moodle.org/en/Import_course_data) permits me to import only the database without any data entries

It's a known bug.

Attachment import_of_database_fails.png
In reply to John Isner

Re: Transferring a database from one course to another

by Peter Ho -
John,

I had already read a thread which indicated a problem with the import function which I believe was in 2006. I was hoping that it would be resolved or that there was an alternative way of doing it. I did not want to play around with overide roles and keeping the databases where they are at the moment and I was also intending to delete the older courses when I move the databases into the new course. I have five different databases spread out in different courses and we decided it would be better and easier for our users to go use a single course with all these databases. It would also be easier administratively as we will be able to have different permission levels running in that course.

Is there a another way? I was wondering if we could do this by importing the database format and then trying another method to import the individual data entries.

Thanks for replying

Peter
In reply to Peter Ho

Re: Transferring a database from one course to another

by John Isner -
Just to be clear: are we talking about (1) the database module's import function, which allows a file of comma-separated values to be imported into an existing database, or (2) the Administration -> import, which copies the entire database activity from another course? I assume we have been talking about 2. The tracker issues I pointed to also refer to 2.

Now in your second paragraph when you say "importing the database format", I think you're talking about 1. This sounds like a good idea -- if you can get the data from the old databases. I'm not a database user, and I assumed database would have an export function, but I looked and I couldn't find one. But I suppose you get a screen listing of the old database (View list), then copy (ctrl-C) and paste (ctrl-V) into a text editor. Is that what you had in mind? If so, you still need to set up all the fields and templates in each new database. Not a job I would relish.