From 573d3c89fc62df85dd52eeb435c728885a812af4 Mon Sep 17 00:00:00 2001 From: Stephen Sanchez Date: Fri, 27 Jun 2014 11:28:11 -0400 Subject: [PATCH 1/3] Updating settings and requirements for lms and cms to support file upload --- cms/envs/common.py | 1 + lms/envs/aws.py | 3 +++ lms/envs/common.py | 1 + 3 files changed, 5 insertions(+) diff --git a/cms/envs/common.py b/cms/envs/common.py index 4bd842da47..df53ca4839 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -605,6 +605,7 @@ OPTIONAL_APPS = ( 'submissions', 'openassessment', 'openassessment.assessment', + 'openassessment.fileupload', 'openassessment.workflow', 'openassessment.xblock' ) diff --git a/lms/envs/aws.py b/lms/envs/aws.py index bd5ee9e0e8..410441d94d 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -312,6 +312,9 @@ if AWS_SECRET_ACCESS_KEY == "": AWS_STORAGE_BUCKET_NAME = AUTH_TOKENS.get('AWS_STORAGE_BUCKET_NAME', 'edxuploads') +# Specific setting for the File Upload Service to store media in a bucket. +FILE_UPLOAD_STORAGE_BUCKET_NAME = AUTH_TOKENS.get('AWS_STORAGE_BUCKET_NAME', 'edxuploads') + # If there is a database called 'read_replica', you can use the use_read_replica_if_available # function in util/query.py, which is useful for very large database reads DATABASES = AUTH_TOKENS['DATABASES'] diff --git a/lms/envs/common.py b/lms/envs/common.py index 7718ada4ca..f5a189fb94 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -1602,6 +1602,7 @@ OPTIONAL_APPS = ( 'submissions', 'openassessment', 'openassessment.assessment', + 'openassessment.fileupload', 'openassessment.workflow', 'openassessment.xblock' ) From ef68541069c372b41ec1bebe4a8a360fa545f18b Mon Sep 17 00:00:00 2001 From: Stephen Sanchez Date: Mon, 30 Jun 2014 14:49:12 -0400 Subject: [PATCH 2/3] updating ora2 version --- requirements/edx/github.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 0ffca52e33..13da3e4637 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -27,7 +27,7 @@ -e git+https://github.com/edx/bok-choy.git@82b4e82d79b9d4c6d087ebbfa26ea23235728e62#egg=bok_choy -e git+https://github.com/edx-solutions/django-splash.git@9965a53c269666a30bb4e2b3f6037c138aef2a55#egg=django-splash -e git+https://github.com/edx/acid-block.git@459aff7b63db8f2c5decd1755706c1a64fb4ebb1#egg=acid-xblock --e git+https://github.com/edx/edx-ora2.git@release-2014-06-23T13.19#egg=edx-ora2 +-e git+https://github.com/edx/edx-ora2.git@879045df14a85a68b73bced1a6eff5d1b05d6387#egg=edx-ora2 -e git+https://github.com/edx/opaque-keys.git@5929789900b3d0a354ce7274bde74edfd0430f03#egg=opaque-keys -e git+https://github.com/edx/ease.git@97de68448e5495385ba043d3091f570a699d5b5f#egg=ease -e git+https://github.com/edx/i18n-tools.git@f5303e82dff368c7595884d9325aeea1d802da25#egg=i18n-tools From f23492e14e204d68740b11e4c91a02e47ac06b6e Mon Sep 17 00:00:00 2001 From: Stephen Sanchez Date: Wed, 2 Jul 2014 15:25:45 -0400 Subject: [PATCH 3/3] Updating AWS settings --- lms/envs/aws.py | 3 ++- lms/envs/common.py | 3 +++ requirements/edx/github.txt | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lms/envs/aws.py b/lms/envs/aws.py index 410441d94d..70d1f19ee5 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -313,7 +313,8 @@ if AWS_SECRET_ACCESS_KEY == "": AWS_STORAGE_BUCKET_NAME = AUTH_TOKENS.get('AWS_STORAGE_BUCKET_NAME', 'edxuploads') # Specific setting for the File Upload Service to store media in a bucket. -FILE_UPLOAD_STORAGE_BUCKET_NAME = AUTH_TOKENS.get('AWS_STORAGE_BUCKET_NAME', 'edxuploads') +FILE_UPLOAD_STORAGE_BUCKET_NAME = ENV_TOKENS.get('FILE_UPLOAD_STORAGE_BUCKET_NAME', FILE_UPLOAD_STORAGE_BUCKET_NAME) +FILE_UPLOAD_STORAGE_PREFIX = ENV_TOKENS.get('FILE_UPLOAD_STORAGE_PREFIX', FILE_UPLOAD_STORAGE_PREFIX) # If there is a database called 'read_replica', you can use the use_read_replica_if_available # function in util/query.py, which is useful for very large database reads diff --git a/lms/envs/common.py b/lms/envs/common.py index f5a189fb94..4873c40e91 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -1393,6 +1393,9 @@ LINKEDIN_API = { # By default, don't use a file prefix ORA2_FILE_PREFIX = None +# Default File Upload Storage bucket and prefix. Used by the FileUpload Service. +FILE_UPLOAD_STORAGE_BUCKET_NAME = 'edxuploads' +FILE_UPLOAD_STORAGE_PREFIX = 'submissions_attachments' ##### ACCOUNT LOCKOUT DEFAULT PARAMETERS ##### MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED = 5 diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index 13da3e4637..0ffca52e33 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -27,7 +27,7 @@ -e git+https://github.com/edx/bok-choy.git@82b4e82d79b9d4c6d087ebbfa26ea23235728e62#egg=bok_choy -e git+https://github.com/edx-solutions/django-splash.git@9965a53c269666a30bb4e2b3f6037c138aef2a55#egg=django-splash -e git+https://github.com/edx/acid-block.git@459aff7b63db8f2c5decd1755706c1a64fb4ebb1#egg=acid-xblock --e git+https://github.com/edx/edx-ora2.git@879045df14a85a68b73bced1a6eff5d1b05d6387#egg=edx-ora2 +-e git+https://github.com/edx/edx-ora2.git@release-2014-06-23T13.19#egg=edx-ora2 -e git+https://github.com/edx/opaque-keys.git@5929789900b3d0a354ce7274bde74edfd0430f03#egg=opaque-keys -e git+https://github.com/edx/ease.git@97de68448e5495385ba043d3091f570a699d5b5f#egg=ease -e git+https://github.com/edx/i18n-tools.git@f5303e82dff368c7595884d9325aeea1d802da25#egg=i18n-tools