Merge pull request #34857 from CodeWithEmad/chore/cleanup
chore: cleanup
This commit is contained in:
4
.github/actions/unit-tests/action.yml
vendored
4
.github/actions/unit-tests/action.yml
vendored
@@ -1,5 +1,5 @@
|
||||
name: 'Run unit tests'
|
||||
description: 'shared steps to run unit tests on both Github hosted and self hosted runners.'
|
||||
name: "Run unit tests"
|
||||
description: "shared steps to run unit tests on both Github hosted and self hosted runners."
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: 'Verify unit tests count'
|
||||
description: 'shared steps to verify unit tests count on both Github hosted and self hosted runners.'
|
||||
name: "Verify unit tests count"
|
||||
description: "shared steps to verify unit tests count on both Github hosted and self hosted runners."
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
@@ -15,14 +15,12 @@ runs:
|
||||
echo "cms_unit_test_paths=$(python scripts/gha_unit_tests_collector.py --cms-only)" >> $GITHUB_ENV
|
||||
echo "lms_unit_test_paths=$(python scripts/gha_unit_tests_collector.py --lms-only)" >> $GITHUB_ENV
|
||||
|
||||
|
||||
- name: collect tests from GHA unit test shards
|
||||
shell: bash
|
||||
run: |
|
||||
echo "cms_unit_tests_count=$(pytest --disable-warnings --collect-only --ds=cms.envs.test ${{ env.cms_unit_test_paths }} -q | head -n -2 | wc -l)" >> $GITHUB_ENV
|
||||
echo "lms_unit_tests_count=$(pytest --disable-warnings --collect-only --ds=lms.envs.test ${{ env.lms_unit_test_paths }} -q | head -n -2 | wc -l)" >> $GITHUB_ENV
|
||||
|
||||
|
||||
- name: add unit tests count
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
7
.github/pull_request_template.md
vendored
7
.github/pull_request_template.md
vendored
@@ -8,9 +8,8 @@ Use conventional commits to separate and summarize commits logically:
|
||||
https://open-edx-proposals.readthedocs.io/en/latest/oep-0051-bp-conventional-commits.html
|
||||
|
||||
Use this template as a guide. Omit sections that don't apply.
|
||||
You may link to information rather than copy it, but only if the link is publicly
|
||||
readable. If you must linked information must be private (because it has secrets),
|
||||
clearly label the link as private.
|
||||
You may link to information rather than copy it, but only if the link is publicly readable.
|
||||
If the linked information must be private (because it contains secrets), clearly label the link as private.
|
||||
|
||||
-->
|
||||
|
||||
@@ -22,6 +21,7 @@ Design decisions and their rationales should be documented in the repo (docstrin
|
||||
linked here.
|
||||
|
||||
Useful information to include:
|
||||
|
||||
- Which edX user roles will this change impact? Common user roles are "Learner", "Course Author",
|
||||
"Developer", and "Operator".
|
||||
- Include screenshots for changes to the UI (ideally, both "before" and "after" screenshots, if applicable).
|
||||
@@ -44,6 +44,7 @@ Please provide detailed step-by-step instructions for testing this change.
|
||||
## Other information
|
||||
|
||||
Include anything else that will help reviewers and consumers understand the change.
|
||||
|
||||
- Does this change depend on other changes elsewhere?
|
||||
- Any special concerns or limitations? For example: deprecations, migrations, security, or accessibility.
|
||||
- If your [database migration](https://openedx.atlassian.net/wiki/spaces/AC/pages/23003228/Everything+About+Database+Migrations) can't be rolled back easily.
|
||||
|
||||
@@ -17,4 +17,3 @@ on:
|
||||
jobs:
|
||||
add_remove_labels:
|
||||
uses: openedx/.github/.github/workflows/add-remove-label-on-comment.yml@master
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ jobs:
|
||||
- uses: actions/setup-python@v5
|
||||
if: ${{ env.RELEVANT == 'true' }}
|
||||
with:
|
||||
python-version: '3.8'
|
||||
python-version: "3.8"
|
||||
|
||||
- name: "Recompile requirements"
|
||||
if: ${{ env.RELEVANT == 'true' }}
|
||||
|
||||
4
.github/workflows/check-for-tutorial-prs.yml
vendored
4
.github/workflows/check-for-tutorial-prs.yml
vendored
@@ -14,7 +14,7 @@ on:
|
||||
pull_request:
|
||||
types: [opened]
|
||||
paths:
|
||||
- 'lms/templates/dashboard.html'
|
||||
- "lms/templates/dashboard.html"
|
||||
|
||||
jobs:
|
||||
# Provide helpful bot comment
|
||||
@@ -32,4 +32,4 @@ jobs:
|
||||
Thank you for your pull request! Congratulations on completing the Open edX tutorial! A team member will be by to take a look shortly.
|
||||
To those watching community pull requests: No need to worry about this one, a tCRIL team member will be taking care of it.
|
||||
For this PR's author: If this is a PR that is NOT coming from the Open edX tutorial, please comment and let us know to disregard this message.
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
4
.github/workflows/ci-static-analysis.yml
vendored
4
.github/workflows/ci-static-analysis.yml
vendored
@@ -9,8 +9,8 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
python-version:
|
||||
- '3.11'
|
||||
os: ['ubuntu-20.04']
|
||||
- "3.11"
|
||||
os: ["ubuntu-20.04"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -4,9 +4,9 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'Target branch to create requirements PR against'
|
||||
description: "Target branch to create requirements PR against"
|
||||
required: true
|
||||
default: 'master'
|
||||
default: "master"
|
||||
type: string
|
||||
|
||||
defaults:
|
||||
|
||||
13
.github/workflows/docker-publish.yml
vendored
13
.github/workflows/docker-publish.yml
vendored
@@ -9,8 +9,8 @@ jobs:
|
||||
# See also https://docs.docker.com/docker-hub/builds/
|
||||
push:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push'
|
||||
|
||||
if: github.event_name == 'push'
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
variant:
|
||||
@@ -32,12 +32,11 @@ jobs:
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
- name: Build and push lms base docker image
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
run : make docker_tag_build_push_${{matrix.variant}}
|
||||
|
||||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
run: make docker_tag_build_push_${{matrix.variant}}
|
||||
|
||||
115
.github/workflows/js-tests.yml
vendored
115
.github/workflows/js-tests.yml
vendored
@@ -12,74 +12,73 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-20.04 ]
|
||||
node-version: [ 18 ]
|
||||
os: [ubuntu-20.04]
|
||||
node-version: [18]
|
||||
python-version:
|
||||
- '3.11'
|
||||
- "3.11"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Fetch master to compare coverage
|
||||
run: git fetch --depth=1 origin master
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- name: Fetch master to compare coverage
|
||||
run: git fetch --depth=1 origin master
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Setup npm
|
||||
run: npm i -g npm@10.5.x
|
||||
|
||||
- name: Setup npm
|
||||
run: npm i -g npm@10.5.x
|
||||
- name: Install Firefox 123.0
|
||||
run: |
|
||||
sudo apt-get purge firefox
|
||||
wget "https://ftp.mozilla.org/pub/firefox/releases/123.0/linux-x86_64/en-US/firefox-123.0.tar.bz2"
|
||||
tar -xjf firefox-123.0.tar.bz2
|
||||
sudo mv firefox /opt/firefox
|
||||
sudo ln -s /opt/firefox/firefox /usr/bin/firefox
|
||||
|
||||
- name: Install Firefox 123.0
|
||||
run: |
|
||||
sudo apt-get purge firefox
|
||||
wget "https://ftp.mozilla.org/pub/firefox/releases/123.0/linux-x86_64/en-US/firefox-123.0.tar.bz2"
|
||||
tar -xjf firefox-123.0.tar.bz2
|
||||
sudo mv firefox /opt/firefox
|
||||
sudo ln -s /opt/firefox/firefox /usr/bin/firefox
|
||||
- name: Install Required System Packages
|
||||
run: sudo apt-get update && sudo apt-get install libxmlsec1-dev ubuntu-restricted-extras xvfb
|
||||
|
||||
- name: Install Required System Packages
|
||||
run: sudo apt-get update && sudo apt-get install libxmlsec1-dev ubuntu-restricted-extras xvfb
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache-dir
|
||||
run: |
|
||||
echo "::set-output name=dir::$(pip cache dir)"
|
||||
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache-dir
|
||||
run: |
|
||||
echo "::set-output name=dir::$(pip cache dir)"
|
||||
- name: Cache pip dependencies
|
||||
id: cache-dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pip-cache-dir.outputs.dir }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/base.txt') }}
|
||||
restore-keys: ${{ runner.os }}-pip-
|
||||
|
||||
- name: Cache pip dependencies
|
||||
id: cache-dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pip-cache-dir.outputs.dir }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/base.txt') }}
|
||||
restore-keys: ${{ runner.os }}-pip-
|
||||
- name: Install Required Python Dependencies
|
||||
run: |
|
||||
make base-requirements
|
||||
|
||||
- name: Install Required Python Dependencies
|
||||
run: |
|
||||
make base-requirements
|
||||
- uses: c-hive/gha-npm-cache@v1
|
||||
- name: Run JS Tests
|
||||
env:
|
||||
TEST_SUITE: js-unit
|
||||
SCRIPT_TO_RUN: ./scripts/generic-ci-tests.sh
|
||||
run: |
|
||||
npm install -g jest
|
||||
xvfb-run --auto-servernum ./scripts/all-tests.sh
|
||||
|
||||
- uses: c-hive/gha-npm-cache@v1
|
||||
- name: Run JS Tests
|
||||
env:
|
||||
TEST_SUITE: js-unit
|
||||
SCRIPT_TO_RUN: ./scripts/generic-ci-tests.sh
|
||||
run: |
|
||||
npm install -g jest
|
||||
xvfb-run --auto-servernum ./scripts/all-tests.sh
|
||||
|
||||
- name: Save Job Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Build-Artifacts
|
||||
path: |
|
||||
reports/**/*
|
||||
test_root/log/*.png
|
||||
test_root/log/*.log
|
||||
**/TEST-*.xml
|
||||
overwrite: true
|
||||
- name: Save Job Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Build-Artifacts
|
||||
path: |
|
||||
reports/**/*
|
||||
test_root/log/*.png
|
||||
test_root/log/*.log
|
||||
**/TEST-*.xml
|
||||
overwrite: true
|
||||
|
||||
3
.github/workflows/lint-imports.yml
vendored
3
.github/workflows/lint-imports.yml
vendored
@@ -7,7 +7,6 @@ on:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
|
||||
lint-imports:
|
||||
name: Lint Python Imports
|
||||
runs-on: ubuntu-20.04
|
||||
@@ -19,7 +18,7 @@ jobs:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Install system requirements
|
||||
run: sudo apt update && sudo apt install -y libxmlsec1-dev
|
||||
|
||||
2
.github/workflows/lockfileversion-check.yml
vendored
2
.github/workflows/lockfileversion-check.yml
vendored
@@ -5,7 +5,7 @@ name: Lockfile Version check
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
|
||||
120
.github/workflows/migrations-check.yml
vendored
120
.github/workflows/migrations-check.yml
vendored
@@ -13,9 +13,9 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-20.04 ]
|
||||
os: [ubuntu-20.04]
|
||||
python-version:
|
||||
- '3.11'
|
||||
- "3.11"
|
||||
# 'pinned' is used to install the latest patch version of Django
|
||||
# within the global constraint i.e. Django==4.2.8 in current case
|
||||
# because we have global constraint of Django<4.2
|
||||
@@ -50,73 +50,73 @@ jobs:
|
||||
--health-timeout 5s
|
||||
--health-retries 3
|
||||
steps:
|
||||
- name: Setup mongodb user
|
||||
run: |
|
||||
mongosh edxapp --eval '
|
||||
db.createUser(
|
||||
{
|
||||
user: "edxapp",
|
||||
pwd: "password",
|
||||
roles: [
|
||||
{ role: "readWrite", db: "edxapp" },
|
||||
]
|
||||
}
|
||||
);
|
||||
'
|
||||
- name: Setup mongodb user
|
||||
run: |
|
||||
mongosh edxapp --eval '
|
||||
db.createUser(
|
||||
{
|
||||
user: "edxapp",
|
||||
pwd: "password",
|
||||
roles: [
|
||||
{ role: "readWrite", db: "edxapp" },
|
||||
]
|
||||
}
|
||||
);
|
||||
'
|
||||
|
||||
- name: Verify mongo and mysql db credentials
|
||||
run: |
|
||||
mysql -h 127.0.0.1 -uedxapp001 -ppassword -e "select 1;" edxapp
|
||||
mongosh --host 127.0.0.1 --username edxapp --password password --eval 'use edxapp; db.adminCommand("ping");' edxapp
|
||||
- name: Verify mongo and mysql db credentials
|
||||
run: |
|
||||
mysql -h 127.0.0.1 -uedxapp001 -ppassword -e "select 1;" edxapp
|
||||
mongosh --host 127.0.0.1 --username edxapp --password password --eval 'use edxapp; db.adminCommand("ping");' edxapp
|
||||
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Setup Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install system Packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
make ubuntu-requirements
|
||||
- name: Install system Packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
make ubuntu-requirements
|
||||
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache-dir
|
||||
run: |
|
||||
echo "::set-output name=dir::$(pip cache dir)"
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache-dir
|
||||
run: |
|
||||
echo "::set-output name=dir::$(pip cache dir)"
|
||||
|
||||
- name: Cache pip dependencies
|
||||
id: cache-dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pip-cache-dir.outputs.dir }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }}
|
||||
restore-keys: ${{ runner.os }}-pip-
|
||||
- name: Cache pip dependencies
|
||||
id: cache-dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pip-cache-dir.outputs.dir }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }}
|
||||
restore-keys: ${{ runner.os }}-pip-
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
make dev-requirements
|
||||
if [[ "${{ matrix.django-version }}" != "pinned" ]]; then
|
||||
pip install "django~=${{ matrix.django-version }}.0"
|
||||
pip check # fail if this test-reqs/Django combination is broken
|
||||
fi
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
make dev-requirements
|
||||
if [[ "${{ matrix.django-version }}" != "pinned" ]]; then
|
||||
pip install "django~=${{ matrix.django-version }}.0"
|
||||
pip check # fail if this test-reqs/Django combination is broken
|
||||
fi
|
||||
|
||||
- name: list installed package versions
|
||||
run: |
|
||||
sudo pip freeze
|
||||
- name: list installed package versions
|
||||
run: |
|
||||
sudo pip freeze
|
||||
|
||||
- name: Run Tests
|
||||
env:
|
||||
LMS_CFG: lms/envs/minimal.yml
|
||||
# This is from the LMS dir on purpose since we don't need anything different for the CMS yet.
|
||||
STUDIO_CFG: lms/envs/minimal.yml
|
||||
run: |
|
||||
echo "Running the LMS migrations."
|
||||
./manage.py lms migrate
|
||||
echo "Running the CMS migrations."
|
||||
./manage.py cms migrate
|
||||
- name: Run Tests
|
||||
env:
|
||||
LMS_CFG: lms/envs/minimal.yml
|
||||
# This is from the LMS dir on purpose since we don't need anything different for the CMS yet.
|
||||
STUDIO_CFG: lms/envs/minimal.yml
|
||||
run: |
|
||||
echo "Running the LMS migrations."
|
||||
./manage.py lms migrate
|
||||
echo "Running the CMS migrations."
|
||||
./manage.py cms migrate
|
||||
|
||||
# This job aggregates test results. It's the required check for branch protection.
|
||||
# https://github.com/marketplace/actions/alls-green#why
|
||||
|
||||
@@ -41,4 +41,3 @@ jobs:
|
||||
run: |
|
||||
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f scripts/ci-runner.Dockerfile .
|
||||
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
|
||||
|
||||
|
||||
109
.github/workflows/quality-checks.yml
vendored
109
.github/workflows/quality-checks.yml
vendored
@@ -13,71 +13,70 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-20.04 ]
|
||||
os: [ubuntu-20.04]
|
||||
python-version:
|
||||
- '3.11'
|
||||
node-version: [ 18 ]
|
||||
- "3.11"
|
||||
node-version: [18]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- name: Fetch base branch for comparison
|
||||
run: git fetch --depth=1 origin ${{ github.base_ref }}
|
||||
|
||||
- name: Fetch base branch for comparison
|
||||
run: git fetch --depth=1 origin ${{ github.base_ref }}
|
||||
- name: Install Required System Packages
|
||||
run: sudo apt-get update && sudo apt-get install libxmlsec1-dev
|
||||
|
||||
- name: Install Required System Packages
|
||||
run: sudo apt-get update && sudo apt-get install libxmlsec1-dev
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Setup npm
|
||||
run: npm i -g npm@8.5.x
|
||||
|
||||
- name: Setup npm
|
||||
run: npm i -g npm@8.5.x
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache-dir
|
||||
run: |
|
||||
echo "::set-output name=dir::$(pip cache dir)"
|
||||
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache-dir
|
||||
run: |
|
||||
echo "::set-output name=dir::$(pip cache dir)"
|
||||
- name: Cache pip dependencies
|
||||
id: cache-dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pip-cache-dir.outputs.dir }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/testing.txt') }}
|
||||
restore-keys: ${{ runner.os }}-pip-
|
||||
|
||||
- name: Cache pip dependencies
|
||||
id: cache-dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pip-cache-dir.outputs.dir }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/testing.txt') }}
|
||||
restore-keys: ${{ runner.os }}-pip-
|
||||
- name: Install Required Python Dependencies
|
||||
env:
|
||||
PIP_SRC: ${{ runner.temp }}
|
||||
run: |
|
||||
make test-requirements
|
||||
|
||||
- name: Install Required Python Dependencies
|
||||
env:
|
||||
PIP_SRC: ${{ runner.temp }}
|
||||
run: |
|
||||
make test-requirements
|
||||
- name: Run Quality Tests
|
||||
env:
|
||||
TEST_SUITE: quality
|
||||
SCRIPT_TO_RUN: ./scripts/generic-ci-tests.sh
|
||||
PIP_SRC: ${{ runner.temp }}
|
||||
TARGET_BRANCH: ${{ github.base_ref }}
|
||||
run: |
|
||||
./scripts/all-tests.sh
|
||||
|
||||
- name: Run Quality Tests
|
||||
env:
|
||||
TEST_SUITE: quality
|
||||
SCRIPT_TO_RUN: ./scripts/generic-ci-tests.sh
|
||||
PIP_SRC: ${{ runner.temp }}
|
||||
TARGET_BRANCH: ${{ github.base_ref }}
|
||||
run: |
|
||||
./scripts/all-tests.sh
|
||||
|
||||
- name: Save Job Artifacts
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Build-Artifacts
|
||||
path: |
|
||||
**/reports/**/*
|
||||
test_root/log/**/*.log
|
||||
*.log
|
||||
overwrite: true
|
||||
- name: Save Job Artifacts
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Build-Artifacts
|
||||
path: |
|
||||
**/reports/**/*
|
||||
test_root/log/**/*.log
|
||||
*.log
|
||||
overwrite: true
|
||||
|
||||
4
.github/workflows/semgrep.yml
vendored
4
.github/workflows/semgrep.yml
vendored
@@ -17,9 +17,9 @@ jobs:
|
||||
runs-on: "${{ matrix.os }}"
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ "ubuntu-20.04" ]
|
||||
os: ["ubuntu-20.04"]
|
||||
python-version:
|
||||
- '3.11'
|
||||
- "3.11"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
2
.github/workflows/shellcheck.yml
vendored
2
.github/workflows/shellcheck.yml
vendored
@@ -9,7 +9,7 @@ on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- master
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
122
.github/workflows/static-assets-check.yml
vendored
122
.github/workflows/static-assets-check.yml
vendored
@@ -12,11 +12,11 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-20.04 ]
|
||||
os: [ubuntu-20.04]
|
||||
python-version:
|
||||
- '3.11'
|
||||
node-version: [ 18 ]
|
||||
npm-version: [ 10.5.x ]
|
||||
- "3.11"
|
||||
node-version: [18]
|
||||
npm-version: [10.5.x]
|
||||
mongo-version:
|
||||
- "7.0"
|
||||
|
||||
@@ -34,73 +34,73 @@ jobs:
|
||||
--health-retries 3
|
||||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Setup Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install system Packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install libxmlsec1-dev pkg-config
|
||||
- name: Install system Packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install libxmlsec1-dev pkg-config
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Setup npm
|
||||
run: npm i -g npm@${{ matrix.npm-version }}
|
||||
- name: Setup npm
|
||||
run: npm i -g npm@${{ matrix.npm-version }}
|
||||
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache-dir
|
||||
run: |
|
||||
echo "::set-output name=dir::$(pip cache dir)"
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache-dir
|
||||
run: |
|
||||
echo "::set-output name=dir::$(pip cache dir)"
|
||||
|
||||
- name: Cache pip dependencies
|
||||
id: cache-dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pip-cache-dir.outputs.dir }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }}
|
||||
restore-keys: ${{ runner.os }}-pip-
|
||||
- name: Cache pip dependencies
|
||||
id: cache-dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pip-cache-dir.outputs.dir }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }}
|
||||
restore-keys: ${{ runner.os }}-pip-
|
||||
|
||||
- name: Install Limited Python Deps for Build
|
||||
run: |
|
||||
pip install -r requirements/edx/assets.txt
|
||||
- name: Install Limited Python Deps for Build
|
||||
run: |
|
||||
pip install -r requirements/edx/assets.txt
|
||||
|
||||
- name: Initiate Mongo DB Service
|
||||
run: sudo systemctl start mongod
|
||||
- name: Initiate Mongo DB Service
|
||||
run: sudo systemctl start mongod
|
||||
|
||||
- name: Add node_modules bin to $Path
|
||||
run: echo $GITHUB_WORKSPACE/node_modules/.bin >> $GITHUB_PATH
|
||||
- name: Add node_modules bin to $Path
|
||||
run: echo $GITHUB_WORKSPACE/node_modules/.bin >> $GITHUB_PATH
|
||||
|
||||
- name: Check Dev Assets Build
|
||||
env:
|
||||
COMPREHENSIVE_THEMES_DIR: ./themes
|
||||
run: |
|
||||
npm clean-install --dev
|
||||
npm run build-dev
|
||||
- name: Check Dev Assets Build
|
||||
env:
|
||||
COMPREHENSIVE_THEMES_DIR: ./themes
|
||||
run: |
|
||||
npm clean-install --dev
|
||||
npm run build-dev
|
||||
|
||||
- name: Check Prod Assets Build
|
||||
env:
|
||||
COMPREHENSIVE_THEMES_DIR: ./themes
|
||||
run: |
|
||||
npm clean-install
|
||||
npm run build
|
||||
- name: Check Prod Assets Build
|
||||
env:
|
||||
COMPREHENSIVE_THEMES_DIR: ./themes
|
||||
run: |
|
||||
npm clean-install
|
||||
npm run build
|
||||
|
||||
- name: Install Full Python Deps for Collection
|
||||
run: |
|
||||
pip install -r requirements/edx/base.txt -e .
|
||||
- name: Install Full Python Deps for Collection
|
||||
run: |
|
||||
pip install -r requirements/edx/base.txt -e .
|
||||
|
||||
- name: Check Assets Collection
|
||||
env:
|
||||
LMS_CFG: lms/envs/minimal.yml
|
||||
CMS_CFG: lms/envs/minimal.yml
|
||||
DJANGO_SETTINGS_MODULE: lms.envs.production
|
||||
run: |
|
||||
./manage.py lms collectstatic --noinput
|
||||
./manage.py cms collectstatic --noinput
|
||||
- name: Check Assets Collection
|
||||
env:
|
||||
LMS_CFG: lms/envs/minimal.yml
|
||||
CMS_CFG: lms/envs/minimal.yml
|
||||
DJANGO_SETTINGS_MODULE: lms.envs.production
|
||||
run: |
|
||||
./manage.py lms collectstatic --noinput
|
||||
./manage.py cms collectstatic --noinput
|
||||
|
||||
6
.github/workflows/unit-tests.yml
vendored
6
.github/workflows/unit-tests.yml
vendored
@@ -133,7 +133,7 @@ jobs:
|
||||
success:
|
||||
name: Unit tests successful
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [ run-tests ]
|
||||
needs: [run-tests]
|
||||
steps:
|
||||
- name: Decide whether the needed jobs succeeded or failed
|
||||
# uses: re-actors/alls-green@v1.2.1
|
||||
@@ -143,7 +143,7 @@ jobs:
|
||||
|
||||
compile-warnings-report:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [ run-tests ]
|
||||
needs: [run-tests]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: collect pytest warnings files
|
||||
@@ -172,7 +172,7 @@ jobs:
|
||||
coverage:
|
||||
if: (github.repository == 'edx/edx-platform-private') || (github.repository == 'openedx/edx-platform' && (startsWith(github.base_ref, 'open-release') == false))
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [ run-tests ]
|
||||
needs: [run-tests]
|
||||
strategy:
|
||||
matrix:
|
||||
python-version:
|
||||
|
||||
@@ -13,7 +13,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
python-version:
|
||||
- '3.12'
|
||||
- "3.12"
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
||||
@@ -13,7 +13,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
python-version:
|
||||
- '3.12'
|
||||
- "3.12"
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
||||
18
.github/workflows/update-geolite-database.yml
vendored
18
.github/workflows/update-geolite-database.yml
vendored
@@ -6,18 +6,18 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'Target branch against which to create PR'
|
||||
description: "Target branch against which to create PR"
|
||||
required: false
|
||||
default: 'master'
|
||||
default: "master"
|
||||
|
||||
env:
|
||||
MAXMIND_URL: 'https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=${{ secrets.MAXMIND_LICENSE_KEY }}&suffix=tar.gz'
|
||||
MAXMIND_SHA256_URL: 'https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=${{ secrets.MAXMIND_LICENSE_KEY }}&suffix=tar.gz.sha256'
|
||||
TAR_FILE_NAME: 'GeoLite2-Country.tar.gz'
|
||||
TAR_SHA256_FILE_NAME: 'GeoLite2-Country.tar.gz.sha256'
|
||||
TAR_UNZIPPED_ROOT_PATTERN: 'GeoLite2-Country_*'
|
||||
DB_FILE: 'GeoLite2-Country.mmdb'
|
||||
DB_DESTINATION_PATH: 'common/static/data/geoip'
|
||||
MAXMIND_URL: "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=${{ secrets.MAXMIND_LICENSE_KEY }}&suffix=tar.gz"
|
||||
MAXMIND_SHA256_URL: "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=${{ secrets.MAXMIND_LICENSE_KEY }}&suffix=tar.gz.sha256"
|
||||
TAR_FILE_NAME: "GeoLite2-Country.tar.gz"
|
||||
TAR_SHA256_FILE_NAME: "GeoLite2-Country.tar.gz.sha256"
|
||||
TAR_UNZIPPED_ROOT_PATTERN: "GeoLite2-Country_*"
|
||||
DB_FILE: "GeoLite2-Country.mmdb"
|
||||
DB_DESTINATION_PATH: "common/static/data/geoip"
|
||||
|
||||
jobs:
|
||||
download-and-replace:
|
||||
|
||||
@@ -4,22 +4,22 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'Target branch to create requirements PR against'
|
||||
description: "Target branch to create requirements PR against"
|
||||
required: true
|
||||
default: 'master'
|
||||
default: "master"
|
||||
type: string
|
||||
package:
|
||||
description: 'Name of package to upgrade'
|
||||
description: "Name of package to upgrade"
|
||||
required: true
|
||||
type: string
|
||||
version:
|
||||
description: 'Version number to upgrade to in constraints.txt (only needed if pinned)'
|
||||
default: ''
|
||||
description: "Version number to upgrade to in constraints.txt (only needed if pinned)"
|
||||
default: ""
|
||||
type: string
|
||||
change_desc:
|
||||
description: |
|
||||
Description of change, for commit message and PR. (What does the new version add or fix?)
|
||||
default: ''
|
||||
default: ""
|
||||
type: string
|
||||
|
||||
defaults:
|
||||
|
||||
@@ -2,26 +2,25 @@ name: Upgrade Requirements
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 2 * * 2"
|
||||
- cron: "0 2 * * 2"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'Target branch to create requirements PR against'
|
||||
required: true
|
||||
default: 'master'
|
||||
inputs:
|
||||
branch:
|
||||
description: "Target branch to create requirements PR against"
|
||||
required: true
|
||||
default: "master"
|
||||
jobs:
|
||||
call-upgrade-python-requirements-workflow:
|
||||
# Don't run the weekly upgrade job on forks -- it will send a weekly failure email.
|
||||
if: github.repository == 'openedx/edx-platform' || github.event_name != 'schedule'
|
||||
uses: openedx/.github/.github/workflows/upgrade-python-requirements.yml@master
|
||||
with:
|
||||
branch: ${{ github.event.inputs.branch }}
|
||||
team_reviewers: "arbi-bom"
|
||||
email_address: arbi-bom@edx.org
|
||||
send_success_notification: false
|
||||
branch: ${{ github.event.inputs.branch }}
|
||||
team_reviewers: "arbi-bom"
|
||||
email_address: arbi-bom@edx.org
|
||||
send_success_notification: false
|
||||
secrets:
|
||||
requirements_bot_github_token: ${{ secrets.REQUIREMENTS_BOT_GITHUB_TOKEN }}
|
||||
requirements_bot_github_email: ${{ secrets.REQUIREMENTS_BOT_GITHUB_EMAIL }}
|
||||
edx_smtp_username: ${{ secrets.EDX_SMTP_USERNAME }}
|
||||
edx_smtp_password: ${{ secrets.EDX_SMTP_PASSWORD }}
|
||||
|
||||
requirements_bot_github_token: ${{ secrets.REQUIREMENTS_BOT_GITHUB_TOKEN }}
|
||||
requirements_bot_github_email: ${{ secrets.REQUIREMENTS_BOT_GITHUB_EMAIL }}
|
||||
edx_smtp_username: ${{ secrets.EDX_SMTP_USERNAME }}
|
||||
edx_smtp_password: ${{ secrets.EDX_SMTP_PASSWORD }}
|
||||
|
||||
19
.github/workflows/verify-dunder-init.yml
vendored
19
.github/workflows/verify-dunder-init.yml
vendored
@@ -6,21 +6,18 @@ on:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
|
||||
verify_dunder_init:
|
||||
|
||||
name: Verify __init__.py Files
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: Check out branch
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Check out branch
|
||||
uses: actions/checkout@v4
|
||||
- name: Ensure git is installed
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install git
|
||||
|
||||
- name: Ensure git is installed
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install git
|
||||
|
||||
- name: Verify __init__.py files exist
|
||||
run: |
|
||||
scripts/verify-dunder-init.sh
|
||||
- name: Verify __init__.py files exist
|
||||
run: |
|
||||
scripts/verify-dunder-init.sh
|
||||
|
||||
@@ -18,7 +18,7 @@ from lms.djangoapps.course_home_api.outline.views import (
|
||||
from lms.djangoapps.course_home_api.progress.views import ProgressTabView
|
||||
|
||||
# This API is a BFF ("backend for frontend") designed for the learning MFE. It's not versioned because there is no
|
||||
# guarantee of stability over time. It may change from one open edx release to another. Don't write any scripts
|
||||
# guarantee of stability over time. It may change from one Open edX release to another. Don't write any scripts
|
||||
# that depend on it.
|
||||
|
||||
urlpatterns = []
|
||||
|
||||
@@ -2,15 +2,24 @@ Status: Maintenance
|
||||
|
||||
Responsibilities
|
||||
================
|
||||
The edxnotes app is responsible for displaying parts of the Notes UI to students in different parts of the LMS, as well as figuring out whether Notes is enabled for a particular situation. The bulk of the actual work in storing the notes is done by a separate service (see the edx-notes-api repo).
|
||||
|
||||
The edxnotes app is responsible for displaying parts of the Notes UI to students in different parts of the LMS, as well as figuring out whether Notes is enabled for a particular situation. The bulk of the actual work in storing the notes is done by a separate service (see the `edx-notes-api`_ repo).
|
||||
|
||||
.. _edx-notes-api: https://github.com/openedx/edx-notes-api/
|
||||
|
||||
Direction: Extract into Plugin
|
||||
==============================
|
||||
Notes needs to insert a new tab into the LMS courseware, as well as wrap/decorate the courseware XBlock output so that it can add annotation capability to it. Both of these can now be done via plugins (decorating XBlock output can be done with XBlock Asides), and this app should be extracted into a separate repository.
|
||||
|
||||
This app is also currently proxying some requests through the LMS instead of hitting its service endpoint directly. It should instead always let the user's browser hit the edx-notes-api service directly.
|
||||
Notes needs to insert a new tab into the LMS courseware, as well as wrap/decorate the courseware XBlock output so that it can add annotation capability to it.
|
||||
Both of these can now be done via plugins (decorating XBlock output can be done with XBlock Asides), and this app should be extracted into a separate repository.
|
||||
|
||||
The edxnotes app also has an endpoint to get JWT tokens that the edx-notes-api will accept. This should be removed, and the edx-notes-api service converted to use the OAuth2 + JWT Cookie approach detailed in the `Transport JWT in HTTP Cookies <https://github.com/openedx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0009-jwt-in-session-cookie.rst>`_ decision record for ``oauth_dispatch``.
|
||||
This app is also currently proxying some requests through the LMS instead of hitting its service endpoint directly.
|
||||
It should instead always let the user's browser hit the edx-notes-api service directly.
|
||||
|
||||
The edxnotes app also has an endpoint to get JWT tokens that the edx-notes-api will accept.
|
||||
This should be removed, and the edx-notes-api service converted to use the OAuth2 + JWT Cookie approach detailed in the `Transport JWT in HTTP Cookies`_ decision record for ``oauth_dispatch``.
|
||||
|
||||
.. _Transport JWT in HTTP Cookies: https://github.com/openedx/edx-platform/blob/master/openedx/core/djangoapps/oauth_dispatch/docs/decisions/0009-jwt-in-session-cookie.rst
|
||||
|
||||
Glossary
|
||||
========
|
||||
|
||||
@@ -290,7 +290,7 @@ FEATURES = {
|
||||
# sandbox, for testing whether it's enabled properly.
|
||||
'ENABLE_DEBUG_RUN_PYTHON': False,
|
||||
|
||||
# Enable URL that shows information about the status of variuous services
|
||||
# Enable URL that shows information about the status of various services
|
||||
'ENABLE_SERVICE_STATUS': False,
|
||||
|
||||
# Don't autoplay videos for students
|
||||
@@ -458,7 +458,7 @@ FEATURES = {
|
||||
# .. toggle_name: FEATURES['ENABLE_THIRD_PARTY_AUTH']
|
||||
# .. toggle_implementation: DjangoSetting
|
||||
# .. toggle_default: False
|
||||
# .. toggle_description: Turn on third-party auth. Disabled for now because full mplementations are not yet
|
||||
# .. toggle_description: Turn on third-party auth. Disabled for now because full implementations are not yet
|
||||
# available. Remember to run migrations if you enable this; we don't create tables by default. This feature can
|
||||
# be enabled on a per-site basis. When enabling this feature, remember to define the allowed authentication
|
||||
# backends with the AUTHENTICATION_BACKENDS setting.
|
||||
@@ -699,7 +699,7 @@ FEATURES = {
|
||||
# .. toggle_default: False
|
||||
# .. toggle_description: When set to True, Open edX site can be used as an LTI Provider to other systems
|
||||
# and applications.
|
||||
# .. toggle_warning: After enabling this feature flag there are multiple steps invloved to configure edX
|
||||
# .. toggle_warning: After enabling this feature flag there are multiple steps involved to configure edX
|
||||
# as LTI provider. Full guide is available here:
|
||||
# https://edx.readthedocs.io/projects/edx-installing-configuring-and-running/en/latest/configuration/lti/index.html
|
||||
# .. toggle_use_cases: open_edx
|
||||
@@ -983,7 +983,7 @@ FEATURES = {
|
||||
# .. toggle_default: False
|
||||
# .. toggle_description: When true, replaces the bulk email tool found on the
|
||||
# instructor dashboard with a link to the new communications MFE version instead.
|
||||
# Stting the tool to false will leave the old bulk email tool experience in place.
|
||||
# Setting the tool to false will leave the old bulk email tool experience in place.
|
||||
# .. toggle_use_cases: opt_in
|
||||
# .. toggle_creation_date: 2022-03-21
|
||||
# .. toggle_target_removal_date: None
|
||||
@@ -1018,7 +1018,7 @@ FEATURES = {
|
||||
# .. toggle_name: FEATURES['ENABLE_CERTIFICATES_IDV_REQUIREMENT']
|
||||
# .. toggle_implementation: DjangoSetting
|
||||
# .. toggle_default: False
|
||||
# .. toggle_description: Whether to enforce ID Verification requirements for couse certificates generation
|
||||
# .. toggle_description: Whether to enforce ID Verification requirements for course certificates generation
|
||||
# .. toggle_use_cases: open_edx
|
||||
# .. toggle_creation_date: 2022-04-26
|
||||
# .. toggle_target_removal_date: None
|
||||
@@ -1129,7 +1129,7 @@ MARKETING_EMAILS_OPT_IN = False
|
||||
# .. toggle_name: ENABLE_COPPA_COMPLIANCE
|
||||
# .. toggle_implementation: DjangoSetting
|
||||
# .. toggle_default: False
|
||||
# .. toggle_description: When True, inforces COPPA compliance and removes YOB field from registration form and accounnt
|
||||
# .. toggle_description: When True, enforces COPPA compliance and removes YOB field from registration form and account
|
||||
# .. settings page. Also hide YOB banner from profile page.
|
||||
# .. toggle_use_cases: open_edx
|
||||
# .. toggle_creation_date: 2021-10-27
|
||||
@@ -1367,7 +1367,7 @@ CONTEXT_PROCESSORS = [
|
||||
# Mobile App processor (Detects if request is from the mobile app)
|
||||
'lms.djangoapps.mobile_api.context_processor.is_from_mobile_app',
|
||||
|
||||
# Context processor necesarry for the survey report message appear on the admin site
|
||||
# Context processor necessary for the survey report message appear on the admin site
|
||||
'openedx.features.survey_report.context_processors.admin_extra_context'
|
||||
|
||||
|
||||
@@ -1458,7 +1458,7 @@ SEARCH_COURSEWARE_CONTENT_LOG_PARAMS = False
|
||||
|
||||
# .. setting_name: ELASTIC_SEARCH_INDEX_PREFIX
|
||||
# .. setting_default: ''
|
||||
# .. setting_description: Specifies the prefix used when namixng elasticsearch indexes related to edx-search.
|
||||
# .. setting_description: Specifies the prefix used when naming elasticsearch indexes related to edx-search.
|
||||
ELASTICSEARCH_INDEX_PREFIX = ""
|
||||
|
||||
VIDEO_CDN_URL = {
|
||||
@@ -1845,7 +1845,7 @@ CODE_JAIL = {
|
||||
# ]
|
||||
COURSES_WITH_UNSAFE_CODE = []
|
||||
|
||||
# Cojail REST service
|
||||
# Code jail REST service
|
||||
ENABLE_CODEJAIL_REST_SERVICE = False
|
||||
# .. setting_name: CODE_JAIL_REST_SERVICE_REMOTE_EXEC
|
||||
# .. setting_default: 'xmodule.capa.safe_exec.remote_exec.send_safe_exec_request_v0'
|
||||
@@ -3183,9 +3183,13 @@ INSTALLED_APPS = [
|
||||
# Notes
|
||||
'lms.djangoapps.edxnotes',
|
||||
|
||||
# User API
|
||||
# Django Rest Framework
|
||||
'rest_framework',
|
||||
|
||||
# REST framework JWT Auth
|
||||
'rest_framework_jwt',
|
||||
|
||||
# User API
|
||||
'openedx.core.djangoapps.user_api',
|
||||
|
||||
# Different Course Modes
|
||||
@@ -3351,7 +3355,6 @@ INSTALLED_APPS = [
|
||||
|
||||
# Management of per-user schedules
|
||||
'openedx.core.djangoapps.schedules',
|
||||
'rest_framework_jwt',
|
||||
|
||||
# Learning Sequence Navigation
|
||||
'openedx.core.djangoapps.content.learning_sequences.apps.LearningSequencesConfig',
|
||||
@@ -4523,7 +4526,7 @@ FINANCIAL_ASSISTANCE_MAX_LENGTH = 2500
|
||||
|
||||
REGISTRATION_EXTENSION_FORM = None
|
||||
|
||||
# Identifier included in the User Agent from open edX mobile apps.
|
||||
# Identifier included in the User Agent from Open edX mobile apps.
|
||||
MOBILE_APP_USER_AGENT_REGEXES = [
|
||||
r'edX/org.edx.mobile',
|
||||
]
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
# A. You don't *have* to, because settings in devstack.py
|
||||
# override these settings. But, it doesn't harm to also make them
|
||||
# here in order to quell confusion. The hope is that we'll
|
||||
# adpot OEP-45 eventually, which recommends against having
|
||||
# adopt OEP-45 eventually, which recommends against having
|
||||
# a devstack.py at all.
|
||||
#
|
||||
# This is part of the effort to move our dev tools off of Ansible and
|
||||
|
||||
@@ -135,7 +135,7 @@ REQUIRE_DEBUG = DEBUG
|
||||
|
||||
PIPELINE['SASS_ARGUMENTS'] = '--debug-info'
|
||||
|
||||
# Load development webpack donfiguration
|
||||
# Load development webpack configuration
|
||||
WEBPACK_CONFIG_PATH = 'webpack.dev.config.js'
|
||||
|
||||
########################### VERIFIED CERTIFICATES #################################
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
This config file follows the devstack enviroment, but adds the
|
||||
This config file follows the devstack environment, but adds the
|
||||
requirement of a celery worker running in the background to process
|
||||
celery tasks.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
LMS Configuration Settings
|
||||
==========================
|
||||
##########################
|
||||
|
||||
The lms.envs module contains project-wide settings, defined in python modules
|
||||
The ``lms.envs`` module contains project-wide settings, defined in python modules
|
||||
using the standard `Django Settings`_ mechanism, plus some Open edX
|
||||
particularities, which we describe below.
|
||||
|
||||
@@ -9,11 +9,14 @@ particularities, which we describe below.
|
||||
|
||||
|
||||
YAML Configuration Files
|
||||
------------------------
|
||||
************************
|
||||
|
||||
In addition, there is a mechanism for reading and overriding configuration settings from YAML files on-disk. The :file:`/lms/envs/production.py` module loads settings from a YAML file. The location of the YAML file is pulled from the value of the ``LMS_CFG`` environment variable. Except for a limited set of exceptions, if a key exists in the YAML file, it will be injected into the settings module as it is defined in the YAML file.
|
||||
In addition, there is a mechanism for reading and overriding configuration settings from YAML files on-disk.
|
||||
The :file:`/lms/envs/production.py` module loads settings from a YAML file.
|
||||
The location of the YAML file is pulled from the value of the ``LMS_CFG`` environment variable.
|
||||
Except for a limited set of exceptions, if a key exists in the YAML file, it will be injected into the settings module as it is defined in the YAML file.
|
||||
|
||||
The YAML file allow open edX operators to configure the Django runtime
|
||||
The YAML file allow Open edX operators to configure the Django runtime
|
||||
without needing to make any changes to source-controlled python files in
|
||||
edx-platform. Therefore, they are not checked into the edx-platform repo.
|
||||
Rather, they are generated from the `edxapp playbook in the configuration
|
||||
@@ -23,7 +26,7 @@ repo`_ and available in the ``/edx/etc/`` folder on edX servers.
|
||||
|
||||
|
||||
Feature Flags and Settings Guidelines
|
||||
-------------------------------------
|
||||
*************************************
|
||||
|
||||
For guidelines on using Django settings and feature flag mechanisms in the edX
|
||||
platform, please see `Feature Flags and Settings`_.
|
||||
@@ -32,16 +35,19 @@ platform, please see `Feature Flags and Settings`_.
|
||||
|
||||
|
||||
Derived Settings
|
||||
----------------
|
||||
****************
|
||||
|
||||
In cases where you need to define one or more settings relative to the value of
|
||||
another setting, you can explicitly designate them as derived calculations.
|
||||
This can let you override one setting (such as a path or a feature toggle) and
|
||||
have it automatically propagate to other settings which are defined in terms of
|
||||
that value, without needing to track down all potentially impacted settings and
|
||||
explicitly override them as well. This can be useful for test setting overrides
|
||||
explicitly override them as well. This can be useful for test setting overrides
|
||||
even if you don't anticipate end users customizing the value very often.
|
||||
|
||||
For example::
|
||||
For example:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
def _make_locale_paths(settings):
|
||||
locale_paths = [settings.REPO_ROOT + '/conf/locale'] # edx-platform/conf/locale/
|
||||
@@ -61,7 +67,9 @@ defined in ``lms/envs/common.py`` and you're using ``lms/envs/production.py`` wh
|
||||
includes overrides both from that module and the JSON configuration files.
|
||||
|
||||
List entries and dictionary values can also be derived from other settings, even
|
||||
when nested within each other::
|
||||
when nested within each other:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
def _make_mako_template_dirs(settings):
|
||||
"""
|
||||
|
||||
@@ -143,8 +143,8 @@ if STATIC_URL_BASE:
|
||||
REQUIRE_BUILD_PROFILE = ENV_TOKENS.get('REQUIRE_BUILD_PROFILE', REQUIRE_BUILD_PROFILE)
|
||||
|
||||
# The following variables use (or) instead of the default value inside (get). This is to enforce using the Lazy Text
|
||||
# values when the varibale is an empty string. Therefore, setting these variable as empty text in related
|
||||
# json files will make the system reads thier values from django translation files
|
||||
# values when the variable is an empty string. Therefore, setting these variable as empty text in related
|
||||
# json files will make the system reads their values from django translation files
|
||||
PLATFORM_NAME = ENV_TOKENS.get('PLATFORM_NAME') or PLATFORM_NAME
|
||||
PLATFORM_DESCRIPTION = ENV_TOKENS.get('PLATFORM_DESCRIPTION') or PLATFORM_DESCRIPTION
|
||||
|
||||
@@ -362,7 +362,7 @@ VIDEO_CDN_URL = ENV_TOKENS.get('VIDEO_CDN_URL', {})
|
||||
|
||||
# Determines whether the CSRF token can be transported on
|
||||
# unencrypted channels. It is set to False here for backward compatibility,
|
||||
# but it is highly recommended that this is True for enviroments accessed
|
||||
# but it is highly recommended that this is True for environments accessed
|
||||
# by end users.
|
||||
CSRF_COOKIE_SECURE = ENV_TOKENS.get('CSRF_COOKIE_SECURE', False)
|
||||
|
||||
@@ -502,9 +502,9 @@ MODULESTORE = convert_module_store_setting_if_needed(AUTH_TOKENS.get('MODULESTOR
|
||||
|
||||
# After conversion above, the modulestore will have a "stores" list with all defined stores, for all stores, add the
|
||||
# fs_root entry to derived collection so that if it's a callable it can be resolved. We need to do this because the
|
||||
# `derived_collection_entry` takes an exact index value but the config file might have overidden the number of stores
|
||||
# `derived_collection_entry` takes an exact index value but the config file might have overridden the number of stores
|
||||
# and so we can't be sure that the 2 we define in common.py will be there when we try to derive settings. This could
|
||||
# lead to execptions being thrown when the `derive_settings` call later in this file tries to update settings. We call
|
||||
# lead to exceptions being thrown when the `derive_settings` call later in this file tries to update settings. We call
|
||||
# the derived_collection_entry function here to ensure that we update the fs_root for any callables that remain after
|
||||
# we've updated the MODULESTORE setting from our config file.
|
||||
for idx, store in enumerate(MODULESTORE['default']['OPTIONS']['stores']):
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
Course Apps API
|
||||
_______________
|
||||
###############
|
||||
|
||||
Status
|
||||
======
|
||||
******
|
||||
|
||||
Proposal
|
||||
|
||||
Context
|
||||
=======
|
||||
*******
|
||||
|
||||
The new `Course Authoring MFE`_ includes a new UX called "Pages and Resources"
|
||||
for configuring different aspects of the course experience such as progress,
|
||||
@@ -27,7 +28,7 @@ enable/disable these apps using the API.
|
||||
|
||||
|
||||
Decision
|
||||
========
|
||||
########
|
||||
|
||||
We propose to call such individual course features "Course Apps". They can be
|
||||
introduced as a new type of Open edX plugin. Any functionality that can be
|
||||
@@ -39,16 +40,29 @@ some bits of metadata, such as a name, a description etc. Additionally we will
|
||||
need a common interface for such apps so they can be enabled/disabled using
|
||||
a standard common interface.
|
||||
|
||||
To do this we can follow the example of existing plugins, [such as Course
|
||||
Tabs](https://github.com/openedx/edx-platform/blob/636b2ca4c5add531cfce755fdb8965599acd79e0/common/lib/xmodule/xmodule/tabs.py#L24-L243),
|
||||
To do this we can follow the example of existing plugins, `such as Course Tabs`_,
|
||||
which provide a specific Python class that the plugin can inherit from, or
|
||||
implement. The required metadata and features, can be implemented as class
|
||||
attributes, and methods on this class.
|
||||
|
||||
We can then discover the installed apps using the existing tooling for plugins
|
||||
using a subclass of PluginManager designed for this purpose. Here is an example
|
||||
for [Course
|
||||
Tabs](https://github.com/openedx/edx-platform/blob/636b2ca4c5add531cfce755fdb8965599acd79e0/openedx/core/lib/course_tabs.py#L13-L47)
|
||||
using a subclass of ``PluginManager`` designed for this purpose.
|
||||
Here is an example for `CourseTabs`_:
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
class CourseTabPluginManager(PluginManager):
|
||||
"""
|
||||
Manager for all of the course tabs that have been made available.
|
||||
|
||||
All course tabs should implement `CourseTab`.
|
||||
"""
|
||||
NAMESPACE = COURSE_TAB_NAMESPACE
|
||||
|
||||
@classmethod
|
||||
def get_tab_types(cls):
|
||||
"""
|
||||
Returns the list of available course tabs in their canonical order.
|
||||
|
||||
It might not always make sense for an app installed in this way to be
|
||||
automatically show up for use on all courses. So each app will expose a method
|
||||
@@ -85,14 +99,17 @@ In the case of Course Apps, the standard plugin API will automatically discover
|
||||
all installed apps. Inactive apps will be filtered out during the availability
|
||||
check.
|
||||
|
||||
Course App Plugin Class
|
||||
-----------------------
|
||||
.. _such as Course Tabs: https://github.com/openedx/edx-platform/blob/636b2ca4c5add531cfce755fdb8965599acd79e0/common/lib/xmodule/xmodule/tabs.py#L24-L243
|
||||
.. _CourseTabs: https://github.com/openedx/edx-platform/blob/636b2ca4c5add531cfce755fdb8965599acd79e0/openedx/core/lib/course_tabs.py#L13-L47
|
||||
|
||||
To be loaded as a Course App, you need to provide an entrypoint in `setup.py`
|
||||
with the namespace "openedx.course_app". The entry should point to a Python
|
||||
Course App Plugin Class
|
||||
=======================
|
||||
|
||||
To be loaded as a Course App, you need to provide an entrypoint in ``setup.py``
|
||||
with the namespace ``openedx.course_app``. The entry should point to a Python
|
||||
class with the following basic structure:
|
||||
|
||||
.. code-block :: python
|
||||
.. code-block:: python
|
||||
|
||||
class CourseApp:
|
||||
# The app id should match what is specified in the setup.py entrypoint
|
||||
@@ -143,7 +160,7 @@ such a class and have these class methods call back to the existing code for
|
||||
availability checks and enabled checks.
|
||||
|
||||
Course Apps API
|
||||
---------------
|
||||
===============
|
||||
|
||||
Each app has some associated metadata:
|
||||
|
||||
@@ -218,9 +235,8 @@ link should only be provided for Course Apps that don't have a UI in the course
|
||||
authoring MFE yet. If a partial UI exists, the MFE settings view can always link
|
||||
back to the old studio view from there.
|
||||
|
||||
|
||||
Consequences
|
||||
============
|
||||
************
|
||||
|
||||
- A new Course Apps API that consistently uses a standard mechanism (a plugin
|
||||
class) for discovering Course Apps, determining their availability and
|
||||
|
||||
@@ -99,7 +99,7 @@ unprotected microservices.
|
||||
4. Associate Available Scopes with Applications
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
In order to allow open edX operators to a priori limit the
|
||||
In order to allow Open edX operators to a priori limit the
|
||||
types of access an Application can request, we will allow them
|
||||
to configure Application-specific "available scopes".
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ user interacts with the overall application, the user's experience may lead them
|
||||
each accessing APIs on various backends. Stateless authentication (via self-contained JWTs) would allow scalable
|
||||
interactions between microfrontends and microservices.
|
||||
|
||||
Note: User authentication for open edX mobile apps is outside the scope of this decision record. As a brief note, we
|
||||
Note: User authentication for Open edX mobile apps is outside the scope of this decision record. As a brief note, we
|
||||
believe any decisions in this record will neither affect the current authentication mechanisms used for mobile
|
||||
apps nor impact forward compatibility when/if mobile apps are consolidated to use a similar (if not the same)
|
||||
authentication mechanism as outlined here for web apps.
|
||||
@@ -69,7 +69,7 @@ Login -> Cookie -> API
|
||||
recombined JWT in a temporary cookie specified by JWT_AUTH_COOKIE_.
|
||||
* The `Django Rest Framework JWT`_ library we use makes use of the JWT_AUTH_COOKIE_ configuration setting.
|
||||
When set, the JSONWebTokenAuthentication_ class `automatically extracts the JWT from the cookie`_. Since all
|
||||
open edX REST endpoints that support JWT-based authentication derive from this base class, their authentication
|
||||
Open edX REST endpoints that support JWT-based authentication derive from this base class, their authentication
|
||||
checks will make use of the JWTs provided in the JWT-related cookies.
|
||||
|
||||
#. **Introduce forgiving JWTs for backward compatibility.**
|
||||
@@ -121,7 +121,7 @@ JWT Cookie Lifetime
|
||||
* For simplicity and consistency, the cookies and their containing JWT will expire at the same time. There's
|
||||
no need to have these be different values.
|
||||
|
||||
* Given this, JWT cookies will always have expiration values, unlike `current open edX session cookies that may
|
||||
* Given this, JWT cookies will always have expiration values, unlike `current Open edX session cookies that may
|
||||
have no expiration`_.
|
||||
|
||||
* A configuration setting, JWT_AUTH_COOKIE_EXPIRATION, will specify the expiration duration for JWTs and their
|
||||
@@ -141,7 +141,7 @@ JWT Cookie Lifetime
|
||||
which will remove them from the user's browser cookie jar. Thus, the user will be logged out of all the
|
||||
microfrontends.
|
||||
|
||||
.. _`current open edX session cookies that may have no expiration`: https://github.com/openedx/edx-platform/blob/92030ea15216a6641c83dd7bb38a9b65112bf31a/common/djangoapps/student/cookies.py#L25-L27
|
||||
.. _`current Open edX session cookies that may have no expiration`: https://github.com/openedx/edx-platform/blob/92030ea15216a6641c83dd7bb38a9b65112bf31a/common/djangoapps/student/cookies.py#L25-L27
|
||||
.. _JWT blacklist: https://auth0.com/blog/blacklist-json-web-token-api-keys/
|
||||
.. _`JWT ID (jti)`: http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html#jtiDef
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Manually Testing OAuth2 Provider implementation
|
||||
-----------------------------------------------
|
||||
|
||||
This document explains how to manually test the open edX LMS' OAuth2 Provider
|
||||
This document explains how to manually test the Open edX LMS' OAuth2 Provider
|
||||
implementation. In order to verify that it correctly implements the
|
||||
`OAuth2 standard`_, use a publicly available 3rd party standard OAuth2 client.
|
||||
The steps here show how to use `Google's OAuth2 Playground`_ as the client for
|
||||
|
||||
@@ -326,9 +326,9 @@ class TestSafeSessionMiddleware(TestSafeSessionsLogMixin, CacheIsolationTestCase
|
||||
self.request.path = '/xblock/block-v1:org+course+run+type@html+block@block_id'
|
||||
self.verify_success()
|
||||
|
||||
@override_settings(MOBILE_APP_USER_AGENT_REGEXES=[r'open edX Mobile App'])
|
||||
@override_settings(MOBILE_APP_USER_AGENT_REGEXES=[r'Open edX Mobile App'])
|
||||
def test_success_from_mobile_app(self):
|
||||
self.request.META = {'HTTP_USER_AGENT': 'open edX Mobile App Version 2.1'}
|
||||
self.request.META = {'HTTP_USER_AGENT': 'Open edX Mobile App Version 2.1'}
|
||||
self.verify_success()
|
||||
|
||||
def verify_error(self, expected_response_status):
|
||||
@@ -364,9 +364,9 @@ class TestSafeSessionMiddleware(TestSafeSessionsLogMixin, CacheIsolationTestCase
|
||||
self.request.META['HTTP_ACCEPT'] = http_accept
|
||||
self.verify_error(expected_response)
|
||||
|
||||
@override_settings(MOBILE_APP_USER_AGENT_REGEXES=[r'open edX Mobile App'])
|
||||
@override_settings(MOBILE_APP_USER_AGENT_REGEXES=[r'Open edX Mobile App'])
|
||||
def test_error_from_mobile_app(self):
|
||||
self.request.META = {'HTTP_USER_AGENT': 'open edX Mobile App Version 2.1'}
|
||||
self.request.META = {'HTTP_USER_AGENT': 'Open edX Mobile App Version 2.1'}
|
||||
self.verify_error(401)
|
||||
|
||||
@override_settings(ENFORCE_SAFE_SESSIONS=False)
|
||||
|
||||
@@ -8,7 +8,7 @@ parallel = true
|
||||
ignore_errors = True
|
||||
|
||||
[html]
|
||||
title = Open edx Core Lib Python Test Coverage Report
|
||||
title = Open edX Core Lib Python Test Coverage Report
|
||||
directory = reports/openedx/core/lib/cover
|
||||
|
||||
[xml]
|
||||
|
||||
@@ -10,7 +10,7 @@ from django.conf import settings
|
||||
|
||||
def is_request_from_mobile_app(request):
|
||||
"""
|
||||
Returns whether the given request was made by an open edX mobile app,
|
||||
Returns whether the given request was made by an Open edX mobile app,
|
||||
either natively or through the mobile web view.
|
||||
|
||||
Args:
|
||||
|
||||
34
setup.py
34
setup.py
@@ -84,16 +84,16 @@ setup(
|
||||
],
|
||||
"openedx.course_app": [
|
||||
"calculator = lms.djangoapps.courseware.plugins:CalculatorCourseApp",
|
||||
"custom_pages = lms.djangoapps.courseware.plugins:CustomPagesCourseApp",
|
||||
"discussion = openedx.core.djangoapps.discussions.plugins:DiscussionCourseApp",
|
||||
"edxnotes = lms.djangoapps.edxnotes.plugins:EdxNotesCourseApp",
|
||||
"live = openedx.core.djangoapps.course_live.plugins:LiveCourseApp",
|
||||
"ora_settings = lms.djangoapps.courseware.plugins:ORASettingsApp",
|
||||
"proctoring = lms.djangoapps.courseware.plugins:ProctoringCourseApp",
|
||||
"progress = lms.djangoapps.courseware.plugins:ProgressCourseApp",
|
||||
"teams = lms.djangoapps.teams.plugins:TeamsCourseApp",
|
||||
"textbooks = lms.djangoapps.courseware.plugins:TextbooksCourseApp",
|
||||
"wiki = lms.djangoapps.course_wiki.plugins.course_app:WikiCourseApp",
|
||||
"custom_pages = lms.djangoapps.courseware.plugins:CustomPagesCourseApp",
|
||||
"live = openedx.core.djangoapps.course_live.plugins:LiveCourseApp",
|
||||
"ora_settings = lms.djangoapps.courseware.plugins:ORASettingsApp",
|
||||
],
|
||||
"openedx.course_tool": [
|
||||
"calendar_sync_toggle = openedx.features.calendar_sync.plugins:CalendarSyncToggleTool",
|
||||
@@ -102,12 +102,12 @@ setup(
|
||||
"financial_assistance = lms.djangoapps.courseware.course_tools:FinancialAssistanceTool",
|
||||
],
|
||||
"openedx.user_partition_scheme": [
|
||||
"random = openedx.core.djangoapps.user_api.partition_schemes:RandomUserPartitionScheme",
|
||||
"cohort = openedx.core.djangoapps.course_groups.partition_scheme:CohortPartitionScheme",
|
||||
"verification = openedx.core.djangoapps.user_api.partition_schemes:ReturnGroup1PartitionScheme",
|
||||
"enrollment_track = openedx.core.djangoapps.verified_track_content.partition_scheme:EnrollmentTrackPartitionScheme", # lint-amnesty, pylint: disable=line-too-long
|
||||
"content_type_gate = openedx.features.content_type_gating.partitions:ContentTypeGatingPartitionScheme",
|
||||
"enrollment_track = openedx.core.djangoapps.verified_track_content.partition_scheme:EnrollmentTrackPartitionScheme", # lint-amnesty, pylint: disable=line-too-long
|
||||
"random = openedx.core.djangoapps.user_api.partition_schemes:RandomUserPartitionScheme",
|
||||
"team = lms.djangoapps.teams.team_partition_scheme:TeamPartitionScheme",
|
||||
"verification = openedx.core.djangoapps.user_api.partition_schemes:ReturnGroup1PartitionScheme",
|
||||
],
|
||||
"openedx.block_structure_transformer": [
|
||||
"library_content = lms.djangoapps.course_blocks.transformers.library_content:ContentLibraryTransformer",
|
||||
@@ -135,11 +135,13 @@ setup(
|
||||
"personalized_learner_schedules = openedx.features.personalized_learner_schedules.call_to_action:PersonalizedLearnerScheduleCallToAction" # lint-amnesty, pylint: disable=line-too-long
|
||||
],
|
||||
"lms.djangoapp": [
|
||||
"announcements = openedx.features.announcements.apps:AnnouncementsConfig",
|
||||
"ace_common = openedx.core.djangoapps.ace_common.apps:AceCommonConfig",
|
||||
"credentials = openedx.core.djangoapps.credentials.apps:CredentialsConfig",
|
||||
"course_live = openedx.core.djangoapps.course_live.apps:CourseLiveConfig",
|
||||
"announcements = openedx.features.announcements.apps:AnnouncementsConfig",
|
||||
"content_libraries = openedx.core.djangoapps.content_libraries.apps:ContentLibrariesConfig",
|
||||
"course_apps = openedx.core.djangoapps.course_apps.apps:CourseAppsConfig",
|
||||
"course_live = openedx.core.djangoapps.course_live.apps:CourseLiveConfig",
|
||||
"courseware_api = openedx.core.djangoapps.courseware_api.apps:CoursewareAPIConfig",
|
||||
"credentials = openedx.core.djangoapps.credentials.apps:CredentialsConfig",
|
||||
"discussion = lms.djangoapps.discussion.apps:DiscussionConfig",
|
||||
"discussions = openedx.core.djangoapps.discussions.apps:DiscussionsConfig",
|
||||
"grades = lms.djangoapps.grades.apps:GradesConfig",
|
||||
@@ -151,15 +153,15 @@ setup(
|
||||
"password_policy = openedx.core.djangoapps.password_policy.apps:PasswordPolicyConfig",
|
||||
"user_authn = openedx.core.djangoapps.user_authn.apps:UserAuthnConfig",
|
||||
"program_enrollments = lms.djangoapps.program_enrollments.apps:ProgramEnrollmentsConfig",
|
||||
"courseware_api = openedx.core.djangoapps.courseware_api.apps:CoursewareAPIConfig",
|
||||
"course_apps = openedx.core.djangoapps.course_apps.apps:CourseAppsConfig",
|
||||
],
|
||||
"cms.djangoapp": [
|
||||
"announcements = openedx.features.announcements.apps:AnnouncementsConfig",
|
||||
"ace_common = openedx.core.djangoapps.ace_common.apps:AceCommonConfig",
|
||||
"bookmarks = openedx.core.djangoapps.bookmarks.apps:BookmarksConfig",
|
||||
"course_live = openedx.core.djangoapps.course_live.apps:CourseLiveConfig",
|
||||
"content_libraries = openedx.core.djangoapps.content_libraries.apps:ContentLibrariesConfig",
|
||||
"content_staging = openedx.core.djangoapps.content_staging.apps:ContentStagingAppConfig",
|
||||
"course_apps = openedx.core.djangoapps.course_apps.apps:CourseAppsConfig",
|
||||
# Importing an LMS app into the Studio process is not a good
|
||||
# practice. We're ignoring this for Discussions here because its
|
||||
# placement in LMS is a historical artifact. The eventual goal is to
|
||||
@@ -167,22 +169,20 @@ setup(
|
||||
# either put them in the openedx/ dir, or in another repo entirely.
|
||||
"discussion = lms.djangoapps.discussion.apps:DiscussionConfig",
|
||||
"discussions = openedx.core.djangoapps.discussions.apps:DiscussionsConfig",
|
||||
"instructor = lms.djangoapps.instructor.apps:InstructorConfig",
|
||||
"olx_rest_api = openedx.core.djangoapps.olx_rest_api.apps:OlxRestApiAppConfig",
|
||||
"password_policy = openedx.core.djangoapps.password_policy.apps:PasswordPolicyConfig",
|
||||
"plugins = openedx.core.djangoapps.plugins.apps:PluginsConfig",
|
||||
"theming = openedx.core.djangoapps.theming.apps:ThemingConfig",
|
||||
"bookmarks = openedx.core.djangoapps.bookmarks.apps:BookmarksConfig",
|
||||
"zendesk_proxy = openedx.core.djangoapps.zendesk_proxy.apps:ZendeskProxyConfig",
|
||||
"password_policy = openedx.core.djangoapps.password_policy.apps:PasswordPolicyConfig",
|
||||
"user_authn = openedx.core.djangoapps.user_authn.apps:UserAuthnConfig",
|
||||
"instructor = lms.djangoapps.instructor.apps:InstructorConfig",
|
||||
"course_apps = openedx.core.djangoapps.course_apps.apps:CourseAppsConfig",
|
||||
"zendesk_proxy = openedx.core.djangoapps.zendesk_proxy.apps:ZendeskProxyConfig",
|
||||
],
|
||||
'openedx.learning_context': [
|
||||
'lib = openedx.core.djangoapps.content_libraries.library_context:LibraryContextImpl',
|
||||
],
|
||||
'openedx.dynamic_partition_generator': [
|
||||
'enrollment_track = xmodule.partitions.enrollment_track_partition_generator:create_enrollment_track_partition', # lint-amnesty, pylint: disable=line-too-long
|
||||
'content_type_gating = openedx.features.content_type_gating.partitions:create_content_gating_partition',
|
||||
'enrollment_track = xmodule.partitions.enrollment_track_partition_generator:create_enrollment_track_partition', # lint-amnesty, pylint: disable=line-too-long
|
||||
'team = openedx.core.lib.teams_config:create_team_set_partition',
|
||||
],
|
||||
'xblock.v1': XBLOCKS,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.. _edX Modulestores:
|
||||
|
||||
###########################
|
||||
################
|
||||
edX Modulestores
|
||||
###########################
|
||||
################
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#################
|
||||
################
|
||||
MixedModuleStore
|
||||
#################
|
||||
################
|
||||
|
||||
MixedModuleStore provides a common API for all modulestore functions.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#################################
|
||||
################################
|
||||
Overview of the edX Modulestores
|
||||
#################################
|
||||
################################
|
||||
|
||||
The edX Platform uses several different modulestores to store course data. Each
|
||||
of these modulestores is in use on edx.org.
|
||||
@@ -11,9 +11,9 @@ See:
|
||||
* `DraftModuleStore`_
|
||||
* :ref:`Split Mongo Modulestore`
|
||||
|
||||
***************
|
||||
**************
|
||||
XMLModuleStore
|
||||
***************
|
||||
**************
|
||||
|
||||
The XMLModuleStore was the first modulestore used for the edX Platform.
|
||||
|
||||
@@ -23,9 +23,9 @@ server starts, XMLModuleStore loads every block for every course into memory.
|
||||
XMLModuleStore is read-only and does not enable users to change a course
|
||||
without restarting the server.
|
||||
|
||||
*****************
|
||||
****************
|
||||
DraftModuleStore
|
||||
*****************
|
||||
****************
|
||||
|
||||
DraftModuleStore was the next generation modulestore and provides greater
|
||||
scalability by allowing random access to course blocks and loading blocks on
|
||||
@@ -35,9 +35,9 @@ DraftModuleStore allows editing of courses without restarting the server.
|
||||
|
||||
In addition, DraftModuleStore stores a draft version of some types of blocks.
|
||||
|
||||
*****************
|
||||
***********
|
||||
Split Mongo
|
||||
*****************
|
||||
***********
|
||||
|
||||
Split Mongo is the newest modulestore. See the :ref:`Split Mongo Modulestore`
|
||||
chapter for more information.
|
||||
@@ -1,8 +1,8 @@
|
||||
.. _Split Mongo Modulestore:
|
||||
|
||||
############################
|
||||
#######################
|
||||
Split Mongo Modulestore
|
||||
############################
|
||||
#######################
|
||||
|
||||
See:
|
||||
|
||||
@@ -11,9 +11,9 @@ See:
|
||||
* `Split Mongo Capabilities`_
|
||||
|
||||
|
||||
************************
|
||||
********
|
||||
Overview
|
||||
************************
|
||||
********
|
||||
|
||||
*Split Mongo* is the term used for the new edX modulestore. Split Mongo is
|
||||
built on mongoDB. For information about mongoDB, see the `mongoDB website`_.
|
||||
@@ -30,9 +30,9 @@ use more advanced capabilities when developing and managing courses.
|
||||
|
||||
.. _mongoDB website: http://www.mongodb.org
|
||||
|
||||
************************
|
||||
**********************
|
||||
Split Mongo Data Model
|
||||
************************
|
||||
**********************
|
||||
|
||||
In the Split Mongo data model, edX courses are split into three collections:
|
||||
|
||||
@@ -42,9 +42,9 @@ In the Split Mongo data model, edX courses are split into three collections:
|
||||
|
||||
.. Structures link is a workaround; "Course Structures" as label is already taken
|
||||
|
||||
=============
|
||||
============
|
||||
Course Index
|
||||
=============
|
||||
============
|
||||
|
||||
The course index is a dictionary that stores course IDs. Each course ID points
|
||||
to a course structure.
|
||||
@@ -69,13 +69,13 @@ In the edX Platform:
|
||||
about page, course updates, other course pages, sections or subsections,
|
||||
the draft branch is automatically published; that is, it becomes the
|
||||
published branch.
|
||||
|
||||
|
||||
* For units and components, changes are saved in the draft branch. The user
|
||||
must publish the unit to change the draft branch to the published branch.
|
||||
When the user begins another set of changes, the draft branch is updated.
|
||||
|
||||
Course Reruns
|
||||
**************
|
||||
*************
|
||||
|
||||
The edX Platform enables you to rerun a course. When you rerun a course, a new
|
||||
course index is created. The new course index points to the same course
|
||||
@@ -83,9 +83,9 @@ structure as the original course index.
|
||||
|
||||
.. _Structures:
|
||||
|
||||
==========================
|
||||
=================
|
||||
Course Structures
|
||||
==========================
|
||||
=================
|
||||
|
||||
The course structure defines, or outlines, the content of a course.
|
||||
|
||||
@@ -104,9 +104,9 @@ when a course author changes a course, or a block in the course, a new course
|
||||
structure is saved; the previous course structure, and previous versions of
|
||||
blocks within the structure, remain in the database and are not modified.
|
||||
|
||||
==========================
|
||||
==================
|
||||
XBlock Definitions
|
||||
==========================
|
||||
==================
|
||||
|
||||
XBlock definitions contain the content of each block. For some blocks, such as
|
||||
sections and subsections, the definition consists of the block's display name.
|
||||
@@ -129,7 +129,7 @@ enable:
|
||||
* `Multiple Course Branches`_
|
||||
* `Versioning`_
|
||||
* `Content Reuse`_
|
||||
|
||||
|
||||
While these capabilities are not fully implemented in the edX Platform, Split
|
||||
Mongo is designed to allow future enhancements that enable these content
|
||||
management capabilities.
|
||||
@@ -145,9 +145,9 @@ different structure.
|
||||
The edX Platform currently uses a draft and a published branch for a course.
|
||||
Future enhancements may use other branches.
|
||||
|
||||
============
|
||||
==========
|
||||
Versioning
|
||||
============
|
||||
==========
|
||||
|
||||
In Split Mongo, every change to a course or a block within the course is saved,
|
||||
with the time and user recorded.
|
||||
@@ -155,9 +155,9 @@ with the time and user recorded.
|
||||
Versioning enables future enhancements such as allowing course authors to
|
||||
revert a course or block to a previous version.
|
||||
|
||||
==============
|
||||
=============
|
||||
Content Reuse
|
||||
==============
|
||||
=============
|
||||
|
||||
By using pointers to reference XBlock definitions from :ref:`course structures
|
||||
<Structures>`, Split Mongo enables content reuse. A single `XBlock
|
||||
|
||||
Reference in New Issue
Block a user