Cannot import from courses after a migration of moodle mysql data

Cannot import from courses after a migration of moodle mysql data

by Alex Delaforce -
Number of replies: 7
We have successfully imported a database from a LAMP install to a Windows IIS PHP MySQL install. Except ... we found that when testing that importing from one course to another doesn't work (was fine in LAMP installation).

When trying to import resources from one course to another - (user role is editing teacher in both) - I get the message
"You don't seem to be an editing teacher in any other courses, there are no courses for you to import from. "

Admin user can import, teachers cannot.

This is obviously a database issue. Does anyone have any idea? I have tried following the database relationships around the database schema ie, teacher -- role assignment -- to course but can find nothing obviously wrong (I am not a db expert).

Cheers
Average of ratings: -
In reply to Alex Delaforce

Re: Cannot import from courses after a migration of moodle mysql data

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Just to be certain.... this message is (correctly) generated when a teacher is only assigned in a single course (i.e. there are no other courses that they have the right to access). You are certain that this is not the case for that teacher?

Failing that, I would carefully check their role assignments and carefully check the role capabilities for those assignments (especially if you have customised them in any way). Roles being roles (i.e. confusing) I would expect some roles oddness before I would start suspecting backup and restore.
In reply to Howard Miller

Re: Cannot import from courses after a migration of moodle mysql data

by Alex Delaforce -
thanks Howard, the teacher is me. I have several courses where I am the 'teacher'. None of the roles have been altered. The big signal is that I could do imports without problem, in the moodle installation prior to the move of the database from the LAMP to the Window IIS PHP MySql server.
In reply to Alex Delaforce

Re: Cannot import from courses after a migration of moodle mysql data

by Heikki Wilenius -
Maybe the reason is this bug?

http://tracker.moodle.org/browse/MDL-22740

It's fixed in the latest weekly (as of Sat 12th):

http://download.moodle.org/stable19/CHANGES

Hope this helps!

Cheers,
Heikki
In reply to Heikki Wilenius

Re: Cannot import from courses after a migration of moodle mysql data

by Alex Delaforce -
thanks Heikki,
I think my error happened after the 12th but I will check in the morning.

Alex
In reply to Alex Delaforce

Re: Cannot import from courses after a migration of moodle mysql data

by Alex Delaforce -

This seems to be the issue. thanks

The new download doesn't include the fixed file though. I will leave a message in the bug tracker for Martin.

Cheers - you saved me heaps of time.

In reply to Alex Delaforce

Re: Cannot import from courses after a migration of moodle mysql data

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Chances are that if you download 1.9.9+ again now you will have the fix.
In reply to Alex Delaforce

Re: Cannot import from courses after a migration of moodle mysql data

by Heikki Wilenius -
No worries, glad your problem was solved!