some problem about edx student grades download

2,543 views
Skip to first unread message

Wenjie Wu

unread,
Mar 2, 2015, 9:15:41 PM3/2/15
to edx-...@googlegroups.com
Hi , guys,
I want to download edx grades
I did the following thing 
  1. View the live version of your course.
  2. Click Instructor, then click Data Download.
  3. To open or save a grade report file, click the {course_id}_grade_report_{date}.csv file name at the bottom of the page.
The download link is file:///tmp/edx-s3/grades/xxxxx.csv . I can’t download it !
Really need your guide!
thanks ! 

Eugene Medvedev

unread,
Mar 3, 2015, 5:32:48 AM3/3/15
to edx-...@googlegroups.com
This really is where the grade report ends up -- in /tmp/ on the server. You obviously won't be able to download it from there unless you directly log into the server and pull the file out. As far as I've been able to find out, currently the only other option is to download the grades off S3.

For this to work, you need to, obvioulsy, have an S3 account, and set up edX to use it by putting these into your /edx/app/edx_ansible/server_vars.yml :

EDXAPP_AWS_ACCESS_KEY_ID: "<your AWS access key goes here>"
EDXAPP_AWS_SECRET_ACCESS_KEY: "<your AWS access secret goes here>"
EDXAPP_GRADE_BUCKET: '<you need some bucket name, though there might be a default. The bucket might need to exist>'
EDXAPP_GRADE_STORAGE_TYPE: "s3"
EDXAPP_GRADE_ROOT_PATH: 'grades'

And then /edx/bin/update edx-platform <whatever branch you installed>

If you do that, generated grades should end up in your S3 account and you will be able to download them. Mind you, this only really works up until a certain course size, and I'm not sure if using Insights (which hooks onto the tracking log as far as I can tell) is not the recommended way now.


Wenjie Wu

unread,
Mar 4, 2015, 9:12:24 PM3/4/15
to edx-...@googlegroups.com
oh,thank you very much !
Have another way to download it without using S3 ?  

在 2015年3月3日星期二 UTC+8下午6:32:48,Eugene Medvedev写道:

Eugene Medvedev

unread,
Mar 5, 2015, 2:32:27 AM3/5/15
to edx-...@googlegroups.com
On Thursday, 5 March 2015 05:12:24 UTC+3, Wenjie Wu wrote:

oh,thank you very much !
Have another way to download it without using S3 ?  

Not from the web interface, at least. While there is code in the tree related to pyfs, which would make it possible to store grades and uploaded files somewhere in the filesystem, grade download in particular does not use it yet. 

Melvin Bautista

unread,
May 5, 2015, 11:01:55 AM5/5/15
to edx-...@googlegroups.com
Hi Eugene, please help me, i try what you advise, but when the update master finish i still encounter the same error. they did not go to my bucket folder in s3. i dont know why but i follow your step.


Regards,
Melvin

Eugene Medvedev

unread,
May 14, 2015, 8:52:10 AM5/14/15
to edx-...@googlegroups.com
On Tuesday, 5 May 2015 18:01:55 UTC+3, Melvin Bautista wrote:
Hi Eugene, please help me, i try what you advise, but when the update master finish i still encounter the same error. they did not go to my bucket folder in s3. i dont know why but i follow your step.

Sorry for not answering earlier.

Did you get it to work? The first thing to investigate would be whether the settings actually made it into the json configuraiton files that edX reads the actual settings from. Unless you changed anything drastically, you want to look at these files:
  • /edx/app/edxapp/cms.auth.json
  • /edx/app/edxapp/lms.auth.json
  • /edx/app/edxapp/cms.env.json
  • /edx/app/edxapp/lms.env.json
If you did everything right, your AWS access key and secret should be in *.auth.json, and the setting regarding grade bucket name should be in lms.env.json. If they aren't there, you need to investigate if the update process is working.

