## WeBWorK Main Forum

### Can't delete course

by Hieu Nguyen -
Number of replies: 2
I tried deleting a course (as Webwork administrator) on my university's Webwork server but got the error message:

***********
An error occured while deleting the course 2017_Fall_Discrete_Structures_03160_2_Nguyen:

DBD::mysql::db do failed: Incorrect table name '2017_Fall_Discrete_Structures_03160_2_Nguyen_global_user_achievement' at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 828.
************

I previously had renamed the course, which worked the first time (but also threw an error message), and now I can't rename it again. Here's the error message if I try to rename it again:

************
WeBWorK error

An error occured while processing your request. For help, please send mail to this site's webmaster (root@localhost), including all of the following information as well as what what you were doing when the error occured.

Thu Jul 27 21:15:53 2017

Warning messages

Error messages

[missing table]
Call stack

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

in Exception::Class::Base::throw called at line 820 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
in WeBWorK::DB::Schema::NewSQL::Std::handle_error called at line 415 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
in WeBWorK::DB::Schema::NewSQL::Std::_get_fields_where_prepex called at line 383 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
in WeBWorK::DB::Schema::NewSQL::Std::get_fields_where called at line 854 of /opt/webwork/webwork2/lib/WeBWorK/DB.pm
in WeBWorK::DB::getSettingValue called at line 1058 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/CourseAdmin.pm
in WeBWorK::ContentGenerator::CourseAdmin::rename_course_confirm called at line 454 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/CourseAdmin.pm
in WeBWorK::ContentGenerator::CourseAdmin::body called at line 155 of /opt/webwork/webwork2/lib/WeBWorK/Template.pm
in WeBWorK::Template::template called at line 531 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
in WeBWorK::ContentGenerator::content called at line 380 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/CourseAdmin.pm
in WeBWorK::ContentGenerator::CourseAdmin::content called at line 203 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
in WeBWorK::ContentGenerator::go called at line 382 of /opt/webwork/webwork2/lib/WeBWorK.pm

************

Appreciate help in fixing this. Thanks.

In reply to Hieu Nguyen

### Re: Can't delete course

by Gavin LaRose -
Hi Hieu,

It looks as if you've ended up with a missing table for the course, for some reason. My guess is that the solution/work-around is to have an admin fix this from the course administration course by "upgrading" the course to ensure that it has the right table structure. If that doesn't work it might be a matter of getting a system administrator to delete the course tables from mysql manually.

Gavin
In reply to Gavin LaRose

### Re: Can't delete course

by Hieu Nguyen -
Gavin,

I tried upgrading the course but got the error message below. I'll try to have the course tables deleted manually. Thanks for your help.

--Hieu

----------------------

## WeBWorK error

An error occured while processing your request. For help, please send mail to this site's webmaster (root@localhost), including all of the following information as well as what what you were doing when the error occured.

Mon Jul 31 22:31:10 2017

### Error messages

DBD::mysql::db do failed: Incorrect table name '2017_Fall_Discrete_Structures_03160_2_Nguyen_global_user_achievement' at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 828.

### Call stack

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

• in WeBWorK::DB::Schema::NewSQL::Std::handle_error called at line 299 of /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm
• in WeBWorK::DB::Schema::NewSQL::Std::tableFieldExists called at line 222 of /opt/webwork/webwork2/lib/WeBWorK/Utils/CourseIntegrityCheck.pm
• in WeBWorK::Utils::CourseIntegrityCheck::checkTableFields called at line 110 of /opt/webwork/webwork2/lib/WeBWorK/Utils/CourseIntegrityCheck.pm
• in WeBWorK::Utils::CourseIntegrityCheck::checkCourseTables called at line 2402 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/CourseAdmin.pm
• in WeBWorK::ContentGenerator::CourseAdmin::upgrade_course_form called at line 454 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/CourseAdmin.pm
• in WeBWorK::ContentGenerator::CourseAdmin::body called at line 155 of /opt/webwork/webwork2/lib/WeBWorK/Template.pm
• in WeBWorK::Template::template called at line 531 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
• in WeBWorK::ContentGenerator::content called at line 380 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/CourseAdmin.pm
• in WeBWorK::ContentGenerator::CourseAdmin::content called at line 203 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
• in WeBWorK::ContentGenerator::go called at line 382 of /opt/webwork/webwork2/lib/WeBWorK.pm