Skip to content

catalyst/moodle-tool_advancedreplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

moodle-tool_advancedreplace

This is a Moodle plugin that allows administrators to search and replace strings in the Moodle database.

Administrators can search and replace strings in tables and columns of the Moodle database. They can use simple text search or regular expressions.

GDPR

The plugin does not store any personal data.

Branches

Moodle version Branch PHP
Moodle 4.1+ MOODLE_401_STABLE 7.4+

Installation

  1. Install the plugin the same as any standard Moodle plugin, you can use git to clone it into your source:

    git clone [email protected]:catalyst/moodle-tool_advancedreplace.git admin/tool/advancedreplace
    

Examples

Find all occurrences of "http://example.com/" followed by any number of digits on tables:

cd admin/tool/advancedreplace/cli/
php find.php --regex-match="http://example.com/\d+" --output=result.csv

Find all occurrences of "http://example.com/" in a table:

php find.php --regex-match="http://example.com/\d+" --tables=page --output=result.csv

Find all occurrences of "http://example.com/" in multiple tables:

php find.php --regex-match="http://example.com/\d+" --tables=page,forum --output=result.csv

Find all occurrences of "http://example.com/" in different tables and columns:

php find.php --regex-match="http://example.com/\d+" --tables=page:content,forum:message --output=result.csv

Find all occurrences of "http://example.com/" in all tables except the ones specified:

php find.php --regex-match="http://example.com/\d+" --skip-tables=page,forum --output=result.csv

Find all occurrences of "http://example.com/" in all columns except the ones specified:

php find.php --regex-match="http://example.com/\d+" --tables=page --skip-columns=intro,display --output=result.csv

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages