WeBWorK Main Forum

bad classlist added

bad classlist added

by Alex Jordan -
Number of replies: 1
An instructor took the course roster that our school provides and accidentally tried to use that directly to add students, skipping the usual step of formatting it as a valid WeBWorK .lst file. Ever since she did this, if we try to visit her Classlist Editor, there is nothing but an error message (below). I don't know anything about how the database works and I'm worried that maybe some damaging entries have been introduced that I should carefully remove. I don't want to just delete the course because the bad entries might persist through things like the data collection script we submit to "WeBWorK HQ" each year. (Or maybe someone can convince me that would be harmless.)

The file used was in csv format (with a .lst extension) and had entries like the following. I am literally pasting the first few lines, and only changing things like names. But I'm only changing alpha-numeric characters to other alphanumeric characters. Other characters are literally how the classlist was "imported". There are semicolons and asterisks in there.

201704,44444,MTH,95,G00000000,Last; First ,first.last@pcc.edu,**Web Registered**,09-AUG-2017,4,Letter Grade,,7
201704,44444,MTH,95,G00000000,Last; First ,first.last@pcc.edu,**Web Registered**,09-AUG-2017,4,Letter Grade,,23

Should I be worried? Is there a clean way to undo this? Ideally while leaving the course in place, since she has invested some in configuring its homework sets.

The Classlist Editor page is throwing this error:

No handle/phrase at /usr/share/perl/5.18/Locale/Maketext.pm line 195. Locale::Maketext::maketext() called at /opt/webwork/webwork2/lib/WeBWorK/Localize.pm line 50 WeBWorK::Localize::__ANON__(undef) called at /opt/webwork/webwork2/lib/WeBWorK/Request.pm line 191 WeBWorK::Request::maketext('WeBWorK::Request=HASH(0x7f92a7c391d0)', undef) called at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/UserList2.pm line 1760 WeBWorK::ContentGenerator::Instructor::UserList2::recordEditHTML('WeBWorK::ContentGenerator::Instructor::UserList2=HASH(0x7f92a...', 'WeBWorK::DB::Record::User=HASH(0x7f92a8c42920)', 'WeBWorK::DB::Record::PermissionLevel=HASH(0x7f92a8c41d80)', 'editMode', 0, 'passwordMode', 0, 'userSelected', '', ...) called at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/UserList2.pm line 1882 WeBWorK::ContentGenerator::Instructor::UserList2::printTableHTML('WeBWorK::ContentGenerator::Instructor::UserList2=HASH(0x7f92a...', 'ARRAY(0x7f92a1e939c8)', 'ARRAY(0x7f92a1e93db8)', 'HASH(0x7f92a1e7afd0)', 'editMode', 0, 'passwordMode', 0, 'selectedUserIDs', ...) called at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/UserList2.pm line 551 WeBWorK::ContentGenerator::Instructor::UserList2::body('WeBWorK::ContentGenerator::Instructor::UserList2=HASH(0x7f92a...', 'HASH(0x7f92a97d07d0)') called at /opt/webwork/webwork2/lib/WeBWorK/Template.pm line 155 WeBWorK::Template::template('/opt/webwork/webwork2/htdocs/themes/math4/system.template', 'WeBWorK::ContentGenerator::Instructor::UserList2=HASH(0x7f92a...') called at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm line 560 WeBWorK::ContentGenerator::content('WeBWorK::ContentGenerator::Instructor::UserList2=HASH(0x7f92a...') called at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm line 232 WeBWorK::ContentGenerator::go('WeBWorK::ContentGenerator::Instructor::UserList2=HASH(0x7f92a...') called at /opt/webwork/webwork2/lib/WeBWorK.pm line 384 WeBWorK::dispatch('Apache2::RequestRec=SCALAR(0x7f92a9059458)') called at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 121 eval {...} called at /opt/webwork/webwork2/lib/Apache/WeBWorK.pm line 121 Apache::WeBWorK::handler('Apache2::RequestRec=SCALAR(0x7f92a9059458)') called at -e line 0 eval {...} called at -e line 0

In reply to Alex Jordan

Re: bad classlist added

by Danny Glin -
There is definitely a bug here. The question is whether it is that the importer is accepting data it shouldn't, or whether the Homework Sets Editor is unable to display things it should be able to handle...

There are a couple of other ways at the class list that may work.
First thing I would try is enabling the Old Homework Sets Editor for that course. It's possible that you might not get the error on that page, and be able to delete the offending records from that page.

The other thing to try is the Instructor Tools page. If that loads, then you can select the mangled users, and edit them from that page. Then you may be able to clean up any fields with weird characters, which might let you load the Classlist Editor.

On the database side, I believe it won't be too bad, since it's likely that no homework sets were assigned to these new users. If no sets have been assigned to the user, then you should just have to delete the offending records in [coursename]_user, [coursename]_permission and [coursename]_password.

At the very least, deleting the records from [coursename]_user should prevent them from displaying in the Classlist Editor, which should give you access to the page again. If you're worried about corrupted data at that point, then export all of the homework sets, delete and re-create the course, then import them.