If everything is in place, I don't have a particular clue, but I would start with running the S3 command line tool in /edx/app/aws/s3cmd-1.5.0-beta1/s3cmd and checking if AWS is actually accessible from this machine and if the key/secret are correct.

shubham rawat

unread,
Aug 7, 2015, 2:37:49 AM8/7/15
to General Open edX discussion
Hi, is this still the only way to download the csv?No way to do it without s3?

Alik Khilazhev

unread,
Sep 13, 2016, 6:40:36 AM9/13/16
to General Open edX discussion
I solved this issue with creating link to true location of .csv files(/tmp/edx-s3/grades) in /edx/var/edxapp/media directory

ln -s /tmp/edx-s3/grades /edx/var/edxapp/media

and then make little changes in nginx configuration.

nano /var/app/nginx/sites-available/lms

add following rule:

location ~ ^/grades/(?P<file>.*) {
    root /edx/var/edxapp/media/grades;
    try_files /$file =404;
    expires 31536000s;
}

Edit location rule for media, tall to search in /grades if there is no such file in /media

location ~ ^/media/(?P<file>.*) {
    root /edx/var/edxapp/media;
    try_files /$file /grades/$file;
    expires 31536000s;
}

and then restart nginx

service nginx restart

It should work ;-)

reina az

unread,
Oct 11, 2017, 2:34:49 PM10/11/17
to General Open edX discussion
It works Many thanx

reina az

unread,
Oct 11, 2017, 11:58:30 PM10/11/17
to General Open edX discussion
nano /EDX/app/nginx/sites-available/lms

Dede Hamzah

unread,
Jan 18, 2018, 7:57:27 PM1/18/18
to General Open edX discussion
This solved the problem with 404 links download, but the links is didn't automatically removed from the list after 5 minutes as the open edx states. How to solve this problem?

wasim...@dfmail.org

unread,
May 20, 2018, 6:19:33 PM5/20/18
to General Open edX discussion
Hi I tried this the below method 

but while updating the below file

nano /var/app/nginx/sites-available/lms

add following rule:

location ~ ^/grades/(?P<file>.*) {
    root /edx/var/edxapp/media/grades;
    try_files /$file =404;
    expires 31536000s;
}

it is showing as "lms permission denied " unable to save the file please let me what i need to do.  

Ernesto Sanchez

unread,
May 21, 2018, 12:50:05 PM5/21/18
to General Open edX discussion
Hi, check the answer from alik khilazhev, its works. i work with his solution.

I solved this issue with creating link to true location of .csv files(/tmp/edx-s3/grades) in /edx/var/edxapp/media directory

ln -s /tmp/edx-s3/grades /edx/var/edxapp/media

and then make little changes in nginx configuration.

nano /var/app/nginx/sites-available/lms

add following rule:

location ~ ^/grades/(?P<file>.*) {
    root /edx/var/edxapp/media/grades;
    try_files /$file =404;
    expires 31536000s;
}

Edit location rule for media, tall to search in /grades if there is no such file in /media

location ~ ^/media/(?P<file>.*) {
    root /edx/var/edxapp/media;
    try_files /$file /media/grades/$file;
    expires 31536000s;
}

and then restart nginx

service nginx restart

It should work ;-)

paul.e...@partnerlatam.com

unread,
Jun 12, 2018, 11:37:17 AM6/12/18
to General Open edX discussion
But this works on Ginkgo too??? we are having problems with this configuration on this version.

Ernesto Sanchez

unread,
Jun 12, 2018, 12:47:38 PM6/12/18
to General Open edX discussion
Yes, its works on ginkgo.

Александр Киреев

unread,
Sep 9, 2019, 1:00:46 PM9/9/19
to General Open edX discussion
Thank you so much!


вторник, 13 сентября 2016 г., 13:40:36 UTC+3 пользователь Alik Khilazhev написал:
Reply all
Reply to author
Forward
0 new messages