KB Plugins

The best Wordpress plugins are free

Print this post

KB Gradebook v1.0

Announcing the completely reinvented KB Gradebook 1.0, a dramatic improvement over v0.1.3!

I’ve completely rewritten KB Gradebook. The biggest change: You can now upload CSV files containing grade data. That makes the uploading process much, much faster and more convenient. Plus, there are now fewer steps involved in updating the grading information.

If you are upgrading from a previous version, please don’t do it until you read the important comments at the top of the KB Gradebook plugin file.

v1.0 will show up over in the plugins repository in a few minutes here. Here’s the link: Download KB Gradebook plugin .

24 comments »

1
YikYak says
at 11:18 am on November 7, 2007 #

Hi,

Seems an interesting plugin, I am using WordPress to support some of my teaching, where my students are already registered members of my blog. One thing I currently do not do is provide on-line feedback such as this, but I already have the data in the spreadsheet format, so a good low effort add on for me!

A question/suggestion: can you adapt the principles here to allow user access to individual grades via existing WordPress account/login details?

2
Thus saith Adam
at 4:29 pm on November 7, 2007 #

[edited out–no longer necessary]

Maybe if I get time I’ll make this change myself and make it an option that plugin users can select (whether to use registered userdata or not). It would probably be a pretty quick coding job…

[update]

I went ahead and coded this since it was quick. I have NOT tested it, since I don’t have students with WP usernames. So try it out and please let me know one way or the other whether it works. You’ll need v1.03, and you’ll need to set a definition at the top of the plugin file to TRUE so it knows to use this other method.

3
YikYak thinks
at 3:25 pm on November 8, 2007 #

Cheers for a speedy response, I’ll try and find time to give it a go. Don’t have any real feedback to give my students for a while yet, but will try and set up a test bed using fake data on the real students, once they’re all on board in the blog, and get some feedback back to you.

4
Randy writes
at 3:15 pm on November 10, 2007 #

In trying to test this plugin on my site, i get the following error when uploading my csv file.

Warning: Wrong parameter count for fgetcsv() in /home/content/.../kb-gradebook/kb-gradebook.php on line 469
5
Thus saith Adam
at 4:16 pm on November 12, 2007 #

Randy, what version PHP are you using? I’m on PHP 5, and now that I look it up, it appears that PHP 4 requires some additional info to be passed to fgetcsv().

If that’s the problem, I’ll see if there’s a simple workaround.

6
Randy contributes
at 10:54 pm on November 13, 2007 #

I had my host move me from php 4 to php 5 and it works great now. thanks for the offer of help and the advice.

7
Luis opines
at 10:29 am on November 14, 2007 #

Hi, Adam. I am trying tu put your plugin in my blog (wordpress), but something´s wrong. That´s what wordpress says, when I do it: “Sorry, but your CSV file has too few columns”. I give the name of the column with the mails, but it doesn´t work. Do you know why? I export the file like .csv and it´s got 10 columns. It´s a pity, ´cause the plug in looks great.
Thank you.

8
Thus saith Adam
at 10:41 am on November 14, 2007 #

Luis: Is your spreadsheet formatted look like this example?

sample spreadsheet

If so, would you mind sending me a copy of your CSV (replace the emails with “email@example.com” if you want) so I can try to replicate the problem?

Email to web@ at this domain.

[Added Nov 28:]

If I export that spreadsheet as a CSV and view it in a text editor, it looks like this:

Student,Email,Midterm,Essay,Final,Overall
John Doe,jdoe@example.com,94,89,95,92.67
Jane Roe,jroe@example.com,72,81,74,75.67
Joe Blow,jblow@example.com,86,90,88,88
Joanna Schmoe,jschmoe@example.com,87,85,82,84.67

That’s how a CSV should always look. Note that commas separate columns, and each row is on a new line. That’s how your data need to look before the plugin will be able to process anything.

9
Randy contributes
at 6:13 pm on November 14, 2007 #

I tested out using the wordpress usernames of my students in place of the e-mail and generate password and it works great Adam. Outstanding work and my students know love being able to see how they are doing at anytime.

10
Thus saith Adam
at 10:34 am on November 15, 2007 #

Glad it’s working for you Randy. Thanks for the feedback on using WP usernames.

11
Randy remarks
at 7:13 pm on December 4, 2007 #

Quick question Adam. If I wanted to edit the plugin to have it look at just their wordpress username for my site instead of their e-mail address, would I change the item it looks at from “user_email” to just “user.” I’ve been thinking about trying this, but was unsure of the actual field to use in place of it. By the way, still love the plugin and my students are thinking me for using it.

12
Thus saith Adam
at 7:18 pm on December 4, 2007 #

Just to make sure I’m following, the only change you’re trying to make is this: You want to put their WP username (instead of their email) into the spreadsheet. Right?

You would change it from user_email to user_login. This may help: get_currentuserinfo.

I’m not sure whether that will cause further problems later in the codeflow, though. Give it a try and see what happens.

13
Randy remarks
at 8:28 am on December 5, 2007 #

Thanks Adam! I actually found that article and got in the check the tables in my database to make sure it all matched up about 15 minutes after I posted my comment/question.

I plan to test it out soon and I’ll let you know how it all goes.

