From a80523b936fc113a28520abe404433dedccea41a Mon Sep 17 00:00:00 2001 From: Daniel Wong Date: Wed, 14 May 2025 16:56:54 -0600 Subject: [PATCH 1/3] fix: refactor index_together to indexes for Django 5.2 support --- ...tended_student_module_student_module_idx.py | 18 ++++++++++++++++++ .../coursewarehistoryextended/models.py | 7 ++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 lms/djangoapps/coursewarehistoryextended/migrations/0003_rename_studentmodulehistoryextended_student_module_student_module_idx.py diff --git a/lms/djangoapps/coursewarehistoryextended/migrations/0003_rename_studentmodulehistoryextended_student_module_student_module_idx.py b/lms/djangoapps/coursewarehistoryextended/migrations/0003_rename_studentmodulehistoryextended_student_module_student_module_idx.py new file mode 100644 index 0000000000..c39e2410b5 --- /dev/null +++ b/lms/djangoapps/coursewarehistoryextended/migrations/0003_rename_studentmodulehistoryextended_student_module_student_module_idx.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.20 on 2025-05-15 03:30 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('coursewarehistoryextended', '0002_force_studentmodule_index'), + ] + + operations = [ + migrations.RenameIndex( + model_name='studentmodulehistoryextended', + new_name='student_module_idx', + old_fields=('student_module',), + ), + ] diff --git a/lms/djangoapps/coursewarehistoryextended/models.py b/lms/djangoapps/coursewarehistoryextended/models.py index 37de4a93ab..d9e2d54cca 100644 --- a/lms/djangoapps/coursewarehistoryextended/models.py +++ b/lms/djangoapps/coursewarehistoryextended/models.py @@ -33,7 +33,12 @@ class StudentModuleHistoryExtended(BaseStudentModuleHistory): class Meta: app_label = 'coursewarehistoryextended' get_latest_by = "created" - index_together = ['student_module'] + indexes = [ + models.Index( + fields=['student_module'], + name="student_module_idx" + ), + ] id = UnsignedBigIntAutoField(primary_key=True) # pylint: disable=invalid-name From 7680bf931cb79ba306505f358adc0dfe96ff1467 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 16 May 2025 20:14:29 +0500 Subject: [PATCH 2/3] feat: Upgrade Python dependency django-multi-email-field (#36730) Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master` Co-authored-by: UsamaSadiq <41958659+UsamaSadiq@users.noreply.github.com> --- requirements/edx/base.txt | 2 +- requirements/edx/development.txt | 2 +- requirements/edx/doc.txt | 2 +- requirements/edx/testing.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt index f5b94a806b..e45325b2c8 100644 --- a/requirements/edx/base.txt +++ b/requirements/edx/base.txt @@ -303,7 +303,7 @@ django-mptt==0.17.0 # via # -r requirements/edx/kernel.in # openedx-django-wiki -django-multi-email-field==0.7.0 +django-multi-email-field==0.8.0 # via edx-enterprise django-mysql==4.16.0 # via -r requirements/edx/kernel.in diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt index b64266f5ff..8673d9d388 100644 --- a/requirements/edx/development.txt +++ b/requirements/edx/development.txt @@ -506,7 +506,7 @@ django-mptt==0.17.0 # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt # openedx-django-wiki -django-multi-email-field==0.7.0 +django-multi-email-field==0.8.0 # via # -r requirements/edx/doc.txt # -r requirements/edx/testing.txt diff --git a/requirements/edx/doc.txt b/requirements/edx/doc.txt index d3083fc7ad..90b07ba5e9 100644 --- a/requirements/edx/doc.txt +++ b/requirements/edx/doc.txt @@ -369,7 +369,7 @@ django-mptt==0.17.0 # via # -r requirements/edx/base.txt # openedx-django-wiki -django-multi-email-field==0.7.0 +django-multi-email-field==0.8.0 # via # -r requirements/edx/base.txt # edx-enterprise diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt index cec7ca7d63..484d7745f5 100644 --- a/requirements/edx/testing.txt +++ b/requirements/edx/testing.txt @@ -399,7 +399,7 @@ django-mptt==0.17.0 # via # -r requirements/edx/base.txt # openedx-django-wiki -django-multi-email-field==0.7.0 +django-multi-email-field==0.8.0 # via # -r requirements/edx/base.txt # edx-enterprise From 9750c63f746b8e644f219312620342d3c0663261 Mon Sep 17 00:00:00 2001 From: ayesha waris <73840786+ayesha-waris@users.noreply.github.com> Date: Fri, 16 May 2025 21:55:27 +0500 Subject: [PATCH 3/3] temp: adding console statements for testing purpose (#36733) Co-authored-by: Ayesha Waris --- lms/static/js/student_account/views/FinishAuthView.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lms/static/js/student_account/views/FinishAuthView.js b/lms/static/js/student_account/views/FinishAuthView.js index f9ae7157ed..02f94c89a7 100644 --- a/lms/static/js/student_account/views/FinishAuthView.js +++ b/lms/static/js/student_account/views/FinishAuthView.js @@ -68,7 +68,9 @@ this.purchaseWorkflow = queryParams.purchaseWorkflow; if (queryParams.next) { // Ensure that the next URL is internal for security reasons + this.updateTaskDescription(gettext("query param next is provide")); if (!window.isExternal(queryParams.next)) { + this.updateTaskDescription(gettext("query param next is internal")); this.nextUrl = queryParams.next; } } @@ -135,6 +137,7 @@ The track selection page would allow the user to select the course mode ("verified", "honor", etc.) -- or, if the only course mode was "honor", it would redirect the user to the dashboard. */ + this.updateTaskDescription(gettext("course mode param is not provided")); redirectUrl = this.appendPurchaseWorkflow(this.urls.trackSelection + courseId + '/'); } else if (this.courseMode === 'honor' || this.courseMode === 'audit') { /* The newer version of the course details page allows the user @@ -142,6 +145,7 @@ chosen "honor", we send them immediately to the next URL rather than the payment flow. The user may decide to upgrade from the dashboard later. */ + this.updateTaskDescription(gettext("course mode param is provided")); } else { /* If the user selected any other kind of course mode, send them to the payment/verification flow. */ @@ -160,6 +164,7 @@ shoppingCartInterface.addCourseToCart(this.courseId); } else { // Otherwise, redirect the user to the next page. + this.updateTaskDescription(gettext(" redirect the user to the next page")); this.redirect(redirectUrl); } },