I am developing a plugin, but reinstall it everytime to test it is too much time-consuming.

Re: I am developing a plugin, but reinstall it everytime to test it is too much time-consuming.

ដោយ Davo Smith នៅ
ចំនួនតប៖ 3
រូបភាព Core developers រូបភាព Particularly helpful Moodlers រូបភាព Peer reviewers រូបភាព Plugin developers

It really depends what sort of changes you are making.

If you're changing the database definition, then the XMLDB editor (which you should always use to generate the install.xml file) can also generate statements to go in the upgrade.php file - so just put them in there, bump the version number and visit the notifications page, to run the upgrade.

If you're changing capability definitions, message providers, event handlers or any of the other definitions that sit inside the db/ subdirectory, then just bump the version number and visit the notifications page.

If you're changing language strings or styles, then purge caches (site admin > developer > purge caches) OR, if you can run command line scripts, "php admin/cli/purge_caches.php" (which I run a lot during development).

If it's just a change in the code itself (which doesn't require a change to the database structure or the caches), then just save the changes (assuming you are working with a local server, if it is a remote server you'll need to upload them as well) and refresh the page - the changes should appear immediately.

មធ្យមភាគនៃរង្វាយតម្លៃ:Useful (11)
ឆ្លើយតបទៅកាន់ Davo Smith

Re: I am developing a plugin, but reinstall it everytime to test it is too much time-consuming.

ដោយ Mark Johnson នៅ
រូបភាព Core developers រូបភាព Particularly helpful Moodlers រូបភាព Peer reviewers រូបភាព Plugin developers
Just one other thing to add, if you do genuinely want to check that the plugin installs correctly, if you set up PHPUnit or Behat testing, running the init.php script after bumping the version number will drop the testing database and reinstall the whole system in one command.
មធ្យមភាគនៃរង្វាយតម្លៃ: -
ឆ្លើយតបទៅកាន់ Davo Smith

Re: I am developing a plugin, but reinstall it everytime to test it is too much time-consuming.

ដោយ Rachel Martin នៅ

I agree here.  I rarely have to reinstall a plugin to update it.  Just update your code, save the changes, and purge the cache.

មធ្យមភាគនៃរង្វាយតម្លៃ: -
ឆ្លើយតបទៅកាន់ Davo Smith

Re: I am developing a plugin, but reinstall it everytime to test it is too much time-consuming.

ដោយ Lawrence Lagerlof នៅ

You helped me a lot. Thank you.

មធ្យមភាគនៃរង្វាយតម្លៃ: -