Plugin update rollback question

Plugin update rollback question

by Jason Lane -
Number of replies: 5

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: -
In reply to Jason Lane

Re: Plugin update rollback question

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin 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. 

In reply to Howard Miller

Re: Plugin update rollback question

by Jason Lane -

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

In reply to Jason Lane

Re: Plugin update rollback question

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

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)
In reply to Marcus Green

Re: Plugin update rollback question

by Jason Lane -

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)
In reply to Jason Lane

Re: Plugin update rollback question

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

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)