Restore courses from remote Moodles

Maintained by Céline Pervès
block my_external_backup_courses : Restore courses from remote moodle platforms my_external_backup_restore_courses is a Moodle block that enable a user to restore courses from external moodles this block must be installed in each moodle course clients and course servers involved
Price option: Free

Supports Moodle 3.0-4.5 See all versions
Latest release: 12 months ago
Installations: 110
Downloads (last 90 days): 85

Frankenstyle name: block_my_external_backup_restore_courses
Blocks

Comments

Comments are no longer open for new posts. Existing comments remain available to read.

Hello, I think it works on 5.x Moodles but did not have time to test it
you can try and if you have any troubles make an issue on git and i'll correct the code as soon as possible
Hello,
This is a great plugin that we use on all our educational platforms. Will there be a version for Moodle 5 soon?
Looking forward to your reply.
Great, thank you for your feeback
It works for me, thanks a lot !
I was taking the idnumber instead of the id, that's why I had these errors.
I published a version that correct the notification error trouble
If you have the latest version of the plugin , based on line number, you may have a trouble with default category id which is not filled in plugin settings
when sending error there is then an error due to user not found , i'm going to correct this
But now by correcting the defaultcategoryid the plugin will work for you
Hello,
I'm having trouble using this plugin. Here is the error message that appears in the Scheduled task list of external course restoration :
error/malformed default category parameter for block my_external_backup_courses, please contact adlministrator
Here is the log :
defaultcategoryid not defined for my_external_backup_restore_courses plugin, please correct this.
... used 2 dbqueries
... used 0.0058751106262207 seconds
Scheduled task failed: tâche du plugin restaurer vos cours depuis des Moodle distants (block_my_external_backup_restore_courses\task\backup_restore_task),error/user not found
Backtrace:
* line 432 of /blocks/my_external_backup_restore_courses/locallib.php: call to block_my_external_backup_restore_courses_task_error_list->notify_errors()
Is there any setting to be made in the database(s) to link them?
Thanks in advance for your help
do you really have a course category with id=1?
Here is the log:
xecute scheduled task: Restore course from remote Moodles task (block_my_external_backup_restore_courses\task\backup_restore_task)
... started 12:00:27. Current memory use 22.8 MB.
... used 7 dbqueries
... used 420.79239416122 seconds
Scheduled task failed: Restore course from remote Moodles task (block_my_external_backup_restore_courses\task\backup_restore_task),Error al leer de la base de datos
Debug info:
MySQL server has gone away
SELECT * FROM mdlsb_course_categories WHERE id = ?
[array (
0 => '1',
)]
Backtrace:
* line 291 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end()
* line 1273 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->query_end()
* line 1671 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
* line 1643 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
* line 1622 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
* line 1872 of /backup/util/dbops/restore_dbops.class.php: call to moodle_database->get_record()
* line 650 of /blocks/my_external_backup_restore_courses/locallib.php: call to restore_dbops::create_new_course()
* line 513 of /blocks/my_external_backup_restore_courses/locallib.php: call to block_my_external_backup_restore_courses_task->restore_course_from_backup_file()
* line 41 of /blocks/my_external_backup_restore_courses/classes/task/backup_restore_task.php: call to block_my_external_backup_restore_courses_task_helper::run_automated_backup_restore()
* line 253 of /lib/cronlib.php: call to block_my_external_backup_restore_courses\task\backup_restore_task->execute()
* line 120 of /lib/cronlib.php: call to cron_run_inner_scheduled_task()
* line 73 of /lib/cronlib.php: call to cron_run_scheduled_tasks()
* line 81 of /admin/cron.php: call to cron_run()
!!! Error al leer de la base de datos !!!
Debug info: MySQL server has gone away
SELECT RELEASE_LOCK(?) AS unlocked
[array (
0 => 'de655ed6b632008963cb8f4d1559dc47a14f389a',
)]
Error code: dmlreadexception
Stack trace: * line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
* line 291 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end()
* line 1273 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->query_end()
* line 1671 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
* line 161 of /lib/classes/lock/mysql_lock_factory.php: call to moodle_database->get_record_sql()
* line 107 of /lib/classes/lock/lock.php: call to core\lock\mysql_lock_factory->release_lock()
* line 130 of /lib/cronlib.php: call to core\lock\lock->release()
* line 73 of /lib/cronlib.php: call to cron_run_scheduled_tasks()
* line 81 of /admin/cron.php: call to cron_run()
May be a trouble while backup or restore a course
You can look at the logs
Passing by administrator tool you can change the problematic backup/restore course status to new for retrying to backup/restore it
I have some courses stuck in progress status, what can I do?
Hello, this plugin is based on the fact that you ask for restoration of the courses your are enrolled in with a particular role.
This role is set in the plugin settings
But as a Moodle admin you can restore courses for other people based on the courseid thanks to the admin page :
Site Administration -> Blocks -> Restore courses from remote Moodles -> Restore course for user
One course can be restored from its id
Hello, I have successfully tested the migration of a few courses with the editingteacher role but is it possible for a moodle admin or a member of another system role to migrate all the courses of a Moodle without necessarily being registered in them? What should the parameters be in this case?
I'll try to help you within your github issue
No external Moodle connected, this option appears and I already followed the steps . in moodle 3.9