WeBWorK Main Forum

Moving course archives from 2.3.2 to 2.4.7

Moving course archives from 2.3.2 to 2.4.7

by Louis Zulli -
Number of replies: 7
I archive a course on a server using WeBWorK 2.3.2. I move the .tar.gz file to /opt/webwork/courses on a server running 2.4.7 rel-2-4-patches. After ensuring correct ownership and permissions on the .tar.gz file, I unarchive the course from the admin course. The process is successful, but I see "Database tables need updating" next to the course, and I get the following error if I log into the course:

DBD::mysql::st execute failed: Unknown column 'merge1.hide_score' in 'field list' at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 812.

What's the fix? Thanks.
In reply to Louis Zulli

Re: Moving course archives from 2.3.2 to 2.4.7

by Michael Gage -
Go the admin course, click on "Upgrade courses" tab. This will allow you to check the integrity of the course database and the course directory structure.
You can do simple upgrades and routine fixes automatically from the web. In this case a new field needs to be added to a table to accommodate the Reduced Grading Period feature. More complicated mixups in the structure still need to resolved by hand from the command line since automatic fixes might do more harm than good.

More details are here:

http://webwork.maa.org/wiki/Release_notes_for_WeBWorK_2.4.9#For_site_administrators

and specifically

http://webwork.maa.org/wiki/Release_notes_for_WeBWorK_2.4.9#Changes_in_site_administration_operations
In reply to Michael Gage

Re: Moving course archives from 2.3.2 to 2.4.7

by Louis Zulli -
Don't have an "Upgrade courses" tab. Note that our system is 2.4.7.

Thanks.
In reply to Michael Gage

Re: Moving course archives from 2.3.2 to 2.4.7

by Louis Zulli -
Since I don't have 2.4.9 (and thus have no "Upgrade Courses" tab), it seems from

"The Upgrade Course facility means that the command line module DBupgrade.pm is no longer used for upgrades. It might be needed if one is sequentially updating a release that is more than 3 years old."

that I may need to use DBupgrade.pm.

Is this correct? Is there documentation for this module?

Thanks.
In reply to Louis Zulli

Re: Moving course archives from 2.3.2 to 2.4.7

by Michael Gage -
Try running wwdb_upgrade. It's now at webwork2/bin/old_scripts/wwdb_upgrade. This calls DBupgrade.pm to add the needed fields to the tables. If you look at the code in DBupgrade.pm you'll see that it is essentially just a bunch of SQL queries to mysql to update the database. If you only have one or two courses you can add these fields directly using either the command line or a graphics interface such as phpMyAdmin.

YMMV.

Upgrading courses across versions has always been a bit problematic -- it's one of the issues we made a real effort to address in 2.4.9. Even 2.4.9 is not yet perfect and I'm not positive that it would automatically add the hide.score field (that's been around for a while now) but it might.

Hope this helps.

Take care,

Mike

In reply to Michael Gage

Re: Moving course archives from 2.3.2 to 2.4.7

by Louis Zulli -
Thanks for the suggestions. I had already tried running wwdb_upgrade, without success. The output was "Database is up-to-date at version 23" but the problem remained.

The good news is there is a simple fix that seems to work. In the admin course on the 2.4.7 system, I click on Archive Course and select the problematic course. The system checks the course database and indicates what the problems are. It also provides a button for upgrading the database! I click that and the database is upgraded. I then cancel the request to archive and all is well.

So, in essence, this seems like the 2.4.7 version of the new 2.4.9 "Upgrade Courses" tab (though I need to run this process manually for each course I transfer).

Thanks again.
In reply to Louis Zulli

Re: Moving course archives from 2.3.2 to 2.4.7

by Michael Gage -
Louis,

Thanks for reporting back. That is indeed a work around we had in some previous versions of WW before it got moved
to its own tab on the admin course. I'd forgotten that it was available in 2.4.7 (I've been using 2.4.9 for over a year and
at the moment I'm still further along the development tree.)

Use the Category:Release_Notes section of the wiki
to check things such as upgrading for each release and to search for information on old versions of the software code.

You were pretty far back in the release tree(2.3.2) so I'm not surprised that you had some trouble upgrading. With open source projects, including WW, it's my advice to stay reasonably
close to the latest stable release since the community doesn't usually have the manpower to continue to support older versions.

The 2.4.9 release is pretty stable and I'd recommend upgrading to that fairly soon once it's convenient.

We're also making an effort to give much more detail in the recent release notes. They should be worth reading at this point.

Take care,

Mike
In reply to Michael Gage

Re: Moving course archives from 2.3.2 to 2.4.7

by Louis Zulli -
Yes, we will try to do better staying current. Upgrading is the responsibility of our IT folks; gone are the days when I ran WW from my office Mac Pro!

I've already requested that we move to the current stable version at the end of this semester, so I hope we'll be more in-sync from now on.

Thanks for the help.