Skip to content

Commit

Permalink
Merge branch 'master' into a-asad/video-player-logging-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
a-asad authored Dec 18, 2024
2 parents f4380a9 + e2a4b9e commit 11183b3
Show file tree
Hide file tree
Showing 16 changed files with 251 additions and 409 deletions.
43 changes: 0 additions & 43 deletions .github/workflows/docker-publish.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/publish-ci-docker-image.yml

This file was deleted.

200 changes: 0 additions & 200 deletions Dockerfile

This file was deleted.

34 changes: 1 addition & 33 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Do things in edx-platform
.PHONY: base-requirements check-types clean \
compile-requirements detect_changed_source_translations dev-requirements \
docker_auth docker_build docker_tag_build_push_lms docker_tag_build_push_lms_dev \
docker_tag_build_push_cms docker_tag_build_push_cms_dev docs extract_translations \
docs extract_translations \
guides help lint-imports local-requirements migrate migrate-lms migrate-cms \
pre-requirements pull pull_xblock_translations pull_translations push_translations \
requirements shell swagger \
Expand Down Expand Up @@ -67,9 +66,6 @@ pull_translations: clean_translations ## pull translations via atlas
detect_changed_source_translations: ## check if translation files are up-to-date
i18n_tool changed

pull: ## update the Docker image used by "make shell"
docker pull edxops/edxapp:latest

pre-requirements: ## install Python requirements for running pip-tools
pip install -r requirements/pip.txt
pip install -r requirements/pip-tools.txt
Expand All @@ -94,13 +90,6 @@ test-requirements: pre-requirements

requirements: dev-requirements ## install development environment requirements

shell: ## launch a bash shell in a Docker container with all edx-platform dependencies installed
docker run -it -e "NO_PYTHON_UNINSTALL=1" -e "PIP_INDEX_URL=https://pypi.python.org/simple" -e TERM \
-v `pwd`:/edx/app/edxapp/edx-platform:cached \
-v edxapp_lms_assets:/edx/var/edxapp/staticfiles/ \
-v edxapp_node_modules:/edx/app/edxapp/edx-platform/node_modules \
edxops/edxapp:latest /edx/app/edxapp/devstack.sh open

# Order is very important in this list: files must appear after everything they include!
REQ_FILES = \
requirements/edx/coverage \
Expand Down Expand Up @@ -164,27 +153,6 @@ upgrade-package: ## update just one package to the latest usable release
check-types: ## run static type-checking tests
mypy

docker_auth:
echo "$$DOCKERHUB_PASSWORD" | docker login -u "$$DOCKERHUB_USERNAME" --password-stdin

docker_build: docker_auth
DOCKER_BUILDKIT=1 docker build . --build-arg SERVICE_VARIANT=lms --build-arg SERVICE_PORT=8000 --target development -t openedx/lms-dev
DOCKER_BUILDKIT=1 docker build . --build-arg SERVICE_VARIANT=lms --build-arg SERVICE_PORT=8000 --target production -t openedx/lms
DOCKER_BUILDKIT=1 docker build . --build-arg SERVICE_VARIANT=cms --build-arg SERVICE_PORT=8010 --target development -t openedx/cms-dev
DOCKER_BUILDKIT=1 docker build . --build-arg SERVICE_VARIANT=cms --build-arg SERVICE_PORT=8010 --target production -t openedx/cms

docker_tag_build_push_lms: docker_auth
docker buildx build -t openedx/lms:latest -t openedx/lms:${GITHUB_SHA} --platform linux/amd64,linux/arm64 --build-arg SERVICE_VARIANT=lms --build-arg SERVICE_PORT=8000 --target production --push .

docker_tag_build_push_lms_dev: docker_auth
docker buildx build -t openedx/lms-dev:latest -t openedx/lms-dev:${GITHUB_SHA} --platform linux/amd64,linux/arm64 --build-arg SERVICE_VARIANT=lms --build-arg SERVICE_PORT=8000 --target development --push .

docker_tag_build_push_cms: docker_auth
docker buildx build -t openedx/cms:latest -t openedx/cms:${GITHUB_SHA} --platform linux/amd64,linux/arm64 --build-arg SERVICE_VARIANT=cms --build-arg SERVICE_PORT=8010 --target production --push .

docker_tag_build_push_cms_dev: docker_auth
docker buildx build -t openedx/cms-dev:latest -t openedx/cms-dev:${GITHUB_SHA} --platform linux/amd64,linux/arm64 --build-arg SERVICE_VARIANT=cms --build-arg SERVICE_PORT=8010 --target development --push .

lint-imports:
lint-imports

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
Command to trigger sending reminder emails for learners to achieve their Course Goals
"""
import time
from datetime import date, datetime, timedelta
from eventtracking import tracker
import logging
Expand Down Expand Up @@ -119,9 +120,9 @@ def send_ace_message(goal, session_id):

with emulate_http_request(site, user):
try:
start_time = datetime.now()
start_time = time.perf_counter()
ace.send(msg)
end_time = datetime.now()
end_time = time.perf_counter()
log.info(f"Goal Reminder for {user.id} for course {goal.course_key} sent in {end_time - start_time} "
f"using {'SES' if is_ses_enabled else 'others'}")
except Exception as exc: # pylint: disable=broad-except
Expand Down
9 changes: 9 additions & 0 deletions lms/djangoapps/instructor/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1990,6 +1990,15 @@ def test_add_notenrolled_username_autoenroll(self):
self.add_notenrolled(response, self.notenrolled_student.username)
assert CourseEnrollment.is_enrolled(self.notenrolled_student, self.course.id)

def test_add_notenrolled_username_autoenroll_with_multiple_users(self):
url = reverse('bulk_beta_modify_access', kwargs={'course_id': str(self.course.id)})
identifiers = (f"[email protected], "
f"[email protected]\n[email protected]\r [email protected]\r, [email protected], "
f"{self.notenrolled_student.username}"
)
response = self.client.post(url, {'identifiers': identifiers, 'action': 'add', 'email_students': False, 'auto_enroll': True}) # lint-amnesty, pylint: disable=line-too-long
assert 6, len(json.loads(response.content.decode())['results'])

@ddt.data('http', 'https')
def test_add_notenrolled_with_email(self, protocol):
url = reverse('bulk_beta_modify_access', kwargs={'course_id': str(self.course.id)})
Expand Down
Loading

0 comments on commit 11183b3

Please sign in to comment.