Is there a way to automatically upgrade moodle?

Is there a way to automatically upgrade moodle?

by Ram Freedman -
Number of replies: 28

Hi,
Is there any way to automatically update moodle?

Also - is there a way to get the "There is a newer Moodle version available!" by email to the site admin?

Now I need to go to the   Site administration > Notifications to check if there is a new version - and then to manually upgrade my moodle. 

If there is a way to automatically upgrade moodle without the manual part - it will be superb.

Regards,
Ram


Average of ratings: -
In reply to Ram Freedman

Re: Is there a way to automatically upgrade moodle?

by Ken Task -
Picture of Particularly helpful Moodlers

"automatically update moodle" ... yep, but would require command line scripts.  No Admin GUI plugin/addon of which am aware.

But ... not sure it's wise ... especially when there are requirements for higher version of PHP and/or MySQL/Mariadb.

/admin/settings.php?section=updatenotifications

/admin/roles/admins.php
if user is made admin, they should get notifications via email.

'SoS', Ken


Average of ratings: Useful (1)
In reply to Ken Task

Re: Is there a way to automatically upgrade moodle?

by Ram Freedman -
Dear isvanath Ratnaweera and Ken Task - Thanks for your answer.

As mentioned several times by other users - I think that adding a GUI automatic update optional feature will be really helpful.
I'm using several other systems - with very sensitive data (WHMCS for example) that have an option to initiate an "automatic" update as explained here. 

I think that adding such an option to Moodle will help a lot. 

Regards,
Ram
In reply to Ram Freedman

Re: Is there a way to automatically upgrade moodle?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Yes, yes. Many happy people and hundreds of thousands of stranded users. Educational institutions crashed - even without Corona. sad

You didn't read the long version, right? For example https://moodle.org/mod/forum/discuss.php?d=403260#p1627551.
In reply to Visvanath Ratnaweera

Re: Is there a way to automatically upgrade moodle?

by Ram Freedman -
I read the long version as well as the short one.
I understand there is a risk - but as I mentioned before - there are lots of other systems that have an update option - system with sensitive information that is business critical.
Any way - thanks!
In reply to Ram Freedman

Re: Is there a way to automatically upgrade moodle?

by Ken Task -
Picture of Particularly helpful Moodlers

Hmmm ... devils advocate hat ... automated 'system with sensitive information that is business critical' ... over the last 5 years or so major breaches have occurred ... as well as major events ... ref HP Oil Spill in Gulf (further back than 5 years?). 

When it's finally known what was cause, interesting findings.    Yep there is always risk ...

'SoS', Ken

In reply to Ram Freedman

Re: Is there a way to automatically upgrade moodle?

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers
Ram, I forget if my videos have been helpful to you. In one video, I show how to do a simple upgrade, using the cPanel tool. The general concept of upgrade could be done with other tools.

See https://moodle.org/mod/forum/discuss.php?d=401983#p1621924.

By now I think that you understand that Moodle does not have a simple "upgrade" button.
Average of ratings: Useful (2)
In reply to Rick Jerz

Re: Is there a way to automatically upgrade moodle?

by Ram Freedman -
Hi Rick.
Thanks for the video and help.
Ram
In reply to Ram Freedman

Re: Is there a way to automatically upgrade moodle?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
You're right. Moodle is a great piece of software. But in this aspect Moodle lags behind the others.

You got the software free. You got a hoard of assistance free. This is the chance to change it. Make one, and publish it under an Open Source licence!

I know, you are new. But there is no hurry. Eighteen years have passed without it, we can wait another year.
smile
In reply to Ram Freedman

Re: Is there a way to automatically upgrade moodle?

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

BUT, and this is a biggy and I say this from having used a lot of systems with sensitive info, I would bet my next paycheck those,"system with sensitive information that is business critical" do not have to support 1,689 different plugins created by 949 different developers! NOTE: safe bet as I am retired and do not get a paycheck anymore. 😉

Average of ratings: Useful (2)
In reply to AL Rachels

Re: Is there a way to automatically upgrade moodle?

by Ram Freedman -
Hi,
You are right - there are only 1191 apps and integrations in the official plugin library and lots more in the hundreds of developers out side the official site.
In reply to Ram Freedman

Re: Is there a way to automatically upgrade moodle?

by Ken Task -
Picture of Particularly helpful Moodlers

Please research (on your own) revenue stream for open sourced Moodle.

Providers have cPanal/WHM but it looks like WHMCS is a plugin/addon for WHM ... maybe you should talk to your provider.  OR start your own hosting for Moodle ... a non-blessed quasi-MoodlePartner (part of that 'revenue stream' mentioned above).

WHCMS - does claim:

"All the tools you need to start a web hosting business today"

