Grades downloaded in Excel lose student names

Grades downloaded in Excel lose student names

by Worth Bishop -
Number of replies: 6

Have checked forums but find no posting addressing this.

After upgrading to Moodle 1.6.x from 1.5.x, in all our courses, when we now click Grades and "Download in Excel Format" we lose the student names, column headings, etc.  (See attached .jpg for screenshot)

If we click "Download in text format" we get the full download.

Any thoughts on how to fix?

Thanks!

We're using:

Moodle 1.6.1+
PostgreSQL 8.1.4
FreeBSD
PHP 4.3.2
Excel 2002

 

Attachment grades.jpg
Average of ratings: -
In reply to Worth Bishop

Re: Grades downloaded in Excel lose student names

by Samuli Karevaara -
Some old technical oriented ramblings on this at http://moodle.org/mod/forum/discuss.php?d=51834.

Bottom line: I can confirm that this issue will go away by upgrading to PHP 5.1.6 or PHP 5.2.0. Another workaround is to install iconv module on PHP 4.

Or is this happening on PHP 4 boxes with iconv too? If not, there are a bunch of bugs on this in the Tracker that could be resolved as "Won't fix" with these two workarounds.
In reply to Samuli Karevaara

Re: Grades downloaded in Excel lose student names

by Chris Gibson -
I'm afraid that I have PHP 5.1.6 and iconv installed, and I still have issues downloading to Excel.

However, I am running moodle on a x86_64 machine, so maybe that's why that upgrade-to-fix doesn't work?
In reply to Chris Gibson

Re: Grades downloaded in Excel lose student names

by Samuli Karevaara -
Is it the exact same issue than above or something else? Can you save the file and open it in notepad (or similar) to see if there are some error messages or notices in the file that break it in Excel?
In reply to Samuli Karevaara

Re: Grades downloaded in Excel lose student names

by Chris Gibson -
Not the exact same problem, as I don't have access to Excel: however in OpenOffice a number of the cells (not all, about a third) contain '*** ERROR IN SST ***'.

No error messages when I download the file and view with a text editor.

In reply to Chris Gibson

Re: Grades downloaded in Excel lose student names

by Samuli Karevaara -
Ok, then the issue above might still be directly related to the iconv module and PHP version.

Could you consider adding comments to Bug 4971, maybe add an example file (with student names removed!) that has these errors? I've tested some relatively simple grading tables in OpenOffice Spreadsheet 2.0.4 and didn't get any errors (Moodle 1.6.3+).
In reply to Worth Bishop

Re: Grades downloaded in Excel lose student names

by John Moon -

Actually you can use a very good excel trick to get what you want whilst this problem is resolved.

1. Open up Grades
2. Click on Uncategorized near the top of the table.
3. Open up Excel
4. Go to the Data menu
5. Go to Import External Data
6. Click on New Web Query and a box will open up (you can maximise it if you want).
7. Go back to moodle where you have the uncategorized results, and copy the URL of that page
8. Go to Excel, and in the Address bar paste in the URL from the grades page
8. Click on the Go button
9. In this box the front page of your Moodle site will appear, login with your admin account, you will be taken to the grades page where you will see various sections with little black arrows in little yellow boxes.
10. If you move your mouse cursor over the arrow at the level below the download buttons on the left hand side you will see that a border will surround all the data.
11. Click on this arrow so that it turns into a tick
12. Click on the Import button down the bottom right hand corner
13. Click on the OK button on the little box that appears, it will go away, and after a minute or so Excel will be populated with all the data from the Grades table.
14. Clean up the spreadsheet by getting rid of any unwanted rows or columns.

I try and use this method as often as I can on tables that Moodle generates as the results are so much nicer.

JM