14
Randy thinks
at 6:42 pm on December 27, 2007 #

Hey Adam!

I actually went through the code for the plugin and replaced every instance of the plugin looking at the user_email with the User_login and it works great in my tests. I haven’t put it up live yet on my site as I need to make a master list of all my students IDs to place in the CSV. I’ll e-mail you the recoded plugin if you want to check it out, but all I did was replace the user_e-mail with user_login (plus made a few semantic changes like putting ID where it said e-mail on the display to students an making it say grading period instead of course)

15
Thus saith Adam
at 9:07 am on December 31, 2007 #

Thanks for letting me know, Randy. I’m glad it was that easy. Since it’s that easy, I can just tell people with this question in the future to read that comment you wrote.

16
Thomas thinks
at 10:50 am on January 19, 2008 #

Hello Adam,

evalutions of my students also include a short comment. A comment increases the pedagogic value of the grading. Yet comments, however short, are likely to contain commas, which the plugin mistakes for commas belonging to the csv file.

Are you planning to implement support for xls files at some point?

(I realize i may have asked you this question a while ago. Sorry if that’s the case, one unconsciously keeps coming back to great plugins)

Thanks!

Thomas

17
Thus saith Adam
at 9:59 am on January 28, 2008 #

Sorry about the delay, Thomas. I’ve been swamped lately.

Comments work fine as long as you’re using a spreadsheet program that know how to handle them. I just made a sample spreadsheet in Google Docs, including a “comments” column using commas, and exported it as CSV. You can look at the spreadsheet here:

sample spreadsheet

Exported as a CSV, it looked like this:

Student,Email,Midterm,Final,Comment
John Doe,jdoe@example.com,87,92,"Hi John. I thought you did great, except for one thing: There's a comma, an apostrophe, and ""quotes"" in this comment."
Jane Roe,jroe@example.com,83,82
Bob,bob@example.com,92,99,Whoa! Good work!

… and it worked fine when uploaded. I then made a similar test file in Excel and had no problems.

As for XLS files, no, I don’t have plans to add support for them, for two reasons. First, Excel can export CSV files, so I’m not sure adding XLS support is worth the time it would take me to code. Second, I don’t know how to parse an XLS file anyway. :)

18
venkat adds
at 7:14 pm on February 6, 2008 #

After Stage 2 of uploading the CSV file, I’m getting an empty PHP file in Firefox (which actually prompts me to open the file with Text editor).

I tried this in the Opera browser to and there I get an error message saying the page (that corresponds to step 3) is unavailable.

I’m using WP 2.3.2 and KBG 1.03, Firefox 2.0

19
Marfeal contributes
at 6:22 pm on February 19, 2008 #

hi, i think this is a very nice program, but im having problems with the passwords it generates, it does not send any password to the email addresses. my students are registered users of the site, how do i make KB Gradebook use their current passwords and username so that they wouldnt have to login in the gradebook again once they are logged in to the site? thanks a lot.

20
Thus saith Adam
at 6:28 pm on February 19, 2008 #

@venkat: I don’t have any ideas to tell you offhand, and with courses currently in session, I don’t have time right now to look into it. Apologies.

@Marfeal: Look at Randy’s comment above, starting with comment 11.

21
David exclaims
at 12:43 pm on February 28, 2008 #

Hi Adam!.. thanks for this plugin!.. I have the same problem that Randy write in the message number 4 (the error in line 469). My PHP version is 4.4.7
Does thos plugin work only with PHP5?

Thanks again!

22
Thus saith Adam
at 1:39 pm on February 28, 2008 #

David, on line 469, find

while ( ($data = fgetcsv($handle))  !== false )

and change it to

while ( ($data = fgetcsv($handle, 999999))  !== false )

and see if that fixes it for you.

23
Roy exclaims
at 8:01 am on May 1, 2008 #

Dear Adam
Sorry to bother you and realise I might not get an immediately. I can’t get the email to work at all even for my own test email. Nothing seems to be being sent. Is there I set up for WP I need to know about (I use WP 2.5.1 on a basic Mac OS X installation). My students are not registered on the WP site. I’d love to get this working as it’s a great idea and should make it simple for students.

24
Roy says
at 11:41 am on May 2, 2008 #

Dear Adam
No worries I solved the problem. My university server isn’t allowed to act as a mail server apparently and only has http enabled… :(. I can get the plugin working no problem on other servers. Thanks and Keep up the good work.

Leave a comment

Comment Guidelines
  • Yes, your comments will be visible to everybody. (Unless you use the private contact form.)
  • Allowed HTML: <a> <b> <blockquote> <cite> <code> <em> <i> <strong>
  • Code: Put code in `backticks` (above your "Tab" key) or it won't display well
  • Gravatars: To override the default image by your comment, use a gravatar
  • Links: If you include more than one link, your comment will go into the spam queue

Please read before commenting: Because my real job has me swamped at the moment, I am not supporting my plugins at this time. Sorry. This may last several weeks.

If you have a bug report, feature request, or other general feedback about a plugin, please leave a comment—but do not expect an immediate response. If you are requesting help, though, please check the plugin's documentation thoroughly rather than ask your question as a comment.

Thank you for your understanding.