And all you have to do then is inspect current Moodle code for 'environment' checks ... and Git for Moodle Admins:

https://docs.moodle.org/38/en/Git_for_Administrators

Maybe your provider needs to replace Softactulous (if they offer that addon to cPanel) with WHCMS.  As I undestand them, cPanel/WHM is perl based and there are plugins that each could have installed - for a fee.

And here's a biggy ... the 'customer' that has delayed updating or upgrading their Moodle for years ... still running 1.9.x ... and wanting now to upgrade all the way to 3.8.x (latest and greatest).  So just how far back to 'legacy' would WHCMS support?

Not discouraging you here ... go forth ... figure WHCMS out ... and you could make a lot of $'s!  You could become part of that 'revenue stream' mentioned.

'SoS', Ken


In reply to Ken Task

Re: Is there a way to automatically upgrade moodle?

by Ram Freedman -
Hi,
I'm not in the business of developing or hosting... I'm in the education market smile
I'm using WHMCS as a CRM and billing system - the only reason I mentioned them was as an example of a system that is business critical that have a autoupdate feature.

Regarding upgrading from old version - I'm sure this is something that can be achieved - manual upgrade till certain version and then autoupdate for future versions or any other way.

Thanks and regards,
Ram
In reply to Ram Freedman

Re: Is there a way to automatically upgrade moodle?

by Ken Task -
Picture of Particularly helpful Moodlers

I too am from the 'Education Market' ... in that 'market' there have been many K12 entities that left Moodle and have never looked back when Google Classroom was released.

Just prior to that, these forums dropped a K12 forum ... reason ... lack of use - from what I re-call.

And Howard has asked a very good question ... please do answer that one! smile

Again ... not discouraging you ... go forth ... and please do some research on your own about 'revenue stream'.

'SoS', Ken


In reply to Ram Freedman

Re: Is there a way to automatically upgrade moodle?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Simple question - would you press the "update now" button on a live, critical Moodle site?
In reply to Howard Miller

Re: Is there a way to automatically upgrade moodle?

by Ram Freedman -
Hi Howard,
I'm doing my first steps with moodle - so I can't answer that question about moodle.
But I have other systems (such as WHMCS that have "automatic" update as explained here) that I'm updating via such buttons.
I have backup of the DB before doing so - and (knock on wood) it's working without a problem (more or less).
So in general my answer is - Yes I would press such a button.
Regards,
Ram
In reply to Ram Freedman

Re: Is there a way to automatically upgrade moodle?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
...and you would take a backup first, just in case it went wrong?

Anyway, it exists. It's called Softaculous wink

I'm not being very constructive. I think that such a button encourages risky behaviour. Is it any more risky than following the upgrade instructions and overwriting your Moodle code? Unsure? Does it strongly encourage bad file security - undoubtedly yes.

My view is that we should at least encourage a "best practice" of having a test site and testing the upgrade someplace else. Then you are copying over code (along with your chosen plugins) that you know works. Maybe I should just write the damn upgrade plugin and have done with it wink
Average of ratings: Useful (1)
In reply to Ram Freedman

Re: Is there a way to automatically upgrade moodle?

by Ken Task -
Picture of Particularly helpful Moodlers

It appears that WHMCS and "automatic" update is programmable ... by the opt .... ie, you.

Where you host, Ram, do they have WHMCS available to you?

Hmmmm ...

From:
https://docs.whmcs.com/Automatic_Updater#Checking_for_Updates

Performing an Update

1. Begin by making sure your server meets the system requirements,

2. Before beginning any update, it is strongly recommended to make a full backup of your current installation and review the Release Notes for any important notices and information.

3. To perform an update, navigate to Utilities > Update WHMCS and click the Update Now button

Please note this option will only show if an update is available based on your current Update Channel Preferences.

4. You will then be guided through the update process. The update process can take anywhere from 30 seconds to a few minutes to complete.

5. Once completed a message is displayed on-screen. If you have custom template files you will also need to review and make any necessary changes to your custom templates using the information provided in the Template Changes section of the Release Notes.

More hmmmm ... compare:

https://docs.moodle.org/38/en/Upgrading

Comment: Wonder if Softaculous is WHMCS?

https://www.softaculous.com/apps/educational/Moodle

https://www.softaculous.com/board/index.php?tid=4141

Mox nix to me .... bash shell up script that does site backup just prior to updating a moodle via git and using already provided php scripts in code/admin/cli/

We all pick our paths ...

'SoS', Ken


In reply to Ken Task

Re: Is there a way to automatically upgrade moodle?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I'll bite.... WHCMS is what?
In reply to Howard Miller

Re: Is there a way to automatically upgrade moodle?

