Batched upload of assignment grades - need testers

Batched upload of assignment grades - need testers

by James Dugal -
Number of replies: 35
I have some modifications to Moodle 1.5.2+ assignments, to add the ability to upload comma-separated username.grade,comment   lines contained in an ASCII file.  I will attach the zipfile below, as uploadgrades.zip.  I'd appreciate it it, or something derived from it, could become part of the standard Moodle features.  Also, send me feedback  on bugs, etc.  At this point I have not considered groups...
-- James Dugal
Average of ratings: -
In reply to James Dugal

Re: Batched upload of assignment grades - need testers

by Adam Johnston -
Hey, I have it installed and am in the process of trying to create some assignments to test this.  Just noticed no one had really left any feedback, but this is a great feature.  I will try to let you know this weekend if I have any issues with it
Thanks for the mod!
In reply to James Dugal

Re: Batched upload of assignment grades - need testers

by Darren Smith -
I am not in a position to test this at the moment but I agree this would be a superb feature tongueout
In reply to James Dugal

Re: Batched upload of assignment grades - need testers

by James Robertson -
Is this similar to the offline exam/homework add-on that Zbigniew Fiedorowics was working on?  See http://moodle.org/mod/forum/discuss.php?d=25765.
In reply to James Robertson

Re: Batched upload of assignment grades - need testers

by James Dugal -
It looks like Zbigniew modified the gradebook, while I modified the assignent module. Take your pick!
In reply to James Dugal

Re: Batched upload of assignment grades - need testers

by Adam Johnston -
This mod is nice because it allows you to use the default assignment code, which means this can be used with The Linux Box's manual grade mod.  Also the assignment interface is supposed to be partially redone and should come out more like Zbigniew's modded assignment anyway.  I am excited simply for future compatability.  I know assignment will not be deprecated out, but the other mods can easily be discontinued and then you are gonna be in trouble come 1.6 and beyond when you have to redo your assignments.

In reply to James Dugal

Re: Batched upload of assignment grades - need testers

by Samuel Henderson -
I installed it, but it doesn't seem to be doing anything.  Is there a setting I should change, or a program I should run to make it start working?
In reply to Samuel Henderson

Re: Batched upload of assignment grades - need testers

by James Dugal -
You should see an upload file box at the bottom of the page that results from
clicking on "View No submitted assignments" (after having clicked on Assignments)
--James
In reply to James Dugal

Re: Batched upload of assignment grades - need testers

by Samuel Henderson -
Hmm... not seeing anything.  It's probably something terribly obvious I've forgotten to do.  I uploaded and extracted the zip file.   The extraction was successful, but nothing has changed in the view-submissions page. 

Feel free to check out Assignment 1 in the course called "Testing" on http://en411.com  (the username and password are the same as the course name, but in lowercase). 

I'll admit I haven't actually looked through the PHP code (not that I would know what to look for) -- is there something that needs to be de-commented, perhaps?
In reply to Samuel Henderson

Re: Batched upload of assignment grades - need testers

by Samuel Henderson -
Aha, got it.  Some kind of problem with my host's extraction utility, apparently.  Anyway, it seems to be working fine.  If I have any problems, don't worry, you'll hear from me.  smile
In reply to James Dugal

Re: Batched upload of assignment grades - need testers

by Roel Cantada -
I tested it on my 1.6 development test server, it works.  I will continue to feed it different data.

Pardon my ignorance, but how do teachers download the list of usernames from the server?  Especially if the admin (another person) changed the username of a student for whatever reason.

Would it possible to make use of firstname+lastname combination in the future?
In reply to Roel Cantada

Re: Batched upload of assignment grades - need testers

by James Dugal -
Roel, it has happened here that a course has two people with identical first and last names, hence my use of username to unambiguously refer to a student.  I am assuming the teacher will recognize the username!  As to how to obtain a list of username to lastname/firstname correspondences, I added such a feature to the Participants page by modifying user/index.php a slight bit.  I will attach a zipfile containing this modification to this msg.
-- James
In reply to James Dugal

Re: Batched upload of assignment grades - need testers

by Roel Cantada -
Hi James,

Thanks for the response.  I will test this patch on my dev and production server and will report back the results.

If all goes well, this will be very handy for teachers whose users are allowed to create their own accounts with email notification.

Roel
In reply to James Dugal

Re: Batched upload of assignment grades - need testers

by Roel Cantada -

Hi James,

Here is my initial test result. 

for participants.zip

I patched ./user/index.php version 1.88.2.3, 2005/06/20.  This one comes from my fantastico installed Moodle 1.5.2 on tagalog.ws.

It worked fine.  I got the username without a hitch.  Although I am not in a position to evaluate this, I was wondering if this tool will cause any security problems.

Anyway, I pasted the usernames on a textfile and imported that in excel, then added my grades.

for uploadgrades

