Skip to content

Instantly share code, notes, and snippets.

@jramnai
Created October 23, 2021 10:31
Show Gist options
  • Save jramnai/a1d93401bf1bcc9dd88b3a72cbb320a0 to your computer and use it in GitHub Desktop.
Save jramnai/a1d93401bf1bcc9dd88b3a72cbb320a0 to your computer and use it in GitHub Desktop.

Grade Download issue on Native Installation of Open edX

Create symlink to actual CSV file location

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

Update location blocks in Nginx file of lms (/edx/app/nginx/sites-avaliable/lms)

  • Locate following block in the file
    location ~ ^/media/(?P<file>.*) {
        root /edx/var/edxapp/media;
        try_files /$file =404;
        expires 31536000s;
    }
    
  • Replace it with this one
    location ~ ^/media/(?P<file>.*) {
        root /edx/var/edxapp/media;
        try_files /$file /grades/$file;
        expires 31536000s;
    }
    location ~ ^/grades/(?P<file>.*) {
        root /edx/var/edxapp/media/grades;
        try_files /$file =404;
        expires 31536000s;
    }
    

Restart Nginx service

sudo service nginx restart

Credit/Reference

https://dwisulfahnur.medium.com/open-edx-student-grades-download-issue-404-not-found-3d7995980389

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment