WeBWorK Main Forum

Upgrading webwork and transferring courses.

Upgrading webwork and transferring courses.

by Andrew Doe-stien -
Number of replies: 3
Hello all-

I installed webwork in 2004, and it worked great. We got a new machine, so I decided to use the latest version of WW. The previous version was 2.1

I've gotten it all installed, but I'm having trouble bringing over the old classes to the new system (the Professors have classes they re-use every semester with the problem sets already chosen). I used the SQL_SINGLE class type for the courses, and even after running a wwdb_upgrade/wwdb_check until it doesn't complain anymore, I end up with:

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

(I pasted the call stack below)


Am I missing something obvious? Backing up and restoring the DB using the in-site links in the "Course administration" page doesn't work either, yielding many messages like:

set_user record with user_id='wertz' set_id='webwork08': DBD::mysql::st execute failed: Unknown column 'hide_score' in 'field list' at /opt/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 665.

Any suggestions?


TIA-

Andrew

Call stack

The information below can help locate the source of the problem.

  • in WeBWorK::DB::Schema::NewSQL::Std::handle_error called at line 198 of /opt/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Merge.pm
  • in WeBWorK::DB::Schema::NewSQL::Merge::_get_fields_where_prepex called at line 232 of /opt/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::get_fields_where called at line 292 of /opt/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::get_records_where called at line 592 of /opt/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
  • in WeBWorK::DB::Schema::NewSQL::Std::gets called at line 1065 of /opt/webwork2/lib/WeBWorK/DB.pm
  • in WeBWorK::DB::getMergedSets called at line 141 of /opt/webwork2/lib/WeBWorK/ContentGenerator/ProblemSets.pm
  • in WeBWorK::ContentGenerator::ProblemSets::body called at line 152 of /opt/webwork2/lib/WeBWorK/Template.pm
  • in WeBWorK::Template::template called at line 486 of /opt/webwork2/lib/WeBWorK/ContentGenerator.pm
  • in WeBWorK::ContentGenerator::content called at line 194 of /opt/webwork2/lib/WeBWorK/ContentGenerator.pm
  • in WeBWorK::ContentGenerator::go called at line 353 of /opt/webwork2/lib/WeBWorK.pm

In reply to Andrew Doe-stien

Re: Upgrading webwork and transferring courses.

by Gavin LaRose -
Hi Andrew,

Did you run wwdb_upgrade after upgrading WeBWorK? It sounds as if your database is still in an older version. Between version 2.1 and 2.4.5 a lot of functions got built in that require additional columns in a number of database tables, which these error messages suggest are missing in your webwork database.

Gavin
In reply to Gavin LaRose

Re: Upgrading webwork and transferring courses.

by Andrew Doe-stien -
Gavin,

Thanks for the suggestion. I had already run wwdb_upgrade, its output is:

ddrinen@webwork2:/opt/webwork2/bin$ WEBWORK_ROOT=/opt/webwork2 ./wwdb_upgrade

Database is up-to-date at version 23.

Is that correct?

Regards,
Andrew
In reply to Andrew Doe-stien

Re: Upgrading webwork and transferring courses.

by Michael Gage -
Automatic upgrading of the database entries for old courses is not easy and the current wwdb_upgrade is not foolproof. We are working to improve the robustness for the next release. Because of this make sure that you use the rel-2-4-patches release of wwdb_upgrade
(cvs update -r rel-2-4-patches wwdb_upgrade)

The HEAD version of wwdb_upgrade is being worked on and is not yet reliable.

If you update the rest of your webwork2 software to rel-2-4-patches you will find that I've changed a couple of the "die" messages to "warning" messages when archiving and unarchiving courses. This will warn you that some of the tables are missing but it will not stop the whole archive or unarchive process.

This will make it easier to work around the fact that once courses are out of sync WeBWorK cannot always recover automatically. It may need some manual intervention either to update the mysql database or to update the directory structure and bring things back in sync.

-- Mike