Skip to content

Commit

Permalink
Merge pull request #1 from CUCWD/feature.maple/ztraboo/configure-educ…
Browse files Browse the repository at this point in the history
…ateworkforce

Initial configuration for EducateWorkforce
  • Loading branch information
ztraboo authored Jan 11, 2024
2 parents 9560ff0 + 7be9d72 commit f07e035
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 6 deletions.
1 change: 1 addition & 0 deletions tutors3/patches/openedx-cms-common-settings
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
COURSE_IMPORT_EXPORT_BUCKET = "{{ S3_STORAGE_BUCKET }}"
COURSE_IMPORT_EXPORT_STORAGE = DEFAULT_FILE_STORAGE
USER_TASKS_ARTIFACT_STORAGE = DEFAULT_FILE_STORAGE
22 changes: 21 additions & 1 deletion tutors3/patches/openedx-common-settings
Original file line number Diff line number Diff line change
@@ -1,8 +1,28 @@
DEFAULT_FILE_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"

VIDEO_IMAGE_SETTINGS["STORAGE_CLASS"] = DEFAULT_FILE_STORAGE
VIDEO_IMAGE_SETTINGS["STORAGE_KWARGS"]["bucket"] = "{{ S3_STORAGE_BUCKET }}"
VIDEO_IMAGE_SETTINGS["STORAGE_KWARGS"]["location"] = VIDEO_IMAGE_SETTINGS["STORAGE_KWARGS"]["location"].lstrip("/")

VIDEO_TRANSCRIPTS_SETTINGS["STORAGE_CLASS"] = DEFAULT_FILE_STORAGE
VIDEO_TRANSCRIPTS_SETTINGS["STORAGE_KWARGS"]["bucket"] = "{{ S3_STORAGE_BUCKET }}"
VIDEO_TRANSCRIPTS_SETTINGS["STORAGE_KWARGS"]["location"] = VIDEO_TRANSCRIPTS_SETTINGS["STORAGE_KWARGS"]["location"].lstrip("/")
GRADES_DOWNLOAD["STORAGE_KWARGS"]["location"] = GRADES_DOWNLOAD["STORAGE_KWARGS"]["location"].lstrip("/")

GRADES_DOWNLOAD["STORAGE_CLASS"] = DEFAULT_FILE_STORAGE
GRADES_DOWNLOAD["STORAGE_KWARGS"]["bucket"] = "{{ S3_GRADE_BUCKET }}"
GRADES_DOWNLOAD["STORAGE_KWARGS"]["base_url"] = "/reports/data-downloads/"
GRADES_DOWNLOAD["STORAGE_KWARGS"]["location"] = "/openedx/reports/data-downloads"
GRADES_DOWNLOAD["STORAGE_KWARGS"]["location"] = GRADES_DOWNLOAD["STORAGE_KWARGS"]["location"].lstrip("/")

COURSE_STRUCTURE_DOWNLOAD = {
"STORAGE_CLASS": DEFAULT_FILE_STORAGE,
"STORAGE_TYPE": "s3",
"STORAGE_KWARGS": {
"bucket": "{{ S3_COURSE_STRUCTURE_BUCKET }}",
"base_url": "/reports/course-structure/",
"location": "/openedx/reports/course-structure",
},
}

ORA2_FILEUPLOAD_BACKEND = "s3"
FILE_UPLOAD_STORAGE_BUCKET_NAME = "{{ S3_FILE_UPLOAD_BUCKET }}"
Expand Down
11 changes: 6 additions & 5 deletions tutors3/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,18 @@
"VERSION": __version__,
"HOST": "",
"PORT": "",
"REGION": "",
"REGION": "us-east-1",
"USE_SSL": True,
"STORAGE_BUCKET": "openedx",
"STORAGE_BUCKET": "educateworkforce-private",
"FILE_UPLOAD_BUCKET": "{{ S3_STORAGE_BUCKET }}",
"PROFILE_IMAGE_BUCKET": "",
"PROFILE_IMAGE_BUCKET": "educateworkforce-public",
"GRADE_BUCKET": "{{ S3_STORAGE_BUCKET }}",
"PROFILE_IMAGE_CUSTOM_DOMAIN": "",
"COURSE_STRUCTURE_BUCKET": "{{ S3_STORAGE_BUCKET }}",
"PROFILE_IMAGE_CUSTOM_DOMAIN": "d2xn5teicgwhnq.cloudfront.net",
"PROFILE_IMAGE_MAX_AGE": "31536000",
"ADDRESSING_STYLE": "auto",
"SIGNATURE_VERSION": "s3v4",
"CUSTOM_DOMAIN": "",
"CUSTOM_DOMAIN": "d38f8pc5t7fpx2.cloudfront.net",
},
}

Expand Down

0 comments on commit f07e035

Please sign in to comment.