Can't login to Moodle after Git upgrade 3.5 to 3.6 "Error reading from database"

Re: Can't login to Moodle after Git upgrade 3.5 to 3.6 "Error reading from database"

by Michael Rupp -
Number of replies: 2

F.Y.I. final update.

Something seriously wonky was going on with mine despite the flawless upgrade and a new empty database, but login issues went away. I assume the login issues for me was that ad-hoc conversion from MySQL to MariaDB. From the start, I mentioned that "mod_assignemnt" error and it was a big problem for me today. I didn't know it at first because I had no error messages about it anymore. After what I outline below, I realize moving the "mod_assignment" folder back in was a crucial error.

No course restore attempt was working properly; my 1st attempt was stuck over 9 hours. I couldn't delete after the frozen restore either because the restore was in limbo. I tried many permutations with many different sourced backup files as well as module partitioned backups. I had to manually remove the rows in the appropriate MariaDB tables directly to clear the course. I edited my "me.MoodleCloud.com" version to remove the only "Assignment" in the entire course, then made a new backup of that. This new version restored perfectly. However, I could not add an "Assignment" to the restored course on my server.

While looking in my "*.com/admin/plugins.php" Plugins Overview I saw I had a disabled version of Assignment (2.2) still installed, so I uninstalled that. I removed all the PoodLL plugin's too because I don't really need them. I assumed Git would have pulled perfect code, but for some design reason Moodle changed the mod for Assignments to "mod_assign" from "mod_assignment". This allowed two competing programs to be available despite the older one being disabled.

Everything worked right after that, even the links for the question banks reappeared! I was immediately able to create the missing assignment. Moral of the story is somebody should be telling people with the 2.2 version of Assignment's to remove it before the upgrade to Moodle 3.6.

In reply to Michael Rupp

Re: Can't login to Moodle after Git upgrade 3.5 to 3.6 "Error reading from database"

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Oh my!  You found your way out of the desert.  I knew that you could do it.

As far as I know, GIT doesn't do anything with add-ins, like PoodLL.  Others here will correct me if I am wrong.

In reply to Michael Rupp

Re: Can't login to Moodle after Git upgrade 3.5 to 3.6 "Error reading from database"

by Ken Task -
Picture of Particularly helpful Moodlers

Uhhh .... errr ...

"Moral of the story is somebody should be telling people with the 2.2 version of Assignment's to remove it before the upgrade to Moodle 3.6."

A little history concerning assignments in Moodle ...

mod_assignment shows as 'Assignment (2.2)' in the GUI. It is the original Assignment module.

Around version 2.3 of moodle, a new assignment mod named mod_assign made an appearance.
In the Site Admin menu, there was an 'Upgrade Assignments' link that when executed converted all mod_assignment modules to mod_assign. Once all Assignments were converted it was recommended to hide (still is the recommendation) the old assignment 2.2 so Teachers/Course Creators wouldn't use the old mod.

mod_assignment is still present in git acquired code for 3.6.x and below.
It is hidden by default in the Site Admin menus for plugins and I believe is present in case Site Admins/Teachers are trying to restore old course backups (2.3 and below) that used the old mod_assignment.  If unhidden, site admin can convert those old mod_assignments to the new mod_assign easily.   And after conversion, once again hide 'Assignment (2.2)' in the Admin GUI.

So am not certain that the advice about removing a core mod is the right thing to do - depending upon factors of course.

Not at all sure the troubles you had weren't self-inflicted - happens sometimes - don't think anyone will ever really know.

'spirit of sharing', Ken


Average of ratings: Useful (2)