LafColITS / moodle-tool_deletecourses

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

Cannot locate delete link #12

Closed jmayermsi closed 5 years ago

jmayermsi commented 5 years ago

After installing the plugin I am unable to find the link even after following the instructions listed here. Is there an alternative method to delete using your module?

andyzito commented 5 years ago

I've got a screenshot here of where the link should be located. This is on a category page, URL like <mymoodle>/course/index.php?categoryid=<categoryid>. You can get to a category page on your own site by manually entering this URL, or by following the main course navigation.

(screenshot blurred because it's from our internal Moodle)

screenshot-moodle lafayette edu-2019 09 20-09_39_23

Please check for the link here, and if you still cannot see it, we can troubleshoot further.

jmayermsi commented 5 years ago

Thanks for posting, unfortunately, my screen doesn't display like this. I think the theme is causing the issue. Even when I use the URL schema you posted there is no method to do this. Initially, I assumed you could access from the Manage Courses section in the admin but it's not listed there either.

andyzito commented 5 years ago

Hm, ok. Would it be possible for you to post or message me a screenshot of what you are seeing?

jmayermsi commented 5 years ago

course-delete2

jmayermsi commented 5 years ago

Clicking the gear doesn't show your link

andyzito commented 5 years ago

Your screenshot includes gear icons for individual courses. You need the gear icon for the whole category rather than one individual course. It's difficult for me to direct you there without knowing your theme -- could you add a screenshot of the whole page?

jmayermsi commented 5 years ago

That's actually the point I was trying to make, this theme (remui) doesn't list the categories, only the courses. The only way I can see the categories is inside the manage categories and courses section of the admin.

andyzito commented 5 years ago

Hmmm. I see. It's unfortunate that RemUI has chosen to hide the category navigation -- I would be inclined to report that to them as a bug/degradation, since it's a major piece of navigation that they're hiding from the user.

Obviously that doesn't help you in the short term, though. For a workaround, I think you should be fine just manually going to the URL for the deletion page: <mymoodle>/admin/tool/deletecourses/delete.php?category=<categoryid>

Please let me know if that works for you :)

jmayermsi commented 5 years ago

Perfect, thank you for that link, that will work. Thanks for your help, just need to see if the cron job removes the courses

andyzito commented 5 years ago

Glad I could help.

jmayermsi commented 5 years ago

After running a delete of a category I got this error:

Exception - Argument 1 passed to course_in_list::__construct() must be an instance of stdClass, null given, called in [dirroot]/lib/coursecatlib.php on line 1559

I don't see any courses in the category but when I view the category this error displays

andyzito commented 5 years ago

What version of Moodle are you using?

jmayermsi commented 5 years ago

3.41

jmayermsi commented 5 years ago

It may be working, the classes periodically show in the category. I can see some have been deleted. WHen I refresh the category the error message is intermittent with the list of classes.

jmayermsi commented 5 years ago

Courses look they are deleted now, but when they are in the process of being deleted the categeory displays that error when viewing the category

mackensen commented 5 years ago

@jmayermsi It sounds like you're encountering the caching issue described in #6.

jmayermsi commented 5 years ago

Yes this is the issue, eventually, the errors are resolved.