Getting rid of modules

So you gave that module a go and it wasn't what you wanted. How can you get rid of it?

Getting ready

It is assumed you have your web server running, you have installed a module and now you want to say goodbye to it.

How to do it...

Activity modules (and usually integrations) and blocks can be deleted in two steps.

  • For activity modules, visit the Activities management page (Site Administration | Modules | Activities | Manage Activities). Click on Delete to remove all instances of the module in courses and any tables set up for the module.
  • For blocks, visit the Blocks management page (Site Administration | Modules | Blocks | Manage Blocks). Click on Delete to remove all instances of the block and any tables set up for the block module.
How to do it...

After deleting activity modules and blocks using the Site Administration interface, you still need to delete the code for these modules. If you don't remove the code, the module will be re-installed the next time you visit the Notifications page.

How it works...

As Moodle is modular and relies on many contributed modules to allow flexibility, the means of removing modules needs to be just as simple as adding them. With activity modules and blocks, that is the case. This covers most modules you will want to add. For other types of modules, removal is not so simple. To find out more, read on.

There's more...

Filters, course formats, assignment types, and question types need to be removed in special ways.

Removing filters

To remove a filter, first visit the Filters page (Site Administration | Modules | Filters | Manage Filters) and disable the filter (click on the eye icon). You are then free to remove the files for the filter from moodle/filter/ directory.

Removing course formats

To remove a course format, simply remove its directory from moodle/course/format/. If the format was in use and is no longer available, the format will revert back to a default. It might be wise to check which courses are using the format and set the format for those courses to an acceptable alternative before removing the course format.

Removing assignment types and question types

Unfortunately there is no clean way to remove an assignment type. It's an activity, but it's not an activity module that appears in the list of activities in the Site Administration section. Question types are also somewhat problematic to remove.

If the assignment type or question type is no longer needed, follow these steps.

  1. If you have a live site that services teachers and students, put the site in Maintenance mode (Site Administration | Server | Maintenance mode).
  2. Remove all instances of the assignment type or question type from courses.
  3. Manually remove the tables related to the module from the database. Take care not to remove other tables such as the 'assignment submissions table' which is used generally. If you are not sure about which tables to remove, don't remove any.
  4. Remove the source code.
  5. Take the site out of Maintenance mode.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.27.178