Commit Graph

63369 Commits

Author SHA1 Message Date
saleem-latif
18359a8ba3 feat: Upgrade Python dependency edx-enterprise
Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/saleem-latif/ENT-7303`
2023-07-10 11:47:37 +05:00
leangseu-edx
9dac65a35a Revert "fix: mathjax resize on sindow resize (#32606)"
This reverts commit a68fd49103.
2023-07-07 15:20:47 -04:00
Braden MacDonald
e705820d0d refactor: Remove unneeded filter from static asset copy/paste code. (#32660) 2023-07-07 09:47:06 -07:00
Robert Raposa
6d6893ca56 Merge pull request #32638 from openedx/robrap/restore-teams-test
test: fix team tests for multiple courses
2023-07-07 11:08:07 -04:00
Nathan Sprenkle
452433a731 feat: configurable roll-forward of flex grading (#32584)
Add ability to roll-forward ORA flex peer grading feature. Where enabled
for an Organization or course, flex peer grading will be turned on at the
course level for new course runs and course reruns. Where disabled,
a new course or course rerun will preserve existing / default setting
value.
2023-07-07 10:42:58 -04:00
Jansen Kantor
87c2e09bfd fix: public video page missing sass (#32682) 2023-07-07 14:04:09 +00:00
Robert Raposa
0a4bc11d8c test: fix team tests for multiple courses
The original tests looked like helpers,
but we are guessing that they were supposed
to be tests.

Additionally, one test had a small bug as written.
It would be more resilient to actually parse the
JSON, but that work is being left for a later time.
For now, it works, but is not resilient.

The original PR can be found here:
https://github.com/openedx/edx-platform/pull/10804
2023-07-07 09:34:17 -04:00
Mohammad Ahtasham ul Hassan
ee871730c8 feat: add course_status utility (#32545)
* feat: add course_status utility
2023-07-07 12:38:05 +05:00
John Nagro
74e3bb9fd4 fix: correct bug in sapsf country to code mapping (#32675) 2023-07-06 20:28:38 +00:00
Jansen Kantor
7d27a66a60 fix: videoblockpreview to videoblockdisplay (#32673)
#32592 changed some webpack loading, and renamed the video display bundle from VideoBlockPreview to VideoBlockDisplay but the code for the public view did not include the updated name.
2023-07-06 14:55:34 -04:00
Kira Miller
b9105a45d9 feat: upgrade github action to support pinned dependencies (#32619)
* fix: edx-enterprise downgrade

* fix: update script

* feat: upgrade action to support pinned dependecies

* Update .github/workflows/upgrade-one-python-dependency.yml

---------
2023-07-06 12:36:19 -06:00
Kyle McCormick
f4540c30e8 fix: flow ?site_theme down through Studio container preview
In ~Palm and earlier, all built-in XBlock Sass was included into CMS
(and LMS) styles before being compiled. So, if a site theme was meant to
affect built-in XBlock styling, those changes would be manifested
directly in the base CMS CSS that is included into every single Studio
page. When the user provided the `?site_theme` querystring parameter,
which is intended to allow devs & admins to view Studio through a given
theme, CMS would look up the given theme and serve the corresponding
base CMS CSS, which would affect the built-in XBlocks views (as
expected).

After ~Palm, built-in XBlocks styles are handled more similarly to to
pure XBlock styles, in that they are only requested when CMS tries to
render the block. In Studio, blocks are not rendered by the original
request, but by a subsequent AJAX request to the `/container_preview`
enpoint. Thus, passing the `?site_theme` query parameter to the original
request will apply the given theme to Studio's chrome, but the theme
will _not_ apply to built-in XBlock views, whose CSS is now loaded via
async request.

To fix this, we simply pass Studio's querystring parameters (including
`?site_theme`) along to the `/container_view` AJAX request. This will
cause CMS to correctly serve the built-in XBlock CSS from the theme
specified by `?site_theme`, rather than whatever the current theme is.

Part of: https://github.com/openedx/edx-platform/issues/32292
2023-07-06 11:58:06 -04:00
Kyle McCormick
127c5c1ce2 fix: make built-in XBlock Sass theme-aware again
In ~Palm and earlier, all built-in XBlock Sass was included into LMS and CMS
styles before being compiled. The generated CSS was coupled together with
broader LMS/CMS CSS. This means that comprehensive themes have been able to
modify built-in XBlock appearance by setting certain Sass variables. We say that
built-in XBlock Sass was, and is expected to be, "theme-aware".

Shortly after Palm, we decoupled XBlock Sass from LMS and CMS Sass [1]. Each
built-in block's Sass is now compiled into two separate CSS targets, one for
block editing and one for block display. The CSS, now located at
`common/static/css/xmodule`, is injected into the running Webpack context with
the new `XModuleWebpackLoader`. Built-in XBlocks already used
`add_webpack_to_fragment` in order to add JS Webpack bundles to their view
fragments, so when CSS was added to Webpack, it Just Worked.

This unlocked a slieu of simplifications for static asset processing [2];
however, it accidentally made XBlock Sass theme-*unaware*, or perhaps
theme-confused, since the CSS was targeted at `common/static/css/xmodule`
regardless of the theme. The result of this is that **built-in XBlock views will
use CSS based on the Sass variables _last theme to be compiled._** Sass
variables are only used in a handful of places in XBlocks, so the bug is subtle,
but it is there for those running off of master. For example, using edX.org's
theme on master, we can see that there is a default blue underline in the Studio
sequence nav [3]. With this bugfix, it becomes the standard edX.org
greenish-black [4].

This commit makes several changes, firstly to fix the bug, and secondly to leave
ourselves with a more comprehensible asset setup in the `xmodule/` directory.

* We remove the `XModuleWebpackLoader`, thus taking built-in XBlock Sass back
  out of Webpack.

* We compile XBlock Sass not to `common/static/css/xmodule`, but to:

  * `[lms|cms]/static/css` for the default theme, and
  * `<THEME_ROOT>/[lms|cms]/static/css`, for any custom theme.

  This is where the comprehensive theming system expects to find themable
  assets. Unfortunately, this does mean that the Sass is compiled twice, both
  for LMS and CMS. We would have liked to compile it once to somewhere in the
  `common/`, but comprehensive theming does not consider `common/` assets to be
  themable.

* We split `add_webpack_to_fragment` into two more specialized functions:
  * `add_webpack_js_to_fragment` , for adding *just* JS from a Webpack bundle,
    and
  * `add_sass_to_fragment`, for adding static links to CSS compiled themable
    Sass (not Webpack). Both these functions are moved to a new module
    `xmodule/util/builtin_assets.py`, since the original module
    (`xmodule/util/xmodule_django.py`) didn't make a ton of sense.

* In an orthogonal bugfix, we merge Sass `CourseInfoBlock`, `StaticTabBlock`,
  `AboutBlock` into the `HtmlBlock` Sass files. The first three were never used,
  as their styling was handled by `HtmlBlock` (their shared parent class).

* As a refactoring, we change Webpack bundle names and Sass module names to be
  less misleading:
  * student_view, public_view, and author_view: was `<Name>BlockPreview`, is now
    `<Name>BlockDisplay`.
  * studio_view: was `<Name>BlockStudio`, is now `<Name>BlockEditor`.

* As a refactoring, we move the contents of `xmodule/static` into the existing
  `xmodule/assets` directory, and adopt its simper structure. We now have:
  *  `xmodule/assets/*.scss`: Top-level compiled Sass modules. These could be
     collapsed away in a future refactoring.
  * `xmodule/assets/<blocktype>/*`: Resources for each block, including both JS
    modules and Sass includes (underscore-prefixed so that they aren't
    compiled). This structure maps closely with what externally-defined XBlocks
    do.
  * `xmodule/js` still exists, but it will soon be folded into the
    `xmodule/assets`.

* We add a new README [4] to explain the new structure, and also update a
  docstring in `openedx/lib/xblock/utils` which had fallen out of date with
  reality.

* Side note: We avoid the term "XModule" in all of this, because that's
  (thankfully) become a much less useful/accurate way to describe these blocks.
  Instead, we say "built-in XBlocks".

Refs:
1. https://github.com/openedx/edx-platform/pull/32018
2. https://github.com/openedx/edx-platform/issues/32292
3. https://github.com/openedx/edx-platform/assets/3628148/8b44545d-0f71-4357-9385-69d6e1cca86f
4. https://github.com/openedx/edx-platform/assets/3628148/d0b7b309-b8a4-4697-920a-8a520e903e06
5. https://github.com/openedx/edx-platform/tree/master/xmodule/assets#readme

Part of: https://github.com/openedx/edx-platform/issues/32292
2023-07-06 11:58:06 -04:00
Zachary Hancock
ab3d322bc9 feat: update edx-proctoring JS library (#32668) 2023-07-06 10:25:15 -04:00
alangsto
6f00f63da6 feat: add course waffle flag for learner assistant (#32657) 2023-07-06 10:19:58 -04:00
Yagnesh1998
a68a1ed434 feat: Removed JWT_AUTH_REFRESH_COOKIE in depr. (#32664) 2023-07-06 09:14:30 -04:00
Awais Qureshi
516ad77985 Upgrade drf (#32667)
* chore: upgrading drf.

* feat: Upgrade Python dependency djangorestframework (#32563)

Upgrading drf to latest version.

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`

Co-authored-by: awais786 <awais786@users.noreply.github.com>

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: awais786 <awais786@users.noreply.github.com>
2023-07-06 18:02:21 +05:00
Nawfal Ahmed
139d0b2392 feat: sort subscription programs in program dashboard (#32651) 2023-07-06 09:01:40 +00:00
Ahtisham Shahid
b477a20ad2 Added notifications for discussions events (#32432)
* feat: added notifications for discussions app

* feat: added unit tests for handler

* feat: updated openedx-events package

* fix: updated notification creation logic and tests

* refactor: updated openedx-event version and event name

* refactor: moved logic to separate methods
2023-07-06 13:33:20 +05:00
Awais Ansari
67b97705c8 refactor: update non-editable into snake case non_editable (#32654) 2023-07-06 12:17:29 +05:00
Jenkins
5ccdd2126f chore: geoip2: update maxmind geolite country database 2023-07-05 16:59:02 -04:00
Diana Huang
171255860f feat: Unpin SAML for upgrade. (#32443)
https://github.com/openedx/edx-platform/issues/32327
2023-07-05 15:52:41 -04:00
Kristin Aoki
6dfd706bca feat: add page redirect when mfe flag enabled (#32637)
Co-authored-by: Jesper Hodge <19345795+jesperhodge@users.noreply.github.com>
2023-07-05 14:39:00 -04:00
Jesper Hodge
96f1397872 Refactor rename contentstore xblock services (#32581)
This PR addresses the renaming of the contentstore/xblock_services folder to contentstore/xblock_storage_handlers as a follow-up to PR #32282. The renaming is done to prevent naming conflicts with xblock runtime services and to make the purpose of the files more understandable. The file xblock_service.py has been renamed to view_handlers.py to better reflect its functionality.

Justification and Future Refactoring Outlook:
The xblock_storage_handlers folder contains service methods that implement the business logic for view endpoints located in contentstore/views/block.py. It is renamed to xblock_storage_handlers to reflect its responsibility of handling storage-related operations of xblocks, such as creation, retrieval, and deletion.

The view_handlers.py file includes business methods called by the view endpoints. These methods, such as handle_xblock, delete_orphans, etc., interact with the required modulestore methods, handle any errors, and aggregate and serialize data for the response.

The term 'handler' in the context of 'view_handlers.py' represents methods that facilitate business logic for view endpoints. It is critical to note the distinction between these 'handler methods' and the xblock_handler method. The xblock_handler is a view endpoint itself, residing in contentstore/views/block.py, and is well known in this context. Although its name might suggest otherwise, it is not a handler in the sense of the 'handler methods' we've defined in 'view_handlers.py'. To maintain consistency with existing naming conventions, it remains as xblock_handler.
2023-07-05 11:24:24 -04:00
Ben Warzeski
a68fd49103 fix: mathjax resize on sindow resize (#32606)
* fix: mathjax resize on sindow resize

* fix: add resize for mathjax in wiki and cms
2023-07-05 14:49:03 +00:00
Ejaz Ahmad
810bf97431 Merge pull request #32650 from openedx/eahmadjaved/ENT-7266
chore: bumping enterprise package version to 3.68.1
2023-07-05 14:03:01 +05:00
Ejaz Ahmad
29f451a94c Merge pull request #32649 from openedx/jajjibhai008/upgrade-edx-enterprise-5b7afab
feat: Upgrade Python dependency edx-enterprise
2023-07-05 13:23:50 +05:00
jajjibhai008
7ad48a3bca feat: Upgrade Python dependency edx-enterprise
Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`
2023-07-05 08:21:07 +00:00
jajjibhai008
5b7afab0e4 chore: bumping enterprise package version to 3.68.1 2023-07-05 13:17:12 +05:00
Jody Bailey
02084fa372 feat: added endpoint for context needed for recommendations experiment (#32645)
* feat: added endpoint for context needed for recommendations experiment

* chore: Removed unnecessary decorator
2023-07-04 16:38:58 +02:00
Muhammad Adeel Tajamul
ac5b0870db feat: added support for translation in notifications (#32626) 2023-07-04 15:13:14 +05:00
github-actions[bot]
117539de3f feat: Upgrade Python dependency django (#32643)
security patch

Commit generated by workflow `openedx/edx-platform/.github/workflows/upgrade-one-python-dependency.yml@refs/heads/master`

Co-authored-by: awais786 <awais786@users.noreply.github.com>
2023-07-04 12:28:08 +05:00
Muhammad Adeel Tajamul
a71c34a969 feat: added management command to delete expired notifications (#32556) 2023-07-04 11:59:54 +05:00
Robert Raposa
65fc388d71 Revert "test: remove unused helper functions from test_views.py"
This reverts commit ad3b5610f1.

Follow-up commit will convert these helpers to actual
tests so they are run.
2023-07-03 13:36:07 -04:00
Feanil Patel
567704cc3a Merge pull request #32608 from openedx/feanil/small_fix
fix: Don't assume there is a context.
2023-07-03 11:29:16 -04:00
Feanil Patel
286a9cddaf Merge pull request #32559 from raju249/31696-unused-helper-functions
test: remove unused helper functions from test_views.py
2023-07-03 10:36:20 -04:00
Feanil Patel
82ee4cd4c3 Merge pull request #32611 from openedx/feanil/platform-docs
feanil/platform docs
2023-07-03 10:28:12 -04:00
Awais Ansari
e543a68990 feat: add pagination in course enrollment list API (#32546)
* feat: add pagination in course enrollment list API

* refactor: enrollment course list API

* refactor: follow best practice in course enrollment list API
2023-07-03 13:52:15 +05:00
Jenkins
dab865c4ee chore(i18n): update translations 2023-07-02 17:04:33 -04:00
Braden MacDonald
83f54aeebe refactor: Split base.in into kernel.in (required) and bundled.in (optional) (#32552)
Plus remove a few unused and indirect dependencies
2023-06-30 09:51:43 -07:00
kenclary
d6b76c800e Merge pull request #32566 from open-craft/navin/youtube-transcripts-language-codes
feat: configure acceptable language codes for youtube transcripts
2023-06-30 11:10:36 -04:00
John Nagro
6d5dcdf77a fix: improve username generation (#32613) 2023-06-30 09:47:02 -04:00
Piotr Surowiec
5c424b42af Merge pull request #32420 from open-craft/agrendalath/fc-0026-cache_runtime_services_and_wrappers
feat: reuse runtime services and wrappers between XBlocks [FC-0026]
2023-06-30 15:29:52 +02:00
Agrendalath
6a8e695a0e refactor: remove redundant masquerade handling from runtime initialization
This part was added in 3d7246ecc8.
Then, 0dd4978f37 refactored the approach, but
did not remove these lines.
2023-06-30 15:06:43 +02:00
Agrendalath
36cc415fc2 refactor: reuse services and wrappers between XBlocks 2023-06-30 15:06:43 +02:00
Piotr Surowiec
80374ed1ce Merge pull request #32357 from open-craft/agrendalath/fc-0026-field-data
feat: remove field-data binding from the runtime [FC-0026]
2023-06-30 15:06:17 +02:00
Edward Zarecor
462e8bef36 Merge branch 'master' into 31696-unused-helper-functions 2023-06-30 12:57:43 +02:00
Navin Karkera
93006b476d feat: configure acceptable language codes for youtube transcripts 2023-06-30 11:02:58 +05:30
Tim McCormack
437418d367 feat: Switch Dockerfile from npm install to npm ci; some cleanup (#32590)
Otherwise we're not really respecting the package-lock file and won't get
repeatable results.

Also:

- Clean up old error handling for npm<3. Were on npm 8 now. Probably
  can get rid of this.
- Use the shorthand `npm ci` rather than `npm clean-install` just for
  consistency with code elsewhere.
- Update comments in tests to be explicit about use of ci rather than
  install
2023-06-29 21:55:23 +00:00
connorhaugh
57fd22ba58 feat: ignore v2 xblocks in independence contract (#32602)
* feat: ignore v2 xblocks in independance contract

* docs: add documentation as to failure point
2023-06-29 16:08:14 -04:00