UNIMOODLE / moodle-local_coursetransfer

Lote P3.2 - Restauración de cursos entre plataformas
2 stars 2 forks source link

Functionality 3. Admin Moodle CLI script to restore a course group or a category or delete a course or a category using functionalities 1 and 2 #4

Closed mapemo4 closed 1 week ago

mapemo4 commented 4 months ago

All CLI commands work except restore_category. In all of them the original parameter should be optional, it is now mandatory.

  1. The CLI command fails since it's trying to restore, it's displaying the following error:

php restore_category.php --site_url=https://moodlerec.uv.es --origin_category_id=332 --origin_enrolusers=false --origin_remove_category=false --origin_schedule_datetime=1706174700 Scheduler Time: Thursday, 25 January 2024, 11:25 AM

40001: You don't have permission to view this list of courses.

php restore_category.php --site_url=https://moodlerec.uv.es --origin_category_id=332 --origin_enrolusers=false --origin_remove_category=false --origin_schedule_datetime=1707400620; Scheduler Time: Thursday, 8 February 2024, 2:57 PM 40001: You don't have permission to view this list of courses.

  1. When attempting to remove a course or a category from the remote source or destination, you may encounter the following errors (in Catalan language):

php remove_course.php --site_url=https://moodlerec.uv.es --origin_course_id=57047 --origin_schedule_datetime=1706263200

Scheduler Time: divendres, 26 de gener 2024, 11:00 [{"code":"16010","msg":"No teniu perm\u00eds per veure aquesta llista de cursos."}]

php remove_course.php --site_url=https://moodlerec.uv.es --origin_course_id=57047 --origin_schedule_datetime=1707400620; Scheduler Time: Thursday, 8 February 2024, 2:57 PM [{"code":"16010","msg":"No teniu perm\u00eds per veure aquesta llista de cursos."}]

php remove_category.php --site_url=https://moodlerec.uv.es --origin_category_id=166 --origin_schedule_datetime=1706263200

Scheduler Time: divendres, 26 de gener 2024, 11:00 [{"code":"16000","msg":"No teniu perm\u00eds per veure aquesta llista de cursos."}]

php remove_category.php --site_url=https://moodlerec.uv.es --origin_category_id=166 --origin_schedule_datetime=1707402240 Scheduler Time: Thursday, 8 February 2024, 3:24 PM [{"code":"16000","msg":"No teniu perm\u00eds per veure aquesta llista de cursos."}]

  1. Regarding the display of logs, the type is incorrect. On the other hand, the original date should be displayed in a readable format.
xpazv commented 4 months ago

In review.

xpazv commented 4 months ago

Checking permission issues