mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-11-11 15:51:00 +00:00
7462f208de
Here, we upgrade all images from Ironwood to Hawthorn, except for the locales, which we did not generate yet.
45 lines
1.4 KiB
Python
45 lines
1.4 KiB
Python
import os
|
|
from lms.envs.devstack import *
|
|
|
|
# Load module store settings from config files
|
|
update_module_store_settings(MODULESTORE, doc_store_settings=DOC_STORE_CONFIG)
|
|
|
|
# Set uploaded media file path
|
|
MEDIA_ROOT = "/openedx/data/uploads/"
|
|
|
|
# Video settings
|
|
VIDEO_IMAGE_SETTINGS['STORAGE_KWARGS']['location'] = MEDIA_ROOT
|
|
VIDEO_TRANSCRIPTS_SETTINGS['STORAGE_KWARGS']['location'] = MEDIA_ROOT
|
|
|
|
# Change syslog-based loggers which don't work inside docker containers
|
|
LOGGING['handlers']['local'] = {'class': 'logging.NullHandler'}
|
|
LOGGING['handlers']['tracking'] = {
|
|
'level': 'DEBUG',
|
|
'class': 'logging.StreamHandler',
|
|
'formatter': 'standard',
|
|
}
|
|
|
|
# Fix media files paths
|
|
VIDEO_IMAGE_SETTINGS['STORAGE_KWARGS']['location'] = MEDIA_ROOT
|
|
VIDEO_TRANSCRIPTS_SETTINGS['STORAGE_KWARGS']['location'] = MEDIA_ROOT
|
|
PROFILE_IMAGE_BACKEND['options']['location'] = os.path.join(MEDIA_ROOT, 'profile-images/')
|
|
|
|
ORA2_FILEUPLOAD_BACKEND = 'filesystem'
|
|
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
|
|
for folder in [LOG_DIR, MEDIA_ROOT, STATIC_ROOT_BASE, ORA2_FILEUPLOAD_ROOT]:
|
|
if not os.path.exists(folder):
|
|
os.makedirs(folder)
|