WeBWorK Main Forum

corrupted Username - can't delete student

corrupted Username - can't delete student

by Debbie Yuster -
Number of replies: 4
For some reason, when I imported my classlist file (created as a CSV on Excel 2007), several strange characters made their way into my file. I'm not sure what they are or where they came from (possibly spaces?) but in my Classlist Editor on WeBWorK, they just look like black diamonds with a question mark in the center. This wasn't a big deal when it happened in an unimportant field like First Name, and I was able to just delete them by hand. However, the black diamond made its way into the Username of one of my students. I created a new account for him, but I'm unable to delete the old one. When I try, it does get deleted, but the next time I go back to the Classlist Editor, there it is again. I assume WW is freaking out at the illegal username and this is causing problems.

It wouldn't be a big deal, except when the corrupt account is there and I assign a new problem set to all users, it only assigns the set to some users (the ones who were in my original CSV file, and not the ones I've added since then). If I delete the corrupt account, then I can assign to everyone properly, but I'd rather not have to delete him over and over.

Any suggestions?

In reply to Debbie Yuster

Re: corrupted Username - can't delete student

by Debbie Yuster -
Bumping this- I am still unable to delete a student with funny characters in his username. The strange characters lead to various WeBWorK bugs and I'd like to avoid these bugs as I repopulate the course for the upcoming semester.

Can you tell me how to delete the student's account some other way (i.e. without using the Classlist Editor)? I am appending an example of an error message I got when trying to access the student's records. Looks like he's been partially deleted, partially not.

Thanks for your help,

WeBWorK error

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

Tue Aug 17 16:22:34 2010

Warning messages

Error messages

record for user FLAMURKAS.09� not found at /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator/Instructor/Stats.pm line 144.

Call stack

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

  • in WeBWorK::ContentGenerator::Instructor::Stats::body called at line 152 of /opt/webwork/webwork2/lib/WeBWorK/Template.pm
  • in WeBWorK::Template::template called at line 490 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
  • in WeBWorK::ContentGenerator::content called at line 194 of /opt/webwork/webwork2/lib/WeBWorK/ContentGenerator.pm
  • in WeBWorK::ContentGenerator::go called at line 353 of /opt/webwork/webwork2/lib/WeBWorK.pm

Request information

Method GET
URI /webwork2/Math_101/instructor/stats/student/FLAMURKAS.09�/
HTTP Headers
Keep-Alive 115
Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7
User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20100722 Firefox/3.6.8 ( .NET CLR 3.5.30729)
Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Connection keep-alive
Accept-Encoding gzip,deflate
Accept-Language en-us,en;q=0.5

In reply to Debbie Yuster

Re: corrupted Username - can't delete student

by D. Brian Walton -
I was playing around with an import as well just this week and had a similar problem.  I do not have a solution, but I believe I understand what is happening.

When I downloaded a class-list file in Excel format (technically it was in CSV format) generated by Blackboard, I did a manipulation to create the .lst format required by WeBWorK.  When I imported it, there were strange characters in between all characters of the name.

When I double checked the original file, I discovered that it was in what is called "UTF-16" encoding.  WeBWorK is expecting UTF-8 encoding.  My text editor was able to read either type and so I wasn't expecting the outcome.  If I converted the file to UTF-8 first and then imported to WeBWorK, everything was fine.

When I tried to delete the bad students, they appear to disappear from the classlist.  But the next time I query the database, they seem to reappear.  I think that what is happening is that the database is purged, but the reference table (the keys for the database) are not correctly cleaned when the text uses the wrong encoding.  If I try to edit one of the students, it says they are not there.

For me, since this was a test class and not production, I just deleted the class and started over.  I don't know how to access the database directly.

D. Brian Walton
James Madison University
In reply to Debbie Yuster

Re: corrupted Username - can't delete student

by Lars Jensen -
Hi Debbie,

Have you tried to delete the user from inside the database? The easiest way to do this is probably to install phpmyadmin then access the webwork database from there, The user will be in the table called


where classname is the name of the class the student is enrolled in.

In reply to Lars Jensen

Re: corrupted Username - can't delete student

by Gavin LaRose -
As a follow-up, you'll probably also want to delete the corresponding entries from the classname_permission and classname_password tables of the database as well. If the user has assigned sets, the same will be true of the classname_set_user and classname_problem_user tables.