Import in Moodle 2.0 does not work!

Import in Moodle 2.0 does not work!

by Fatema Abou El Ela -
Number of replies: 13

Hi!

I've been installing Moodle 2.0 and found that the import functionality does not work. When I click on import and choose the course from which I shall import, then click continue.... everything seems fine, but when I check the course, I find that nothing had been imported!

Did anyone face this issue before?

Thanks in advance!

Average of ratings: Useful (1)
In reply to Fatema Abou El Ela

Re: Import in Moodle 2.0 does not work!

by Jay Schupp -

Yes...we are having this exact issue.  I've tried about everything I can think of.  I can backup and restore the course without an issue BUT we cannot use the course import.  It says it completed successfully but when you go into the course there is nothing there.  We have upgraded to the latest Moodle 2.11 thinking that would help our situation.  Our teachers are used to using the course import ... I tried the methods I found on the Moodle.Org site...permissions and increasing the number of courses to display but can't seem to get this to work.

 

...Jay

In reply to Fatema Abou El Ela

Re: Import in Moodle 2.0 does not work!

by Ernesto Yannini -

Hello,
I have more than 50 Moodle and update all to the latest version (2.1) and am having trouble with import, simply does not work.
He says everything is fine but doesnt do anything.

Please someone help solve this.
Greetings!

In reply to Fatema Abou El Ela

Re: Import in Moodle 2.0 does not work!

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

If you put debugging into developer mode, what does it show?  

In reply to Emma Richardson

Re: Import in Moodle 2.0 does not work!

by Bill Stone -
Hi,

In regard to this import error, I posted here on 2 December without response: http://moodle.org/mod/forum/discuss.php?d=182312

Here's what I posted, including the debugging trace:

Hi,

I posted this issue/question elsewhere in October without any reply. Hope to have better luck with this thread.

Our teachers receive the error message "error/decode_rule_mappings_incorrect_count," bringing everything to a halt, when trying to duplicate, restore, or import. Visually, it appears the operation failed. However, as soon as the teacher creates a new resource (such as a Book) in the course, all the items miraculously appear as would have been expected in the first place.

The same behavior is seen repeatedly during testing with various courses on our production server (Moodle 2.1.2+ (Build: 20111012)) as well as our sandbox (Moodle 2.1.3 (Build: 20111128)).

All three (duplicate, restore, import) seem to fail in /backup/util/helper/restore_decode_rule.class.php.

Any ideas?

Here's the trace from a restore:

error/decode_rule_mappings_incorrect_count

More information about this error

Stack trace:
line 157 of /backup/util/helper/restore_decode_rule.class.php: restore_decode_rule_exception thrown
line 49 of /backup/util/helper/restore_decode_rule.class.php: call to restore_decode_rule->validate_params()
line 101 of /mod/presenter/backup/moodle2/restore_presenter_activity_task.class.php: call to restore_decode_rule->__construct()
line ? of unknownfile: call to restore_presenter_activity_task::define_decode_rules()
line 143 of /backup/util/helper/restore_decode_processor.class.php: call to call_user_func()
line 422 of /backup/moodle2/restore_stepslib.php: call to restore_decode_processor::register_link_decoders()
line 34 of /backup/util/plan/restore_execution_step.class.php: call to restore_decode_interlinks->define_execution()
line 153 of /backup/util/plan/base_task.class.php: call to restore_execution_step->execute()
line 148 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
line 157 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
line 302 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
line 130 of /backup/import.php: call to restore_controller->execute_plan()


Thanks for any help you can provide.
In reply to Bill Stone

Re: Import in Moodle 2.0 does not work!

by Jonathan Newman -

We had problems with an add on causing a problem with the backup. You may wish to attempt removing any add ons then attempting a backup/restore.

Average of ratings: Useful (1)
In reply to Jonathan Newman

Re: Import in Moodle 2.0 does not work!

by Bill Stone -
Hi,

Thanks for the tip, but can you be more specific? Do you know which "add on" was causing the problem?
In reply to Bill Stone

Re: Import in Moodle 2.0 does not work!

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

Yes, I found that some questions were the culprits and sometimes it was just one course that caused problems.  Most of the time, I never did figure out exactly which one as I was lucky enough where the teacher with the issue had another section that she was able to import from.  The error does not look familiar to what I was seeing prior.

The other error I had was a failure to restore to a new course but I was able to rectify that creating the course and the sections in the course before restoring.  You might check and see if the course that you are restoring into has enough sections in it.

The question module has been known to cause issues, in particular Cloze questions (of which I have hundreds of course!).  At least you have found a work around - have you submitted a tracker ticket?  

In reply to Bill Stone

