Commit Graph

19580 Commits

Author SHA1 Message Date
Jesper Hodge
a6c57811cd feat add xblock api endpoint (#32282)
* feat: add xblock endpoint for updating an xblock

fix: remove debugger

feat: make function call more generic

refactor: just use request.json for request data as before

refactor: extract method

fix: revert wrong method change

fix: refactor correct method

feat: use handle_xblock method so that we can do more than update xblocks

fix: usage_key_string defaults to None

add all CRUD operations

fix usage key parameter

refactor: create /views folder

refactor: move xblock view functions to xblock_services

fix: tests

fix: tests

refactor: move xblock API endpoint to contentstore

* docs: add explanatory comment to new xblock_service

* feat: add feature flag for enabling content editing api

* feat: raise 404 if studio content api is disabled

* tests: test xblock endpoint

* test: make all post tests work

* test: check that xblock_handler receives correct args

* refactor: create util mixin for course factories with staff

* refactor: extract course staff authorization tests

* refactor: extract tests to api view testcase class

* test: add get tests

* test: fix tests

* test: fix tests

* test: fix tests

* test: add all crud tests

* fix: refactor to fix tests

* fix: merge conflict

* fix: merge conflict

* fix: tests after merge

* fix: json request decorator

* fix: lint

* fix: lint

* fix: lint

* fix: lint

* fix: new test files

* fix: lint

* fix: lint and apply PR suggestions

* fix: lint

* fix: lint

* fix: lint

* fix: lint

* fix: lint

* fix: lint
2023-06-15 14:17:49 -04:00
Agrendalath
9fbc263edd feat: remove block-specific handling from runtime role checks 2023-06-15 11:08:03 +02:00
Jenkins
7b22a7c322 chore: geoip2: update maxmind geolite country database 2023-06-14 16:58:51 -04:00
Jenkins
5c961b7b04 chore: geoip2: update maxmind geolite country database 2023-06-07 16:58:55 -04:00
Moeez Zahid
6ab9e497fc refactor: Add logging, exception handling to Apple migration commands (#32390)
* refactor: Add logging, exception handling to Apple migration commands
* refactor: pylint fixes
2023-06-07 17:07:13 +05:00
Jenkins
aace5813b3 chore: geoip2: update maxmind geolite country database 2023-05-31 16:58:47 -04:00
Chris Pappas
38a69d10ff feat: allow course entitlements REST API to be filtered on course_uuid (#32305)
* feat: allow course entitlements REST API to be filtered on course_uuid

* feat: add field to filter out entitlements with null expired_at values

* chore: update tests
2023-05-26 09:44:32 -04:00
Jenkins
16955828e7 chore: geoip2: update maxmind geolite country database 2023-05-24 16:58:47 -04:00
Zainab Amir
fa7953ca24 feat: set traverse pagination to False (#32269)
* For enrollment email task, while getting course uuid and
owner data don't traverse the discovery endpoint.
* Update log message
2023-05-19 19:46:33 +05:00
John Nagro
0fd36f97f3 fix: adding some logging and exceptions to further investigation into discovery load (#32267) 2023-05-18 19:42:19 -04:00
Syed Ali Abbas Zaidi
d7053a6783 fix: eslint autofixable issues (#32181)
* fix: eslint operator-linebreak issue

* fix: eslint quotes issue

* fix: react jsx indent and props issues

* fix: eslint trailing spaces issues

* fix: eslint line around directives issue

* fix: eslint semi rule

* fix: eslint newline per chain rule

* fix: eslint space infix ops rule

* fix: eslint space-in-parens issue

* fix: eslint space before function paren issue

* fix: eslint space before blocks issue

* fix: eslint arrow body style issue

* fix: eslint dot-location issue

* fix: eslint quotes issue

* fix: eslint quote props issue

* fix: eslint operator assignment issue

* fix: eslint new line after import issue

* fix: indent issues

* fix: operator assignment issue

* fix: all autofixable eslint issues

* fix: all react related fixable issues

* fix: autofixable eslint issues

* chore: remove all template literals

* fix: remaining autofixable issues

* fix: failing js test
2023-05-18 11:03:59 +05:00
Jenkins
f2daf37d4a chore: geoip2: update maxmind geolite country database 2023-05-17 16:58:48 -04:00
Tim McCormack
1088dc224f feat: Explicitly note that global status message accepts HTML (#32209)
We've seen some confusion in the past about whether HTML is supported here.
2023-05-12 16:37:34 +00:00
Jenkins
f8737d3439 chore: geoip2: update maxmind geolite country database 2023-05-10 16:58:45 -04:00
Syed Ali Abbas Zaidi
adf879e8b2 Revert "fix: all auto fixable eslint issues (#31900)" (#32203)
This reverts commit 228180b1ef.
2023-05-09 13:53:54 +05:00
Syed Ali Abbas Zaidi
228180b1ef fix: all auto fixable eslint issues (#31900)
* fix: eslint operator-linebreak issue

* fix: eslint quotes issue

* fix: react jsx indent and props issues

* fix: eslint trailing spaces issues

* fix: eslint line around directives issue

* fix: eslint prefer template issue

* fix: eslint semi rule

* fix: eslint newline per chain rule

* fix: eslint space infix ops rule

* fix: eslint space-in-parens issue

* fix: eslint space before function paren issue

* fix: eslint space before blocks issue

* fix: eslint arrow body style issue

* fix: eslint dot-location issue

* fix: eslint quotes issue

* fix: eslint quote props issue

* fix: eslint operator assignment issue

* fix: eslint new line after import issue

* fix: indent issues

* fix: operator assignment issue
2023-05-09 11:57:15 +05:00
0x29a
065f894d1b fix: missing advance_settings_access template variable
Co-authored-by: Farhaan Bukhsh <farhaan.bukhsh@gmail.com>
2023-05-05 11:42:53 +05:30
Syed Ali Abbas Zaidi
f1fb38ed83 fix: multi lines and spaces issues (#31885)
* fix: multi lines and spaces issues

* fix: eslint operator-linebreak issue

* fix: eslint quotes issue

* fix: remaining quotes issues

* fix: eslint object curly newline issue

* fix: eslint object curly spacing issue

* fix: eslint brace-style issues

* fix: react jsx indent and props issues

* fix: eslint trailing spaces issues

* fix: eslint linbreak style issue

* fix: eslint space unary operator issue

* fix: eslint line around directives issue

* fix: void and typeof space unary ops issue
2023-05-03 12:22:46 +05:00
Agrendalath
aa85257b19 fix: use student-specific anonymous IDs in CAPA and HTML XBlocks
After changes from #31472, the user service of a "leaf" XBlock gets overridden
with the one created for its parent (SequenceBlock). Therefore, the
`requires_per_student_anonymous_id` is ignored in these XBlocks. The
subsequent renders of an XBlock (e.g., when requesting the solution) use
the student-specific IDs.

This removes choosing the proper ID (course-specific or student-specific) from
the runtime initialization. Instead, both IDs are passed to the user service.

There are only two XBlocks that relied on the
`requires_per_student_anonymous_id` - `ProblemBlock` and `HtmlBlock`. They
now request the "deprecated" (student-specific) user ID directly from the user
service.
2023-05-02 17:58:22 +02:00
Jenkins
a33985e223 chore: geoip2: update maxmind geolite country database 2023-04-26 17:07:53 -04:00
Pooja Kulkarni
953e1f945e refactor: rename descriptor -> block within common
Co-authored-by: Agrendalath <piotr@surowiec.it>
2023-04-26 17:10:53 +02:00
Jenkins
7b0c5b87b6 chore: geoip2: update maxmind geolite country database 2023-04-19 16:58:43 -04:00
Jenkins
1436125864 chore: geoip2: update maxmind geolite country database 2023-04-12 16:58:40 -04:00
Jenkins
3bacb42d29 chore: geoip2: update maxmind geolite country database 2023-03-29 16:58:41 -04:00
Collin Preston
831a8bcc36 feat: add course mode expiration explicit to admin (#31289)
* feat: add course mode expiration explicit to admin

Adds a checkbox for defining the expiration_datetime_is_explicit to the course_mode Django admin screen.

* fix: Change labels to use "lock"

* fix: increment migration name number

* fix: delete migration

delete the migration and recreate in the next commit

* fix: add back migration

Add back the migration to hopefully fix strange failing test.

* fix: fix failing test
2023-03-21 10:46:52 -04:00
Diana Huang
373d3d58b6 feat: Add wrapper to saml auth_complete. (#31933)
We would like to catch an error in SAML auth so that
we can handle it better in our observability. This
catches the original generic error and raises it as a more
specific one.

https://github.com/edx/edx-arch-experiments/issues/154
2023-03-20 12:04:16 -04:00
Moeez Zahid
a0eeb35151 refactor: Resume-able Apple migration mgmt cmds (#31954) 2023-03-20 13:02:59 +05:00
Kyle McCormick
cd24534653 build: run ShellCheck in CI (#31809)
build: run ShellCheck

Adds a ShellCheck check to edx-platform PRs and master,
using the shared workflow & template from the .github repo.
This will become a "required" check once it passes for 2 straight weeks on master.

Brings all existing shell scripts into compliance with ShellCheck.
2023-03-10 16:10:56 +00:00
Moeez Zahid
5b1eb3777e feat: Support Apple team Migration (#31861)
* feat: LEARNER-8790 Support Apple team migration
2023-03-10 13:06:31 +05:00
Muhammad Abdullah Waheed
90c4ca6e47 Revert "FC-0001: Account pages -> micro-frontend (#30336)" (#31888)
This reverts commit 0f02c7b3d9.
2023-03-07 17:41:56 -05:00
Sagirov Evgeniy
0f02c7b3d9 FC-0001: Account pages -> micro-frontend (#30336)
* feat: Account pages. Learner Profile page

* feat: Account pages. Account Settings page

* feat: Account pages. Removed unused styles

* feat: Account pages. Removed unused toggles

* feat: fixed tests and pylint errors

* feat: update redirect to account settings for student_dashboard

* feat: fix pylint errors
2023-03-07 17:41:52 +05:00
Awais Qureshi
20ef29da53 chore: Replaced boto usage with boto3. (#31886)
* chore: Replaced boto usage with boto3.
2023-03-07 15:47:48 +05:00
John Nagro
b1880cb549 fix: properly handle SAML Index and Key errors (#31882) 2023-03-06 15:31:13 -05:00
Shahbaz Shabbir
cf27d344bd fix: Add longer retry schedule for course enrollment emails (#31854) 2023-03-06 10:44:38 +05:00
Syed Ali Abbas Zaidi
5549db4d80 fix: migrate remaining eslint-config-edx (#31760)
* fix: migrate remaining eslint-config-edx

* refactor: updated eslint rules according to eslint-config-edx-es5

* refactor: add custom rules to suppress unnecessary eslint issues

* refactor: add custom rules to internal eslint configs

* fix: fix all indentation issues

* chore: update lock file
2023-03-02 16:16:50 +05:00
Shahbaz Shabbir
ff0805a189 feat: Add management command to unsubscribe user email (#31705) 2023-03-01 18:23:56 +05:00
Attiya Ishaque
bf36c42950 fix: [VAN-1292] Remove personalized recommendation cookie (#31748) 2023-02-17 13:45:29 +05:00
Tim McCormack
83f6e560b7 fix: Add code_owner decorator to remaining Celery tasks (#31762)
This will ensure that errors raised by these tasks will alert the right
team. `send_course_enrollment_email` is the one I set out to fix, but I
discovered a few others.

I located tasks that were missing decorators by running the following
search and visually inspecting the results, although semgrep might be able
to do better:

```
ack '^@.*task|^@set_code_owner_attribute' cms lms common openedx xmodule --ignore-dir=tests --python
```

Also, add more detailed explanation of why a couple of tasks can't use the
decorator. This should only be an issue on tasks inheriting from
UserTaskMixin, which in practice is just CourseExportTask and
CourseImportTask (and the apparently unused EnrollmentReadTask and
EnrollmentWriteTask), via UserTask.
2023-02-15 18:20:50 +00:00
Tim McCormack
197fef9c2b docs: Various cleanup of outdated comments and docstrings (#31754)
- Remove pylint warning suppression from SHAKE-128 hexdigest calls; these
  are no longer needed as of astroid 2.12.12. For background, see issue
  <https://github.com/PyCQA/pylint/issues/4039>. Also, correct a comment
  that referred to SHAKE-256 instead of SHAKE-128.
- Replace "released" with "beta" in several places where there was a copy
  & paste error in dark_lang. Add mention of `beta_lang` to a docstring
  where it was omitted.
- Remove comment regarding Mongo startup; the code it referred to has since
  been removed.
- Fix typos.
2023-02-14 18:11:57 +00:00
Moeez Zahid
c8af0f607f Enable In-App purchases on edx-mobile app (#31512)
* feat: added mobile skus in course mode

* fix: changed api

---------

Co-authored-by: jawad-khan <jawadkhan444@gmail.com>
Co-authored-by: Robert Raposa <rraposa@edx.org>
2023-02-10 16:16:37 +05:00
Usama Sadiq
997f194669 Revert "build: remove boto old version (#31282)" (#31733)
This reverts commit 14e6040141.
2023-02-09 18:36:59 +05:00
Muhammad Umar Khan
14e6040141 build: remove boto old version (#31282) 2023-02-09 15:21:10 +05:00
Mohammad Ahtasham ul Hassan
3726d122f9 Migrate eslint-config-edx (#30460)
* feat: migrare eslint-config-edx

* refactor: updated package-lock

* refactor: updated package-lock

---------

Co-authored-by: Bilal Qamar <59555732+BilalQamar95@users.noreply.github.com>
Co-authored-by: Mashal Malik <107556986+Mashal-m@users.noreply.github.com>
Co-authored-by: Abdullah Waheed <abdullah.waheed@arbisoft.com>
2023-02-09 13:57:18 +05:00
Justin Hynes
c6a548e419 temp: remove temp logging added around extended_profile functionality
[APER-2247]

This reverts commit 1359a6d6bb. This logging is no longer needed as the feature is working as expected (and we figured out the issue causing unexpected/missing results).
2023-02-08 10:54:56 -05:00
Justin Hynes
1359a6d6bb temp: add some logging around extended profile update functionality
I am trying to persist/save data through an "extended profile field" in Stage but the data isn't saving. I have this working locally with devstack but don't understand why it's not working in Stage.

This PR adds some logging so I can do some debugging in Stage and try and pinpoint if/where the issue is occurring.
2023-02-02 12:51:47 -05:00
Justin Hynes
2d347eaa4d revert: temp: add some logging around extended profile update functionality
This reverts commit c52ba9d26a after the `final_checks_before_prod` stage of our deployment pipeline failed.
2023-02-02 09:05:57 -05:00
Justin Hynes
cf4edc4da6 Merge pull request #31690 from openedx/jhynes/aper-2247_logging
temp: add some logging around extended profile update functionality
2023-02-02 07:40:23 -05:00
Ned Batchelder
12765a7a59 refactor(test): use @skip_unless_lms uniformly 2023-02-01 13:52:26 -08:00
Justin Hynes
c52ba9d26a temp: add some logging around extended profile update functionality
I am trying to persist/save data through an "extended profile field" in Stage but the data isn't saving. I have this working locally with devstack but don't understand why it's not working in Stage.

This PR adds some logging so I can do some debugging in Stage and try and pinpoint if/where the issue is occurring.
2023-02-01 12:57:33 -05:00
0x29a
e96155807a refactor: rename module (or item) -> block within common 2023-01-30 18:15:23 +01:00