Totara Learn Open Discussions

How to manually install a plugin?

 
? ?
How to manually install a plugin?
بواسطة Monday, 20 January 2020, 2:33 PM - ? ?
 

Hi folks!

We're developing a local plugin but we're having some trouble installing it. Having created the directory and minimal files (version.php, db/install.xml), it is listed in the Plugins Overview as "To be installed". However there's no obvious way to do so. Furthermore, above it on said page is an information block which says "Totara does not include an add-on installer, all additional plugins must be installed manually by server administrators".

So how does one manually install a plugin?

? ?
Re: How to manually install a plugin?
بواسطة Tuesday, 21 January 2020, 9:14 AM - ? ?
 

On logging-in (as admin) I now get an initial screen which displays the un-installed plugin and prompts me to "upgrade". I'm not sure what changed to show me this screen now, but I may have somehow accidentally been circumventing it before. Anyway, I believe clicking "Upgrade" attempts to install the plugins, though doing so currently seems to fail. It complained that my plugin was in the wrong place, /local/zoomi instead of /mod/zoomi. In order to get passed that I moved the plugin to /mod/zoomi (though based on what I read it belongs in /local/zoomi). However now it complains that it is in /mod/zoomi and should be in /mod/zoomi! Confusing.



Sam Hemelryk
Re: How to manually install a plugin?
بواسطة Tuesday, 21 January 2020, 6:44 PM - Sam Hemelryk
مجموعة Totara

Hi Daniel,

Totara should automatically detect that code for a new plugin is present and prompt you to upgrade when you log in in your browser.
We recommend manually triggering the upgrade immediately after putting the plugin code in place.
This can be done by running the following CLI script:

    php admin/cli/upgrade.php

Please make sure you run it as the web user.
For Ubuntu for example you would most likely run

    sudo -u www-data php admin/cli/upgrade.php

In regards to the error, I suspect that is occurring because the $plugin->component in your version.php file is incorrectly set.
As its a local plugin it should be set to 'local_zoomi'.
Try that and let us know if it works.

Kind regards
Sam Hemelryk

? ?
Re: How to manually install a plugin?
بواسطة Wednesday, 22 January 2020, 7:55 AM - ? ?
 

That did the trick, thanks Sam!

Specifically, I changed the location back to being in the local directory (instead of mod) and changed the $plugin->component value from "zoomi" to "local_zoomi".

Thanks again!

Daniel Mannarino

Nikhil Bansal
Re: How to manually install a plugin?
بواسطة Tuesday, 2 June 2020, 2:09 AM - Nikhil Bansal
مجموعة Partners

Hi Daniel,

Did you find answer to your question? 

Moreover, We’re looking for answers how can we extend the functionality in the Totara app such as Create plugins/Extensions/API's.

What programming language is used for it/how we can integrate?  - Is it php? (that's what I understand as per your post).


Thanks, 

Nikhil