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
Comments
Comments are no longer open for new posts. Existing comments remain available to read.
"Database table name where category informations are stored" = 'course_categories".
"Database table foreign key for category id" = 'idnumber'.
That makes sense. But what should be set for:
"Unique database table field that represent category..."
Since id can't be garanted to be the same (since generated by database) two make the category retreieving to work you need a field with this unique value. I suggest to put idnumber.
I can put what you ask as default values for settings since it would be a default case
If these settings are intended to override using standard Moodle tables, it would be best if they defaulted to what would be used in a standard Moodle install.
So, I think it would be:
"Database table name where category informations are stored" = 'course_categories".
"Database table foreign key for category id" = 'id'.
""Unique database table field that represent category..." = ?? (I don't know what this would be)
last thing the database related setting fields will in fact enabling you (if activated) to restore a given course in its original category found in the local system and corresponding to the original one
If I understand you well, I'll have to put tool_my_external_backup_restore_courses_admin in the block plugin distribution?
Mike, the settings fields concerning database are the most generic fields I found to model unique indentification of category between 2 Moodle.
This is our example of integration
In our architecture where have 2 Moodle.
In each Moodle , course categories are field thanks to a home made ETL that create/update and delete all course categories
So for a given category course_categories ids will be different in each Moodle, so we need an other unique field common in the 2 Moodles
We created an additional table course_category_types
this have following fields :
catgoryid (foreign key), code (unique code in our information system)
So in block settings :
block_my_external_backup_restore_courses | categorytable is course_category_types
block_my_external_backup_restore_courses | categorytable_foreignkey is cateogryid
block_my_external_backup_restore_courses | categorytable_categoryfield is code
But you can imagine other architectures such like
block_my_external_backup_restore_courses | categorytable with course_categories
block_my_external_backup_restore_courses | categorytable_foreignkey id
block_my_external_backup_restore_courses | categorytable_categoryfield with idnumber
I'm gonna try to explain that in readme file
Please note that the other plugin tool_my_external_backup_restore_courses_admin has this one as a dependency so it will work best if they both are checked together. Thanks in advance.
https://integration.moodle.org/job/Precheck%20remote%20branch/28139/artifact/work/smurf.html