Installing and upgrading help

Plugin update rollback question

 
Picture of Jason Lane
Plugin update rollback question
 

Hello, I'm stuck in an upgrade plug-in screen. I was upgrading plugins and chose to upgrade 'gapfill' question type from ver 2006082518 on Moodle 2.9 (Build: 20150511). By the time the red flag came up regarding the Moodle version required I could not go back. I'm still stuck in this plugin screen.

Can I:

1. Download the old version - I have located it.

2. Overwrite the contents of the folder where the new update is sitting.

Will this reverse the upgrade or do nothing at all?

Any other solutions welcome.

Thank you,

Jason

 
Average of ratings: -
Picture of Howard Miller
Re: Plugin update rollback question
Core developersDocumentation writersParticularly helpful MoodlersPlugin developers

You've not really explained your problem fully. Do you mean that you updated the plugin code but mistakenly for too new a version of Moodle? If so, just replace the plugin code with the correct version. You should be fine. 

 
Average of ratings: -
Picture of Jason Lane
Re: Plugin update rollback question
 

Thank you Howard, sorry about the brief issue description! I can do better...

What I did: 

1. Run the usual plugin checks.

2. Updated available plugins via the plugin overview page.

3. All plugins "passed" the checks except for the gapfill question type. It stated it needs a newer version of Moodle which I don't want to upgrade to yet. I keep getting stuck at the plugin upgrade where the system cannot go forward due to the incompatibility of this new plugin. (I'm surprised it allowed me to upgrade this plugin - I have raised this with the developer already).

So I have checked the /question/type/gapfill directory - it contains all new files dated a few hours ago. These I assume are the folders/files triggering the update for this plugin.

What I propose to do is: 

a. rename the /question/type/gapfill folder to /question/type/_gapfill_backup

b. Upload the previous package again as a zip file via this URL: (mysite)/admin/tool/installaddon/index.php

c. since I've renamed/backed up the newer version it should hopefully cancel the upgrade.

Do you think this will resolve?

Many thanks,

Jason

 
Average of ratings: -
Picture of Marcus Green
Re: Plugin update rollback question
Core developersParticularly helpful MoodlersPlugin developersTesters

HI Jason

Contact me directly via one of the methods I have mentioned in the Github thread or however you want and I will try to talk you through resolving this. I am very aware from your other thread that you have a lot of instances of the gapfill question type. 

 
Average of ratings: Useful (1)
Picture of Jason Lane
Re: Plugin update rollback question
 

Many thanks to you Marcus! Marcus is passionate about his product and was very helpful over Skype with suggestions, scenarios and work arounds. The issue was resolved by changing line 21 in question/type/gapfill/version.php:

$plugin->requires 2015051100; // Moodle 2.9.9

After saving the version.php file the error cleared and the 'Update Moodle Database' function worked. 

It is worth noting that this solution was specific to a very old Moodle installation and may not work for all - if  any - other older Moodle sites.

This is a great example of the power of the wonderful Moodle community. With developers like Marcus scanning the threads we are in very good hands.

 
Average of ratings: Useful (1)
Mary Cooch
Re: Plugin update rollback question
Documentation writersMoodle Course Creator Certificate holdersMoodle HQParticularly helpful MoodlersTestersTranslators

This is a great example of the power of the wonderful Moodle community. With developers like Marcus scanning the threads we are in very good hands.

Nice one, Marcus.

 
Average of ratings: Useful (1)