Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 0.65.0 #1638

Merged
merged 7 commits into from
May 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Run through those steps **including the addition of `/etc/hosts` aliases and the

### Configure mitxonline and Open edX

**Open edX Tutor** can be used with MITx Online instead of the traditional devstack release. See [Local Open edX Tutor and MITx Online Deployment](docs/source/configuration/tutor.rst) for details.

See [MITx Online Quick Start](docs/source/configuration/quickstart.rst) and [Configure Open edX](docs/source/configuration/open_edx.rst)

### Configuring the CMS
Expand All @@ -23,13 +25,9 @@ to be usable. You can apply all of those changes by running a management command
docker-compose run --rm web ./manage.py configure_wagtail
```

### Configuring Refine Admin

See [Configure Refine Admin](docs/source/configuration/refine_admin.rst)

# Running, testing, and administering the app

Running, testing, and administering this app follows the same patterns as our other web apps.
Running, testing, and administering this app follows the same patterns as our other web apps.

*Note: for js tests, run the commands in `frontend/public`, or run via `yarn workspaces foreach run <command>` from the root.

Expand Down
10 changes: 10 additions & 0 deletions RELEASE.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
Release Notes
=============

Version 0.65.0
--------------

- update google-sheets-deferrals (#1637)
- Incorporates changes to make MITxOnline work with Tutor (#1376)
- Add row header to order history table (#1636)
- Remove scheduled cron task (#1635)
- Working (#1632)
- Adding google sheets deferrals library (#1604)

Version 0.64.1 (Released May 25, 2023)
--------------

Expand Down
30 changes: 29 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,34 @@
"description": "The name of the timezone that should be assumed for date/time values in spreadsheets. Choose from a value in the TZ database (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).",
"required": false
},
"MITOL_GOOGLE_SHEETS_DEFERRALS_COMPLETED_DATE_COL": {
"description": "The zero-based index of the enrollment change sheet column that contains the row completion date",
"required": false
},
"MITOL_GOOGLE_SHEETS_DEFERRALS_ERROR_COL": {
"description": "The zero-based index of the enrollment change sheet column that contains row processing error messages",
"required": false
},
"MITOL_GOOGLE_SHEETS_DEFERRALS_FIRST_ROW": {
"description": "The first row (as it appears in the spreadsheet) of data that our scripts should consider processing in the deferral request spreadsheet",
"required": false
},
"MITOL_GOOGLE_SHEETS_DEFERRALS_PLUGINS": {
"description": "The path to your deferral plugin, example: app.plugins.DeferralPlugin",
"required": false
},
"MITOL_GOOGLE_SHEETS_DEFERRALS_PROCESSOR_COL": {
"description": "The zero-based index of the enrollment change sheet column that contains the user that processed the row",
"required": false
},
"MITOL_GOOGLE_SHEETS_DEFERRALS_REQUEST_WORKSHEET_ID": {
"description": "ID of the worksheet within the enrollment change request spreadsheet that contains enrollment deferral requests",
"required": false
},
"MITOL_GOOGLE_SHEETS_DEFERRALS_SKIP_ROW_COL": {
"description": "The zero-based index of the enrollment change sheet column that indicates whether the row should be skipped",
"required": false
},
"MITOL_GOOGLE_SHEETS_DRIVE_API_PROJECT_ID": {
"description": "ID for the Google API project where the credentials were created",
"required": false
Expand Down Expand Up @@ -551,4 +579,4 @@
},
"success_url": "/",
"website": "https://github.com/mitodl/mitx-online"
}
}
2 changes: 1 addition & 1 deletion authentication/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def create(self, validated_data):

try:
user = User.objects.filter(
email=validated_data.get("email"),
email__iexact=validated_data.get("email"),
is_active=True,
).first()
if user is None:
Expand Down
29 changes: 29 additions & 0 deletions authentication/serializers_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,3 +165,32 @@ def test_login_email_validation_email_changed(mocker):
)

assert len(LoginEmailSerializer(result).data["field_errors"]) == 0


def test_login_email_validation_email_different_case(mocker):
"""Tests class-level validation of LoginEmailSerializer to handle different case of email entry."""

mocked_authenticate = mocker.patch(
"authentication.serializers.SocialAuthSerializer._authenticate"
)

user = UserFactory.create()

result = SocialAuthState(
SocialAuthState.STATE_LOGIN_PASSWORD, partial=mocker.Mock(), user=user
)
result.flow = SocialAuthState.FLOW_LOGIN
result.provider = EmailAuth.name
serializer = LoginEmailSerializer(
data={"flow": result.flow, "email": user.email.upper()},
context={
"backend": mocker.Mock(),
"strategy": mocker.Mock(),
"request": mocker.Mock(),
},
)
assert serializer.is_valid() is True, "Received errors: {}".format(
serializer.errors
)

assert len(LoginEmailSerializer(result).data["field_errors"]) == 0
11 changes: 6 additions & 5 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ x-extra-hosts:
&default-extra-hosts
- "edx.odl.local:${OPENEDX_IP:-172.22.0.1}"
- "host.docker.internal:host-gateway"
- "local.overhang.io:host-gateway"

services:
db:
Expand Down Expand Up @@ -68,7 +69,7 @@ services:
links:
- db
- redis
# these are links instead of `depends_on`
# these are links instead of `depends_on`
# because if we just want a shell for `web` we don't want to run these
- watch
- refine
Expand All @@ -79,7 +80,7 @@ services:

watch:
image: node:17.8
working_dir: /app
working_dir: /app
command: ./scripts/run-watch-dev.sh
ports:
- "8012:8012"
Expand Down Expand Up @@ -163,9 +164,9 @@ services:

varnish:
image: varnish:fresh
links:
links:
- nginx
ports:
ports:
- "8013:80"
volumes:
- ./config/default.vcl:/etc/varnish/default.vcl:ro
Expand All @@ -175,4 +176,4 @@ services:
volumes:
npm-cache: {}
django_media: {}
yarn-cache: {}
yarn-cache: {}
12 changes: 8 additions & 4 deletions docs/source/commands/configure_instance.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
``configure_instance``
======================

Configures a fresh MITx Online instance. For more information, see :doc:`MITx Online Quick Start<../configuration/quickstart>`.
Configures a fresh MITx Online instance. For more information, see :doc:`MITx Online Quick Start<../configuration/quickstart>` and :doc:`Local Open edX Tutor and MITx Online Deployment<../configuration/tutor>`.

For Tutor deployments, this will use ``local.overhang.io`` for URLs for the edX platform. If you're running a dev deployment, or are using Tutor Nightly, ``--tutor-dev`` will additionally add the proper ports (as Caddy is disabled in these cases). In either case, the two demo courses will still be created but only the Demonstration Course (``course-v1:edX+DemoX+Demo_Course``) will exist in edX, and then only if you import the demo course using the relevant Tutor command.

Syntax
------

``configure_instance <platform> [--dont-enroll|-D] [--dont-create-superuser|-S] [--edx-oauth-client <client id>] [--edx-oauth-secret <client secret>] [--gateway <ip>]``
``configure_instance <platform> [--dont-enroll|-D] [--dont-create-superuser|-S] [--edx-oauth-client <client id>] [--edx-oauth-secret <client secret>] [--gateway <ip>] [--tutor|-T] [--tutor-dev]``

Options
-------
Expand All @@ -15,5 +17,7 @@ Options
* ``--dont-enroll|-D`` - Don't enroll the test learner account in any courses. (Defaults to enrolling the account in ``course-v1:edX+DemoX+Demo_Course``.)
* ``--dont-create-superuser|-S`` - Don't create a superuser account.
* ``--gateway <ip>`` - The Docker gateway IP. Required on Linux. See :doc:`Configure Open edX<../configuration/open_edx>` for more info.
* ``--edx-oauth-client <client id>`` - Use the specified client ID for the edX OAuth2 client. (Useful if you're redoing your MITx Online instance and you've already created the corresponding record in edX, since you're not allowed to edit it there.)
* ``--edx-oauth-secret <client secret>`` - Use the specified client secret for the edX OAuth2 client. (Useful if you're redoing your MITx Online instance and you've already created the corresponding record in edX, since you're not allowed to edit it there.)
* ``--edx-oauth-client <client id>`` - Use the specified client ID for the edX OAuth2 client. (Useful if you're redoing your MITx Online instance and you've already created the corresponding record in edX, since you're not allowed to edit it there.)
* ``--edx-oauth-secret <client secret>`` - Use the specified client secret for the edX OAuth2 client. (Useful if you're redoing your MITx Online instance and you've already created the corresponding record in edX, since you're not allowed to edit it there.)
* ``--tutor|-T`` - Configure the instance for use with a Tutor edX deployment.
* ``--tutor-dev`` - Configure the instnace for use with Tutor dev or nightly.
4 changes: 2 additions & 2 deletions docs/source/configuration/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ Configuration
:maxdepth: 2

open_edx
tutor
ecommerce
refine_admin
quickstart
quickstart
80 changes: 0 additions & 80 deletions docs/source/configuration/refine_admin.rst

This file was deleted.

Loading