import csv file does not work

import csv file does not work

by David Bayya -
Number of replies: 10

import csv file into grader report does not work (moodle 1.9.7+), here is my tutorial in photos:

1st photo: the grader report before exporting:

4559539783_5d269d3783_o.jpg

2nd photo: the export page:

4560168554_ced5f4be82_o.jpg

3rd photo: the csv file after exporting and editing grade of assignment(a1) for User One :

4559539611_ba9cdb4dcc_o.jpg

4th photo: the import page and mappings :

4560168646_d83f0f7ebf_o.jpg

5th photo:

4559539689_b8acd9948c_o.jpg

6th photo: gradebook state after importing:

4559539739_1927bb4d7f_o.jpg

it is unchanged !! why ?

thank you so much in advance !

In reply to David Bayya

Re: import csv file does not work

by Teresa Gibbison -
Hi David
I'm not sure how you are creating your csv file but I can see semicolons (;) instead of commas (,) between the fields.

Your .csv file (when viewed in a text editor and in the preview) should looks like this:
Firstname,Surname, ID number,Institution, etc NOT like this Firstname;Surname; etc

When you import the grades the "Map to" drodown should list each column heading as new lines, you should then select relevant identifiers (we use ID number because the student's ID number is in the ID number field of their Moodle profile). You need to note that the 'userid' is the Moodle ID number not the one in the ID number field of the profile.

I hope this helps
Cheers
Teresa
In reply to Teresa Gibbison

Re: import csv file does not work

by Murad Jamal -

Hi Teresa,

I faced the exact problem, thank you so much for clarification

In reply to David Bayya

Re: import csv file does not work

by Jason Hollowell -
Picture of Particularly helpful Moodlers
Are people able to successfully use the import csv file function in the Gradebook? I have a similar issue to the one posted here but see that the import screen (mappings) appears to have changed in more recent versions of Moodle. I'm using 1.9.8+ and can't seem to get the import csv file function to do anything.

It recognizes, and reads, my csv file and displays the preview rows. I select the mapping scheme and grade item mapping as shown in the attached screen shot but when I click on Upload grades I simply get a screen that reads "CSV file". If I click on the breadcrumb to get back to my course and check the Gradebook, nothing has changed.

I've checked the formatting of the CSV file and everything is in order....?

Jason
Attachment csvimport.png
In reply to Jason Hollowell

Re: import csv file does not work

by Teresa Gibbison -
Hi Jason
Yes, we are still on 1.9.8+ (until early next week) and can import into the gradebook easily.

It sounds odd that the preview is looking OK (can you give us a screenshot?). Can you import into another (sandpit?) course with the same file?

Cheers
Teresa
In reply to Teresa Gibbison

Re: import csv file does not work

by Jason Hollowell -
Picture of Particularly helpful Moodlers
Teresa,

Thanks for the response. Sorry, I left the files on the computer in my office. I'll give it another try tomorrow and post up here again.

I didn't try importing into a different course. I'll try that as well.

Post back soon.

Jason
In reply to Jason Hollowell

Re: import csv file does not work

by Jason Hollowell -
Picture of Particularly helpful Moodlers
Teresa,

Here is another screen shot. It's basically the same as before but I cropped it higher so you can see the preview window.

Actually I can't import into another course because I don't have one with the same members and grade items.

Just to review, here is what I have done.

Go to a course and export the grades
Used the exported file to insert grades that are empty (final exam)
Save the file as CSV
Attempt to 're-import' the grades in order to have the "final exam" score added to the grade book.

Everything looks like it's going to work but, as I mentioned previously, when I click on "Upload Grades" I just get a screen that says "CSV File" and nothing else. When I go back to the gradebook, nothing has been changed...?

Thanks in advance for any advice you can provide.

Jason

P.S. The scores I am trying to import are "Final Exam" 60, 50, 40, 30
Attachment grades.jpg
In reply to Jason Hollowell

Re: import csv file does not work

by Itamar Tzadok -
The image suggests that the user identification mapping is improper. 'userid' is afaict the Moodle internal user id. You don't get that id in the export file so unless you obtain the list some other way and include it in the csv you can't really use it for import identification. Some of the columns are not mappable. If the list of 'map to' fields in your version is the same as mine, I'd say your best choice is map from Email address to useremail. hth smile
In reply to Itamar Tzadok

Re: import csv file does not work

by Jason Hollowell -
Picture of Particularly helpful Moodlers
Itamar,

Thanks. I thought it was mapping from the firs name in the file I was trying to upload to the userid. Guess I had it backwards in my mind smile

I'll experiment a little with the mapping scheme and see what kind of results I can get.

It would be nice if this feature would throw an error for a scheme that doesn't work.

Thanks again.

Jason
In reply to Jason Hollowell

Re: import csv file does not work

by Itamar Tzadok -
But you see the scheme you were applying did work. All the records corresponding to the users according to your mapping were imported successfully. It just that the mapping from First name to userid produced an empty group and so no records were actually imported (successfully). So, no error to throw but alerting the number of records actually imported could be useful.

You can also 'ignore' the user identification mapping. I haven't tried that but I guess that may work if your csv is ordered in the exact same way as the internal order of the list in the gradebook (that is without any sort filter).

smile
In reply to Itamar Tzadok

Re: import csv file does not work

by Jason Hollowell -
Picture of Particularly helpful Moodlers
I see. Hmm, I guess it is a logic argument huh? smile I do see your point though. It's not so much an error as an unsuccessful attempt to import grades on my part. So, yeah, I agree that a "zero" message would be helpful.

I switched to the e-mail mapping scheme you proposed and it was SUCCESSFUL! Thanks a million. big grin

I'm a little embarrassed that I couldn't figure this out on my own but that's what's so great about the forums here I guess. smile

Thanks again.

Jason