by Ken Task -
Picture of Particularly helpful Moodlers

It's what the OP (Ram) linked to.

According to:
https://developers.whmcs.com/about/

About WHMCS

WHMCS is a web host billing & automation platform.

Launched in 2005, today WHMCS is the market leading platform of choice for Web Hosting Providers and Domain Registrars to automate and manage their businesses.
... WHMCS provides a single centralized platform for web hosting businesses to manage their operations, making every day tasks quicker, easier, and more efficient.
With over 10 years experience and development, a large and active developer community, and our commitment to responding to user requests and leading the way with the latest web hosting technologies and developments, WHMCS is a rich and powerful platform that sets the standard in web host billing automation.


Located in Houston, Tx. if that makes a diff.

 Didn't see any true definition of what WHMCS means ... web hosting management CS (computer systems)?

'SoS', Ken

In reply to Ken Task

Re: Is there a way to automatically upgrade moodle?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I think the idea is that if you want to get into web hosting you can buy this and off you go.

I'm not sure that it's relevant to Moodle. Unsure....
Average of ratings: Useful (1)
In reply to Ken Task

Re: Is there a way to automatically upgrade moodle?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
> "automatically update moodle" ... yep, but would require command line scripts.

Ha, ha, ha! We are talking of the "upgrade my Moodle" button.
In reply to Visvanath Ratnaweera

Re: Is there a way to automatically upgrade moodle?

by Ken Task -
Picture of Particularly helpful Moodlers

@Visvanath

I have a personal/home grown non official local 'snapshot' (as it used to be referenced in notification screens of Moodle) and a local 'up' ... a non-official plugin that never needs updating which does 'update' a moodle within  a series of Moodle - like 3.x.pointrelease.   Not a 'button' ... but works none the less.

No won't provide info as admin OP would have to have farily good understanding of hosting environment/OS ... which folks looking for the 'easy button' wouldn't have and probably desire not to learn.

Oh, well! :|

'SoS', Ken

In reply to Ram Freedman

Re: Is there a way to automatically upgrade moodle?

by Ram Freedman -
Hi all,
After reading your comments I feel that I stumbled in to a sensitive issue for you all.

I see from your replies that you are strongly against this idea and that you think that all the other systems that enable such an option (please note that this is optional) are hazards that one should not use and that all the developers out there that implemented such a solution are bad ones and that moodle is the best practice for how to update the system.

I know that I'm in minority opinion - but I think differently and although I'm only a beginner in moodle - I do have some good experience with other systems that works great and offer automatic update. Yes there is a risk, and yes you should always test it on a dev server - but it is so much easier when it's automatic or semi automatic process.

I'm sure that some of Moodle users are not updating their system because this is a cumbersome process - and thus stay in an old moodle system which is less secured and this is also a security risk to think about.

Any way - Please accept my sincere apologies.
I'm sorry if my question was stupid and if you feel there is no need for such an option in moodle and that the current way is the only sensible way to work.
I meant no disrespect for you and the superb help and support for newbies such as me.

Please do continue helping me when you can.

Regards,
Ram
Average of ratings: Useful (1)
In reply to Ram Freedman

Re: Is there a way to automatically upgrade moodle?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Not at all - it's an interesting discussion.

I am not at all against the idea, but I have been around these forums a LONG time and I can see all sorts of risks. However, I am not sure that they are any different to the disasters people get themselves into anyway.

My concern is that it just makes the process *too* easy. That is, you can click the upgrade button with no thought for any issues you may have. That just means a potential solution needs to be clever.
In reply to Ram Freedman

Re: Is there a way to automatically upgrade moodle?

by Ken Task -
Picture of Particularly helpful Moodlers

"...some of Moodle users are not updating their system because this is a cumbersome process..."

In 100% agreement there!   It's the reason things like Softac made their appearance and continue.

But, like others have said, has to be 'clever' and Softac hasn't proven to be in navigating what for some users (not all) became a 'perfect storm' (php/mysql upgrade requirements at appropriate times along a 'march' moodle code).

It's always good to seek a 'better mouse trap' ... especially considering global situation with Covid19.  So no reason really to apologize.  Gotta be a little 'custy' when in forums. smile

'SoS', Ken

In reply to Ram Freedman

Re: Is there a way to automatically upgrade moodle?

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

'Any way - Please accept my sincere apologies.

None required

I'm sorry if my question was stupid 

No, it was a good and very reasonable question, and an "Upgrade me now button" would be nice.

However in my experience of many years, upgrading Moodle is straightforward and most issue come from ensuring that plugins work correctly with the upgraded version.  I wrote a blog post about this a while ago which you can read here

https://www.tituslearning.com/upgrading-moodle-is-easy-with-titus-learning/