Skip to content

Commit

Permalink
Enable grade download by default
Browse files Browse the repository at this point in the history
It was tricky to define correct settings: the "localfs" default storage
backend was causing incorrect urls of the form "/media/<id>/<name>.csv".

Close #143
  • Loading branch information
regisb committed Mar 19, 2019
1 parent 9cd79fb commit abfbf1c
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## Latest

- [Feature] Enable grade downloads by default (#143)
- [Improvement] Remove orphan containers on `local start`

## 3.2.0 (2019-03-18)
Expand Down
1 change: 1 addition & 0 deletions tutor/templates/apps/openedx/config/lms.env.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"ENABLE_COURSEWARE_SEARCH": true,
"ENABLE_DASHBOARD_SEARCH": true,
"ENABLE_COMBINED_LOGIN_REGISTRATION": true,
"ENABLE_GRADE_DOWNLOADS": true,
"ENABLE_MOBILE_REST_API": true,
"ENABLE_OAUTH2_PROVIDER": true,
"ENABLE_EDXNOTES": {{ "true" if ACTIVATE_NOTES else "false" }}
Expand Down
2 changes: 1 addition & 1 deletion tutor/templates/apps/openedx/settings/cms/development.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
from cms.envs.devstack import *

INSTALLED_APPS.remove('openedx.core.djangoapps.datadog.apps.DatadogConfig')
Expand All @@ -23,7 +24,6 @@
LOCALE_PATHS.append('/openedx/locale')

# Create folders if necessary
import os
for folder in [LOG_DIR, MEDIA_ROOT, STATIC_ROOT_BASE]:
if not os.path.exists(folder):
os.makedirs(folder)
2 changes: 1 addition & 1 deletion tutor/templates/apps/openedx/settings/cms/production.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
from cms.envs.aws import *

INSTALLED_APPS.remove('openedx.core.djangoapps.datadog.apps.DatadogConfig')
Expand Down Expand Up @@ -32,7 +33,6 @@
LOCALE_PATHS.append('/openedx/locale')

# Create folders if necessary
import os
for folder in [LOG_DIR, MEDIA_ROOT, STATIC_ROOT_BASE]:
if not os.path.exists(folder):
os.makedirs(folder)
10 changes: 9 additions & 1 deletion tutor/templates/apps/openedx/settings/lms/development.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
from lms.envs.devstack import *

INSTALLED_APPS.remove('openedx.core.djangoapps.datadog.apps.DatadogConfig')
Expand Down Expand Up @@ -29,10 +30,17 @@
ORA2_FILEUPLOAD_ROOT = '/openedx/data/ora2'
ORA2_FILEUPLOAD_CACHE_NAME = 'ora2-storage'

GRADES_DOWNLOAD = {
'STORAGE_TYPE': '',
'STORAGE_KWARGS': {
'base_url': "/media/grades/",
'location': os.path.join(MEDIA_ROOT, 'grades'),
}
}

LOCALE_PATHS.append('/openedx/locale')

# Create folders if necessary
import os
for folder in [LOG_DIR, MEDIA_ROOT, STATIC_ROOT_BASE, ORA2_FILEUPLOAD_ROOT]:
if not os.path.exists(folder):
os.makedirs(folder)
10 changes: 9 additions & 1 deletion tutor/templates/apps/openedx/settings/lms/production.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import os
from lms.envs.aws import *

INSTALLED_APPS.remove('openedx.core.djangoapps.datadog.apps.DatadogConfig')
Expand Down Expand Up @@ -55,10 +56,17 @@
ORA2_FILEUPLOAD_ROOT = '/openedx/data/ora2'
ORA2_FILEUPLOAD_CACHE_NAME = 'ora2-storage'

GRADES_DOWNLOAD = {
'STORAGE_TYPE': '',
'STORAGE_KWARGS': {
'base_url': "/media/grades/",
'location': os.path.join(MEDIA_ROOT, 'grades'),
}
}

LOCALE_PATHS.append('/openedx/locale')

# Create folders if necessary
import os
for folder in [LOG_DIR, MEDIA_ROOT, STATIC_ROOT_BASE, ORA2_FILEUPLOAD_ROOT]:
if not os.path.exists(folder):
os.makedirs(folder)

0 comments on commit abfbf1c

Please sign in to comment.