Unable to Import Course

Unable to Import Course

by Suzanne Faber -
Number of replies: 20

I am having a problem where teachers are unable to use the import function.  We are currently on Moodle 2.0.1+ (Build: 20110119).

When a teacher clicks on import, the select a course option says "There are no courses to display."  The teachers have multiple courses they are teaching, so it is not due to them only being enrolled as teacher in the one course.  With the admin role I have no problems and get a full list of courses.

Any ideas on how to have the teachers courses show in the select a course option?

Average of ratings: -
In reply to Suzanne Faber

Re: Unable to Import Course

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Have you checked the permissions?  I would check on whether they are allowed to backup (under courses), allowed to see hidden courses (in case that is an issue).

In reply to Emma Richardson

Re: Unable to Import Course

by Suzanne Faber -

Emma,

I have checked that.  I even had one of the teachers do a backup and restore and they could use that function.  However, with the restore they could only restore to the current course and not choose a course.

I have check the permissions and things for doing back ups and restores are allowed.

In reply to Suzanne Faber

Re: Unable to Import Course

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Have you checked what roles your teachers have in the class.  Maybe some other role is clashing with their teacher role?

In reply to Emma Richardson

Re: Unable to Import Course

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Suzanne, have you checked whether teachers have the permission to import a course into another course - moodle/restore:restoretargetimport (new in 2.0)?

Average of ratings: Useful (1)
In reply to Helen Foster

Re: Unable to Import Course

by Suzanne Faber -

Helen,

I checked and moodle/restore:restoretargetimport is set to allow.

In reply to Emma Richardson

Re: Unable to Import Course

by Suzanne Faber -

Emma,

They only have a teacher role in the course.

In reply to Suzanne Faber

Re: Unable to Import Course

by Jorge Villalon -

Hi Emma.

Did you manage to solve this problem. I'm using 2.0.2 after upgrading, and my teachers can't see any courses in the import list.

Regards,
Jorge

In reply to Suzanne Faber

Re: Unable to Import Course

by Brigitte Baquero -

Hi Emma

I am having the same problem, could you fix it ?

In reply to Brigitte Baquero

Re: Unable to Import Course

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Actually I never had the problem, was just trying to help someone that did.  Not sure if they got it fixed or not.

In reply to Emma Richardson

Re: Unable to Import Course

by Jorge Villalon -

Hi.

I was checking Moodle's code and found this is a bug, I reported it, it's in http://tracker.moodle.org/browse/MDL-26938 . However, since then I have had no response. I'm a little worried because it's not a problem that's easy to solve.

It would be a good idea for you to vote for it in the tracker system.

In reply to Jorge Villalon

Re: Unable to Import Course

by Tammy Snyder -

Jorge - thanks very much for your suggested workaround.  I increased the parameter for upper limit as per your comment in MDL-26938 and that has helped us get out of a jam.  I voted for your ticket as well.  Thanks again!

In reply to Tammy Snyder

Re: Unable to Import Course

by Rob Monk -

Importing in Moodle 2.0 is in my opinion a big "Downgrade". It used to be easier in 1.9.

Here is our workaround.

We assigned all teachers in an area as "Managers". Eg all our English teachers are Managers of the English category. THis means they are able to import from courses.

It is risky as they could also stuff everything up in that area but we could not seem to manipulate the teacher role well enough to allow easy importing.

In reply to Rob Monk

Re: Unable to Import Course

by Henning Bostelmann -
Picture of Core developers Picture of Plugin developers

These problems are likely related to MDL-29072.

In reply to Henning Bostelmann

Re: Unable to Import Course

by Gisele Brugger -

Today 28/02 i upgrade to moodle 2.2.1 and had the same problem, but tracker is closed ????  and the problem continue...

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

solution is :

alter file

/moodle/backup/util/ui/restore_ui_components.php

line 166  where have :  250  change for exemplo to : 5000

 $resultset = $DB->get_recordset_sql($sql, $params, 0, 5000);

 

In reply to Gisele Brugger

Re: Unable to Import Course

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Hi Gisele,

I think there were 2 problems:

MDL-29072 - about the capabilities to evaluate for deciding which courses can be used as source for import. This was fixed long ago.

MDL-26037 (and a bunch of duplicates: MDL-26938MDL-27154MDL-29628MDL-29157) - basically, about not all courses being shown in the list in sites having "many" courses (250). Your proposed fix above is the "quick one", but it has been implemented in another, better, way (thanks Tony Levi!). Right now, that issue is waiting for integration, so will be available soon (hopefully < 7 days from now).

Ciao smile

Average of ratings: Useful (2)
In reply to Suzanne Faber

Re: Unable to Import Course

by Donna Hrynkiw -

For others who may be experiencing this bug:

We've found a feasible (if improbable) work-around: Move the teacher's courses to higher in the list of categories.

The bug occurs if the teacher's course(s) don't appear in the first 250 returned by the query. The query returns courses in the order they appear in the course categories.

Our teacher's courses are (were) in Marketing -- quite a way down the alphabetical-by-subject category list. By moving her courses to a category above the subject list, she's able to find her courses in the import file selector. (Most of our teachers use backup/restore. This one teacher has requirements which necessitate the use of import. If you have many teachers using import, this work-around will be a non-starter.)

Kudos to my not-a-programmer Boss for figuring this one out.

(We're running M2.2.1 -- one tiny upgrade shy of the version where this bug is fixed, and no prospect of upgrading until the end of the semester, 3.5 months hence.)

In reply to Donna Hrynkiw

Re: Unable to Import Course

by Kathy Cannon -

This is sort of terrific. A bug fix is the most terrific, but before we get the new code, at least we have an interim "work around" in which we just springboard coursesto a top category. It works.

Now we can try to guess which of our 250 faculty need to import and try to move their 900 courses around until .... that's just not going to work.  Looking forward to new code.

Thank you for sharing this discovery! - Kathy 

In reply to Kathy Cannon

Re: Unable to Import Course

by John Hackett -

Not sure if this is still an issue with people but just in case...

We had the same problem (v 2.6.1) and found that there is a settings in the admin panel to control the "import_max_general" value which defaults to 10.

In "Site Administration" -> Courses -> Backups -> General Import defaults

Change to a number larger that the total number of courses in the installation - we used 1000 which fixed the issue.

John.