LafColITS / moodle-tool_deletecourses

Moodle plugin which allows managers to delete all courses in a category (including subcategories).
7 stars 6 forks source link

Possible caching issue #6

Open mackensen opened 7 years ago

mackensen commented 7 years ago

Stack trace observed when the deletion of 900+ courses in 60 subcategories was in progress:

Debug info: Argument 1 passed to course_in_list::__construct() must be an instance of stdClass, null given, called in [dirroot]/lib/coursecatlib.php on line 1508 and defined
Error code: codingerror

Trace:

Stack trace: 
line 426 of /lib/setuplib.php: coding_exception thrown
line 2788 of /lib/coursecatlib.php: call to default_error_handler()
line 1508 of /lib/coursecatlib.php: call to course_in_list->__construct()
line 524 of /course/classes/management_renderer.php: call to coursecat->get_courses()
line 498 of /course/management.php: call to core_course_management_renderer->course_listing()

This was triggered by viewing a subcategory in the category management page. My guess is that it expected courses which no longer exist. After a few minutes the category page can be refreshed and loads without error (and no courses).

mackensen commented 7 years ago

I'm still observing the problem; I'm unsure if this is a core bug or if it points to a flaw in the deletion procedure the tool is using.

kwiliarty commented 7 years ago

I also see what I assume is the same problem. It's not a big deal, but I'm wondering if you believe 82e08878abbe76f7c78e14e78ee7812c3af169dc addresses the issue.

mackensen commented 7 years ago

I didn't merge it so I'm thinking that it didn't resolve it.

kwiliarty commented 7 years ago

Okay. It's not a major problem, and as you point out it eventually resolves itself. Thanks for this helpful tool.