I am actually trying to use uploadgrades to post my final grades to my students.  It is sort of a workaround to gradebook.  Because of our different grading system and the fact that I am not a programmer, and can barely read PHP so it will take me some time before I can make gradebook do my bidding.

So before, I manually give the grades in an offline assignment, using a customized scale which you can find on the image attached.  It has the following  values 1.0, 1.25, 1.5, 1.75, 2.0, 2.25, 2.5, 2.75, 3.0, 4.0, 5.0, INC, DRP, and WF.

When i uploaded the file containing these grades I got the ff. error message.   I replaced the real usernames with username in this example.

 

Invalid grade: WF ... line 1 ignored: username,WF,Failed. Repeat the course.


Invalid grade: 3.0 ... line 2 ignored: username,3.0,Passed


Invalid grade: 3.0 ... line 3 ignored: username,3.0,Passed


Invalid grade: 3.0 ... line 4 ignored: username,3.0,Passed


Invalid grade: 5.0 ... line 5 ignored: username,5.0,Failed. Repeat the course.


Invalid grade: WF ... line 6 ignored: username,WF,Failed. Repeat the course.


Invalid grade: 5.0 ... line 7 ignored: username,5.0,Failed. Repeat the course.


Invalid grade: 5.0 ... line 8 ignored: username,5.0,Failed. Repeat the course.


Invalid grade: 2.75 ... line 9 ignored: username,2.75,Passed


Invalid grade: 5.0 ... line 10 ignored: username,5.0,Failed. Repeat the course.


Invalid grade: WF ... line 11 ignored: username,WF,Failed. Repeat the course.


Invalid grade: 5.0 ... line 12 ignored: username,5.0,Failed. Repeat the course.


Invalid grade: WF ... line 13 ignored: username,WF,Failed. Repeat the course.


Invalid grade: WF ... line 14 ignored: username,WF,Failed. Repeat the course.


Invalid grade: 3.0 ... line 15 ignored: username,3.0,Passed


Invalid grade: 5.0 ... line 16 ignored: username,5.0,Failed. Repeat the course. Final grade is 65.3177. Unfortunately Even if you were able to change your final paper-it is only 40% of the final grade and is not enough to pass.


Invalid grade: 2.0 ... line 17 ignored: username,2.0,Passed


Invalid grade: 2.5 ... line 18 ignored: username,2.5,Passed


Invalid grade: 2.0 ... line 19 ignored: username,2.0,Passed

<snip...>

 

Manually I can select the grades and it displayed correctly.  I don't know if this is somekind of type mismatch with the db field; gradebook has a problem with it too.  Is it a problem with scales, db, uploadgrades or am I misusing these tools?

The help file of uploadgrades say:

"Grade is the student's assignment grade, negative if a non-numeric scale is used"

so I tried putting negative signs before the grades but I still get the same error.  I guess its back to manual grading for me malungkot.

 

 

 

 

Attachment untitled2.png
In reply to James Dugal

Re: Batched upload of assignment grades - need testers

by Adam Johnston -
Does anyone know how easy it would be to move this to show up on the assignment info page you first get when you click on an assignment versus the grading page?  Seeing as the "new" grading interface is not good, and none of my teachers use it, I am trying to avoid it altogether.  I have a link to edit grades with the manual grades mod on the assignment info screen as well, but would like to give them the option to upload grades still.  If anyone knows if this is doable let me know.
In reply to James Dugal

Re: Batched upload of assignment grades - need testers

by Roel Cantada -

This is a minor suggestion.  The button  Upload Grades seems to be using two strings from the existing en strings.  It would probably be a good idea later on to have its own string entry in /lang/en/assignment.php so that we can translate it better.  In tl lang pack it resulted in an ungrammatical translation.

In reply to Roel Cantada

Re: Batched upload of assignment grades - need testers

by James Dugal -
Yes, this is very true!  I was hoping the Moodle developers would have either provided an equivalent feature, or adopted my code (and made such a change as you suggest).
--James
In reply to Roel Cantada

Re: Batched upload of assignment grades - need testers

by James Dugal -
Roel, I attach to this msg a fix for the scaled-grades problem you reported above, and for the lookup of the 'uploadgrades' string in your current language's version of assignment.php. The various format error msgs remain in English (guess that's a chore for a future version?) Sorry for the goof on scaled grades...I think the new version will work OK now. --James
In reply to James Dugal

Re: Batched upload of assignment grades - need testers

by Roel Cantada -

Hi James,

I've tested your fix on the same Moodle server I mentioned earlier and with the same data.  I am happy to announce that it worked well ngiti.

Just some additional minor observations.  After the grades are uploaded, the gridlines of the page of students grades dissappear, and the browser is reporting some error on the page.  Sorry I failed to dig deeper.

Aside from this, when I made a user mistake and loaded my earlier data using scale 100 I got the invalid grade error message.  Would it not be more helpful to have an error message like "Wrong Assignment Scale.  Please correct the scale option in the Assignment settings page."

