auto upgrade dataset in moodle.

auto upgrade dataset in moodle.

by hamza khalem -
Number of replies: 3
hello guys, wish you doing fine, 
every time i add a plugin to my website i have to pass the pages of continue etc.
there is a ay to pass this pages and auto upgrade the database with the new plugin without repeat each time those steps.
thank you
Average of ratings: -
In reply to hamza khalem

Re: auto upgrade dataset in moodle.

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

If you're looking to automate this use the command line:

  1. Extract the plugin source code into the expected location.
  2. Run the upgrade script, admin/cli/upgrade.php.

To upgrade a plugin remove the existing plugin folder before step 1.

In reply to Leon Stringer

Re: auto upgrade dataset in moodle.

by hamza khalem -
thank you Leon ,
another question if you may, can i lunch the script automatically once i upload the plugin ?
In reply to hamza khalem

Re: auto upgrade dataset in moodle.

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

You can write a script which downloads and extracts the plugin, and then launches upgrade.php.

Average of ratings: Useful (1)