Import from course problem (2.0, 2.0.1)

Import from course problem (2.0, 2.0.1)

by Jiri Princ -
Number of replies: 6

Hi,

I am experiencing following problem when I try to import activities from course:

I select Category -> Category -> Course; then Import -> Course -> types I want -> Activities I want -> and confirm import then I result in one of 4 states:

- it works (see below when)

- it results in nearly empty page (<html><head></head><body></body></html>)

- it fails with error/cannot_finish_ui_if_not_setting_ui

- it fails with error/setting_invalid_ui_label

(tested on 2.0 and latest 2.0.1+ build)

 

And here is my observation when it does not work:

If I delete any activity in the course from which I import before the improt -> Import fails

If I delete any activity in the course I would like to import to (before the import) -> Import fails

 

Please do you have any solution for me? (I have 18 courses with 7+ weeks and in each week I have the same 6 activities, so it is really not comfortable problem).

 

Thank you for any solution

 

Regards

Jiri

Average of ratings: -
In reply to Jiri Princ

Re: Import from course problem (2.0, 2.0.1)

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

Hi Jiri,

I've just tried searching the Moodle Tracker to see whether anyone else has reported the problem and found MDL-24361 and MDL-23559, both of which were fixed some time ago.

Can you enable developer debugging on your site (see the documentation Debugging) then create an issue for it in the tracker.

In reply to Helen Foster

Re: Import from course problem (2.0, 2.0.1)

by Jiri Princ -

Hi,

I turned it on.

There was lots of errors (but it just repeat following two statements). I am sorry I am putting it here, I do not know how to create issue for it in tracker (I do not have rights for it).

Regards

Jiri

Warning: call_user_func(backup_standardslideshow_activity_task::encode_content_links) [function.call-user-func]: First argument is expected to be a valid callback in /www/doc/moodle.pavelsad.com/www/backup/moodle2/backup_xml_transformer.class.php on line 113

Error: mdb->get_record() found more than one record!
  • line 1268 of /lib/dml/moodle_database.php: call to debugging()
  • line 1228 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
  • line 1208 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
  • line 394 of /backup/util/dbops/restore_dbops.class.php: call to moodle_database->get_record()
  • line 302 of /backup/util/dbops/restore_dbops.class.php: call to restore_dbops::prechek_precheck_qbanks_by_level()
  • line 135 of /backup/util/helper/restore_prechecks_helper.class.php: call to restore_dbops::precheck_categories_and_questions()
  • line 322 of /backup/controller/restore_controller.class.php: call to restore_prechecks_helper::execute_prechecks()
  • line 114 of /backup/import.php: call to restore_controller->execute_precheck()
In reply to Jiri Princ

Re: Import from course problem (2.0, 2.0.1)

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

I just came across a post in the discussion Backup throws "error/cannot_finish_ui_if_not_setting_ui" which suggests deleting the module Standardslideshow as a solution to the problem. Please provide feedback on whether this solves your problem too.

For future reference, to report a bug in the tracker, you first need to create a tracker account. Then when you login you'll see a "Create new issue" link.

In reply to Jiri Princ

Re: Import from course problem (2.0, 2.0.1)

by Michael Williams -

Hi Jiri,

You are not the only one with this problem.

We are using Moodle 2.0.2 and importing is really hit and miss.  Today I cannot import anything to any courses, just get a blank page for import.php.  When i refresh it i get the cannot complete ui when ui is not set.

I hope someone has some ideas on fixing this.  Each day i get different results when i try to import.

Here is a dump of my latest error.

Error: mdb->get_record() found more than one record!
  • line 1268 of \lib\dml\moodle_database.php: call to debugging()
  • line 1331 of \lib\dml\moodle_database.php: call to moodle_database->get_record_sql()
  • line 134 of \backup\moodle2\restore_qtype_plugin.class.php: call to moodle_database->get_field_sql()
  • line 131 of \backup\util\plan\restore_structure_step.class.php: call to restore_qtype_plugin->process_question_answer()
  • line 103 of \backup\util\helper\restore_structure_parser_processor.class.php: call to restore_structure_step->process()
  • line
    106 of
    \backup\util\xml\parser\processors\grouped_parser_processor.class.php:
    call to restore_structure_parser_processor->dispatch_chunk()
  • line
    91 of \backup\util\helper\restore_structure_parser_processor.class.php:
    call to grouped_parser_processor->postprocess_chunk()
  • line
    132 of
    \backup\util\xml\parser\processors\simplified_parser_processor.class.php:
    call to restore_structure_parser_processor->postprocess_chunk()
  • line
    92 of
    \backup\util\xml\parser\processors\progressive_parser_processor.class.php:
    call to simplified_parser_processor->process_chunk()
  • line 169 of \backup\util\xml\parser\progressive_parser.class.php: call to progressive_parser_processor->receive_chunk()
  • line 253 of \backup\util\xml\parser\progressive_parser.class.php: call to progressive_parser->publish()
  • line ? of unknownfile: call to progressive_parser->end_tag()
  • line 158 of \backup\util\xml\parser\progressive_parser.class.php: call to xml_parse()
  • line 137 of \backup\util\xml\parser\progressive_parser.class.php: call to progressive_parser->parse()
  • line 105 of \backup\util\plan\restore_structure_step.class.php: call to progressive_parser->process()
  • line 153 of \backup\util\plan\base_task.class.php: call to restore_structure_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 299 of \backup\controller\restore_controller.class.php: call to restore_plan->execute()
  • line 130 of \backup\import.php: call to restore_controller->execute_plan()



Fatal error:  Maximum execution time of 30 seconds exceeded in C:\inetpub\wwwroot\lib\moodlelib.php on line 1045



Fatal error:  sqlsrv_warnings contains an invalid type in C:\inetpub\wwwroot\lib\dml\sqlsrv_native_moodle_database.php on line 358



Fatal error:  sqlsrv_warnings contains an invalid type in C:\inetpub\wwwroot\lib\dml\sqlsrv_native_moodle_database.php on line 1306

In reply to Michael Williams

Re: Import from course problem (2.0, 2.0.1)

by JM Ferring -

Hello,

check the php variable max_execution_time (site administration-server-php..)

Set it to 3600 in the php.ini and restart your server.

This resolved for me this error while backing up/restoring.

J.

In reply to Helen Foster

Re: Import from course problem (2.0, 2.0.1)

by filo Quin -

Im have this problem in 2.0.4+when import a course

Excepción desconocida relacionadas con los archivos locales (Invalid file name)

Más información sobre este error

Stack trace:
  • line 787 of /lib/filestorage/file_storage.php: file_exception thrown
  • line 720 of /backup/util/dbops/restore_dbops.class.php: call to file_storage->create_file_from_pathname()
  • line 222 of /backup/util/plan/restore_structure_step.class.php: call to restore_dbops::send_files_to_pool()
  • line 60 of /mod/resource/backup/moodle2/restore_resource_stepslib.php: call to restore_structure_step->add_related_files()
  • line 359 of /backup/util/plan/restore_structure_step.class.php: call to restore_resource_activity_structure_step->after_execute()
  • line 108 of /backup/util/plan/restore_structure_step.class.php: call to restore_structure_step->launch_after_execute_methods()
  • line 153 of /backup/util/plan/base_task.class.php: call to restore_structure_step->execute()
  • line 179 of /backup/moodle2/restore_activity_task.class.php: call to base_task->execute()
  • line 148 of /backup/util/plan/base_plan.class.php: call to restore_activity_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()
and this warning
Warning: call_user_func() expects parameter 1 to be a valid callback, class 'backup_standardslideshow_activity_task' not found in /media/imagenes/spq/htdocs/meditm/backup/moodle2/backup_xml_transformer.class.php on line 113