WeBWorK Main Forum

Upgrade to 2.18, stuck at admin course

Upgrade to 2.18, stuck at admin course

by Bernd Sing -
Number of replies: 2

Hi folks,

I have been following https://webwork.maa.org/wiki/Release_notes_for_WeBWorK_2.18#Upgrade_Instructions to upgrade from 2.17 to 2.18 on a Ubuntu 20.04 server.

Things seem to work until I get to the end of the instructions, namely to the step "Make sure to upgrade courses from the admin course to relegate changes to the database". When I log into the admin course with my admin credentials, I get the following:

admin login


I am not sure why the admin account should not be authorized to do anything - besides also running the upgrade_admin_db.pl script I followed the upgrade instructions.

Trying to log in to any other course results in the (expected) error message "It looks like the database is missing a column. You may need to upgrade your course tables." -- so clearly, I have to solve this "not authorized"-issue first.

Any help & hints are appreciated. Thank you.


In reply to Bernd Sing

Re: Upgrade to 2.18, stuck at admin course

by Bernd Sing -

Looking at the addadmin script, creating my own script with 

$db->putPermissionLevel($db->newPermissionLevel(user_id=>"admin", permission=>"20"));

exit;

and using wwsh to apply it on the admin course (see https://webwork.maa.org/moodle/mod/forum/discuss.php?d=6642#p17935) did the trick and resolved the issue -- yeah!
Not sure why the permission level changed in the first place, though.

In reply to Bernd Sing

Re: Upgrade to 2.18, stuck at admin course

by Charles Fulton -

I appreciate the pointer Bernd, as I encountered the same scenario on the 2.17->2.18 upgrade. Every user, including the admin, had permission level "10" in the admin_permission table. I changed it to 20 for the appropriate users and regained access.

Charles