Home » Technobabble » KB Gradebook

KB Gradebook

I’m going to be posting a “midterm reflection” about the Alternate Worlds class soon.  But before that, I wanted to put up a post that (maybe) will be easy to find for people trying to use the KB Gradebook plugin that I mentioned in the earlier posts.

This was looking like a very good way to let students see their grades throughout the course–an important feature to students in an online class (and others, too, probably).  I was very happy to have found it, especially because it allowed for actual written comments, not just letter grades or numerical scores, but shortly after my (successful) testing, it started to fail to work.

The first problem was that I would get a message saying

“Sorry, but your CSV file has too few columns.”

When I knew that it had plenty of columns.  A bit of googling tracked down the answer to that problem–something about the way Excel on a Mac saves CSV files with some problematic end-of-line encoding.  There’s probably a way around that in the setttings of Excel, but I took the (somewhat clumsy) workaround instead.  I just made the file on my Mac in Numbers (instead of Excel) and exported to CSV from there.  That was fine.

But then the second problem was more serious, and seemed insurmountable for a while.  Uploading new grades gave an error message of either

“There is no grade information available for this course. Since there was as of the last step, it’s possible that another user is also working on your grades right now.”


“Unable to write CSV data to database. Please try again in a couple minutes.”

All my googling turned up several people who had encountered the same problem, but nobody with any solutions, and even the person who originally steered me to the plugin, Kyle Jones, said that he had no solution and had ended up having to abandon the plugin–wishing that someone would have the skill or time to troubleshoot it. (the original developer had decided to let it go–no more time to work on it and wasn’t interested in using it anymore).

I thought about hiring a programmer to troubleshoot for me–it was certainly beyond my skill to fix, but it seemed like a plugin that could be really beneficial to anyone using WordPress for courses.

So I kept plugging away at it, trying to figure out where those errors were coming from, trying to see if I could find a fix or even a workaround.

In thinking about hiring someone, I needed to see if I could reliably reproduce the problem and describe the symptoms.  And I couldn’t.  On my MAMP test bed, it seemed to work fine, no matter how I pushed it.  But no matter what I tried, I couldn’t get it to work on my production server.

Then finally I decided to go to a low-level examination.  I looked very carefully at the database itself (Sequel Pro is an utterly fantastic tool, by the way).  And there I noticed that the tables did not include all the information that should have been uploaded in the CSV files.  There was an abrupt truncation, and when I looked closely, I saw that it was where I had left a student a comment, not just a letter grade, and part of that comment was the phrase “you really haven’t…”

The whole table stopped at “you really haven..”  It was the apostrophe!  Once I made sure there were no apostrophes, everything worked just fine.

So for anyone who is trying to use this plugin, if you want to leave students comments, do not use any apostrophes in those comments.  Quotation marks and slashes might cause problems too, I suspect, but I haven’t tested that.

Boone tells me on twitter that there might be a way to fix it for real with mysql_real_escape_string (on the way in) and stripslashes (on the way out).  I will have to learn to do that–maybe with Boone’s help–and maybe find out how to get the plugin updated in the repository, if the original developer will allow it.

But for now–anyone using KB Gradebook who might come upon this post–if you have those error messages, check carefully for apostrophes or other odd characters in your CSV file!  That just might do it!


  1. It’s the old curly quotes problem. There are various ways to deal with it and it varies slightly with language and db, but the basic approach is to have something (script, filter) convert curly quotes to straight quotes, whether single or double. BTW, if that’s a problem, certain other character entities will also be a problem (e.g., the reverse quote ` or extended characters like a cedilla). It’s best to get the thing solved programmatically rather than procedurally, but the latter approach will do for ad hoc.

    More troubling, though, is that if there are these kinds of weaknesses in this gradebook it makes one wonder what other weaknesses exist. And with no developer around, that’s a real problem.

    All hail the pioneers, and I do believe, Joe, you’ve an arrow sticking in you!

  2. our experience with this plugin, once again, details some of the problems with the OS widgets & plugins in the WordPress repository – you never know when you’ll get hit with a nasty bug.

    that’s the game though, I guess.

    additionally, it also highlights a greater emphasis on developing stable plugins for education uses with wordpress.

    i’ll be investigating grant funds in the future to see if I can’t *inspire* a developer/team of developers to take a serious look at these kinds of plugins.


  3. Thank you Joe! Your blog is always the first one I read because I learn so much from it. I’m also grateful for all the resources you’ve put on Mountebank.

    And of course I love the way you write. In relation to that, I’m fascinated by the fact that so many of the faculty who were–and still are–at the forefront of CUNY’s online efforts and projects are English teachers (e.g., George, Matt, Bill Bernhardt, Carl Grindley, you, and me).

Leave a comment

Your email address will not be published. Required fields are marked *