really like this patch kool, and I hope it gets into the standard Assignment module.  Is it already in contrib CVS?

Great work James,

Roel

In reply to Roel Cantada

Re: Batched upload of assignment grades - need testers

by James Dugal -
Roel, if a scaled grade value is not valid, the error message should begin with "Invalid scaled grade:" (unless a prior check found a more-generic error).

I haven't seen any browser strangeness (I am using Mozilla) but if you find something I should know, do pass it on!

As to putting this patch into the CVS/contrib, I don't have a CVS account.  I'll
ask Martin D. (but I bet he's pretty busy these days)!

Enjoy!
-- James
In reply to James Dugal

Re: Batched upload of assignment grades - need testers

by Roel Cantada -
Thank you for the clarification on the error message.

I did not actually make any mistake in the scaled grade value but in the selected scale.  In other words I was putting non-numerical grades in a numerical 100 points scale---human error.  But I already had a rethink on my suggestion because it would probably be difficult for the software to determine if the scale was wrong or the data was wrong, at least in my example since the integers 1.0 etc. was accepted.  At any rate just ignore my earlier suggestion.

As for the cell gridlines or borders problem I have attached an image.  The absence of the borders occur immediately after upload, and refreshing or viewing the page again returns it to normal.  This occured with a Firefox version 1 and IE.

I thought it was just a table style problem and compared the html source for this page with the normal.  All I saw was that this page output does not use <tbody> tags.  But the tbody tags in the normal did not have attributes so I'm still looking for the cause.

Personally I don't think it is a big deal since the code functions, but it is somewhat disconcerting.

Roel

Attachment uploadgr.png
In reply to Roel Cantada

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: Batched upload of assignment grades - need testers

by Michael Penney -

What do you think about adding a 'download grade sheet' button that gave the teacher a csv w/ all the partipants in the course? (and column headings, etc?

You can already do that from the gradebook.

In reply to Michael Penney

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

Re: Batched upload of assignment grades - need testers

by James Dugal -
Hi Randy!  Did you see the small mod (participants.zip) to the Participants display I described above?  It lists the Last/First/User names suitable for cut and paste.  It is one way to get the actual usernames for use with preparing a file of grades to upload.  See URL:   http://moodle.org/file.php/5/moddata/forum/117/152388/participants.zip

By the way, I have a new version of uploadgrades.zip that integrates with the quickgrade changes applied to the Assignment module.  However,  I want to download the very latest 1.5.2+ tarball and resync my changes with the very latest code.   Should have a new uploadgrades.zip in a day or so.


In reply to James Dugal

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to James Dugal

Re: Batched upload of assignment grades - need testers

by James Dugal -
OK, here's a new uploadgrades.zip derived from 1.5.2+ of 6 November 2005, ie,
after quickgrades stabilised. Enjoy!
--James

ps - Randy, I'll download your changes today!
In reply to James Dugal

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to Deleted user

This forum post has been removed

The content of this forum post has been removed and can no longer be accessed.
In reply to James Dugal

Re: Batched upload of assignment grades - need testers

by Jim Hardy -
Can this modification be used with v 1.7.1?

Thanks.
In reply to Jim Hardy

Re: Batched upload of assignment grades - need testers

by James Dugal -
Yes, the concept works fine in 1.7.x. I have updated the set of modifications from the 1.7.1 tarball of Jan 31, 2007, and uploaded the result. Enjoy!
--James Dugal
In reply to James Dugal

Re: Batched upload of assignment grades - need testers

by Jim Hardy -
I will. Thanks.
In reply to Jim Hardy

Re: Batched upload of assignment grades - need testers

by Kin Cheung -
Could anyone who are using uploadgrades.php shred some light on why
it does not work with Moodle1.8, we are using MySQL 5.0.41, PHP 4.4.7 and
APC 3.0.14.

James had created uploadgrades.php for instructors who have big classes., but unfortunately he is no longer with us.

Any suggestion will be appreciated.

Thank you.

-Kin
In reply to Kin Cheung

Re: Batched upload of assignment grades - need testers

by Julio Carrillo-Escobar -
Well, I'm just having a problem. After I installed the upload grades module for Moodle 1.7 into the Moodle 1.8.2, the module didn't work. Unfortunately for us, Mr. Dugal passed way earlier this year. Now it's when more valuable and appreciated can be appreciated his work to the Moodle community.

I really hope that if somebody has some patch to fix this problem can delivered and share it with us.
Average of ratings: Useful (2)
In reply to Julio Carrillo-Escobar

Re: Batched upload of assignment grades - need testers

by Jim Hardy -
I agree. Dr. Dugal's passing will be missed - along with this MUCH NEEDED feature.
In reply to Jim Hardy

Re: Batched upload of assignment grades - need testers

by Katarzyna Potocka -
May I ask you if you already fixed the problem with uploadgrades for Moodle 1.8.x.
I would also need this features for our teachers.

Thanks, Kasia