Re: Import in Moodle 2.0 does not work!

by Jonathan Newman -
In our case it was Big Blue Button. After we reinstalled it we had no problems. If you read through the forums there were other Moodle users with other add ons causing the similar problems. Best of luck!
In reply to Bill Stone

Re: Import in Moodle 2.0 does not work!

by Jim Lee -

We were having the same issue.  I deleted the Slideshow Mod and the import worked.

In reply to Jonathan Newman

Re: Import in Moodle 2.0 does not work!

by Jaswant Tak -

Yes, you are right Jonathan. 

In my case QuickMail block was the issue.

 

Thanks

Jaswant

In reply to Bill Stone

Re: Import in Moodle 2.0 does not work!

by Bill Stone -
Thanks, Emma and Jonathan, for suggestions. Still working to figure out what's causing the problem.
In reply to Bill Stone

Re: Import in Moodle 2.0 does not work!

by Bill Stone -
Hi,

Although none of our users were actually utilizing it at all, it appears the "Presenter" module was the culprit. Once it was uninstalled, the fatal errors generated by the duplicate, restore, and import functions vanished.
In reply to Bill Stone

Re: Import in Moodle 2.0 does not work!

by Paul Vivian -

I don't have presenter installed.. Infact I have removed a lot of the unwanted modules.

 

I just tried an import and a restore and get the same resulting fault..

I manage anbout 8 different sites and a few of them have this healthcenter fault and for the life of me I can not see why.

PLEASE can anyone help

This section is what is displayed when I go to developer debugging, the lower section displays what is left within the moddle frame.

Warning: Invalid argument supplied for foreach() in /home/producti/public_html/lms/backup/util/plan/restore_structure_step.class.php on line 421
Invalid get_string() identifier: 'healthcenter' or component 'moodle'. Perhaps you are missing $string['healthcenter'] = ''; in lang/en/moodle.php?

  • line 6343 of /lib/moodlelib.php: call to debugging()
  • line 6935 of /lib/moodlelib.php: call to core_string_manager->get_string()
  • line 8 of /admin/settings/unsupported.php: call to get_string()
  • line 5927 of /lib/adminlib.php: call to require()
  • line 2993 of /lib/navigationlib.php: call to admin_get_root()
  • line 2901 of /lib/navigationlib.php: call to settings_navigation->load_administration_settings()
  • line 601 of /lib/pagelib.php: call to settings_navigation->initialise()
  • line 617 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()
  • line 133 of /blocks/settings/block_settings.php: call to moodle_page->__get()
  • line 280 of /blocks/moodleblock.class.php: call to block_settings->get_content()
  • line 232 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
  • line 926 of /lib/blocklib.php: call to block_base->get_content_for_output()
  • line 978 of /lib/blocklib.php: call to block_manager->create_block_contents()
  • line 349 of /lib/blocklib.php: call to block_manager->ensure_content_created()
  • line 9 of /theme/formal_white/layout/general.php: call to block_manager->region_has_content()
  • line 685 of /lib/outputrenderers.php: call to include()
  • line 637 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
  • line 2062 of /lib/outputrenderers.php: call to core_renderer->header()
  • line 334 of /lib/setuplib.php: call to core_renderer->fatal_error

This is what is within Moodle:

error/decode_rule_mappings_incorrect_count

More information about this error

Stack trace:
  • line 157 of /backup/util/helper/restore_decode_rule.class.php: restore_decode_rule_exception thrown
  • line 49 of /backup/util/helper/restore_decode_rule.class.php: call to restore_decode_rule->validate_params()
  • line 101 of /mod/presenter/backup/moodle2/restore_presenter_activity_task.class.php: call to restore_decode_rule->__construct()
  • line ? of unknownfile: call to restore_presenter_activity_task::define_decode_rules()
  • line 143 of /backup/util/helper/restore_decode_processor.class.php: call to call_user_func()
  • line 417 of /backup/moodle2/restore_stepslib.php: call to restore_decode_processor::register_link_decoders()
  • line 34 of /backup/util/plan/restore_execution_step.class.php: call to restore_decode_interlinks->define_execution()
  • line 153 of /backup/util/plan/base_task.class.php: call to restore_execution_step->execute()
  • line 148 of /backup/util/plan/base_plan.class.php: call to base_task->execute()
  • line 157 of /backup/util/plan/restore_plan.class.php: call to base_plan->execute()
  • line 310 of /backup/controller/restore_controller.class.php: call to restore_plan->execute()
  • line 147 of /backup/util/ui/restore_ui.class.php: call to restore_controller->execute_plan()
  • line 46 of /backup/restore.php: call to restore_ui->execute()