18 Commits

Author SHA1 Message Date
Andrii
04febf0761 refactor: change logo_path to logo_url 2025-06-23 19:12:26 +03:00
Andrii
66c03afdb2 refactor: change placeholder variable_name + url and add placeholder image 2025-06-18 19:07:08 +03:00
Andrii
09f0406ec3 feat: add org_image_url to course_discovery index 2025-06-03 17:46:47 +03:00
Pooja Kulkarni
fb5f8474b0 refactor: rename descriptor -> block within remaining openedx
Co-authored-by: Agrendalath <piotr@surowiec.it>
2023-04-26 17:10:54 +02:00
Usama Sadiq
64752ed66c refactor: pyupgrade second iteration (#27459) 2021-05-10 13:56:40 +05:00
stvn
43698fff0a refactor: Move get_course_by_id helper from LMS to core
This helper is used by the LMS, CMS, _and_ `openedx.core`,
so let's move it to `openedx.core` to reduce import complexity.

The following files no longer import from LMS:
- cms/djangoapps/contentstore/management/commands/edit_course_tabs.py
- lms/djangoapps/ccx/migrations/0006_set_display_name_as_override.py
- openedx/core/djangoapps/ccxcon/api.py
- openedx/core/djangoapps/verified_track_content/models.py
- openedx/features/course_experience/plugins.py

Note: The LTI XBlock has a dependency on this import path (!?);
a fix can be found here [1].

- [1] https://github.com/edx/xblock-lti-consumer/pull/154
2021-04-13 23:25:48 -07:00
Usama Sadiq
8de47ef51f refactor: Ran pyupgrade on openedx/core
Ran pyupgrade on openedx/core/{djangolib, lib}
2021-04-08 18:34:24 +05:00
Jawayria
9909b933a7 Applied pylint-amnesty to openedx/core/{djangolib, lib, tests, *.py 2021-02-02 21:13:24 +05:00
Feanil Patel
9cf2f9f298 Run 2to3 -f future . -w
This will remove imports from __future__ that are no longer needed.

https://docs.python.org/3.5/library/2to3.html#2to3fixer-future
2019-12-30 10:35:30 -05:00
Andrés González
26b3a40133 INCR-108 (#20058)
* INCR-108: Run python-modernize on openedx/core/lib

* Fixed urlencode import

* Fixed diff quality warnings and six.string_types error

* Fixed pickle import

* Fixed iteritems import

* Fixed ungrouped imports

* Fixed six.moves import issues
2019-04-02 10:26:00 -04:00
John Eskew
27edca3c5e Replace all clean_course_id form methods with common method. 2018-01-25 11:38:46 -05:00
Jeremy Bowman
d3d6272d8f PLAT-1873 to_deprecated_string() cleanup part 1 2018-01-08 13:51:42 -05:00
Robert Raposa
eaab2cf444 Add course overrides of waffle flags. 2017-06-01 15:12:50 -04:00
Ned Batchelder
8b1978ba6c Fix unused-import errors 2016-08-03 12:44:41 -04:00
Ibrahim
f7f281b65b WL-398 Add Course Background Image and Video Thumbnail Image Fields to Studio 2016-04-30 15:25:17 -04:00
John Eskew
8a9845c26e Remove ModuleStoreEnum.Type.xml 2016-04-12 11:53:51 -04:00
David Ormsbee
88c7d58313 Modify CourseOverviews to create course image thumbnails.
Course teams occasionally upload very large files as their course
image. Before this commit, those images would be used directly in
the student's dashboard, sometimes leading to MBs worth of image
data on that page. With this commit, we now auto-generate small
and large thumbnails of configurable size. The Student Dashboard
and Course About pages will make use of this new functionality
(CourseOverview.image_urls), but the behavior of
CourseOverview.course_image_url will not change.

Note that the thumbnails are still created in the contentstore,
and sit alongside their originals.

What's included:

1. Multiple sizes, currently starting with "raw", "small", and
   "large". This falls back to the current behavior automatically in
   the case where thumbnails don't exist or this feature has been
   disabled in configuration.

2. Django admin based configuration for image sizes and whether
   to enable the functionality at all. Note that to regenerate
   images, you'd need to wipe the CourseOverviewImageSet model
   rows -- it doesn't do that automatically. This is partly because
   it's a very rare operation, and partly because I'm not entirely
   sure what the longer term invalidation strategy should be in a
   world where we might potentially have multiple themes. The
   flexible configuration was intended to allow better customization
   and theming.

3. The Course About pages also use the new thumbnail functionality,
   as an example of "large". This is in addition to the "small"
   used on the student dashboard.

Things I'm punting on for now (followup PRs welcome!):

1. Bringing the thumbnails to course discovery. A quick attempt
   to do so showed that it wasn't getting properly invalidated
   and updated when publishes happen (so the old image still showed
   up). It probably has something to do with when we do the
   re-indexing because it stores this data in elasticsearch, but
   I'm not going to chase it down right now.

2. Center-cropping. While this is a nice-to-have feature, the
   behavior in this PR is no worse than what already exists in
   master in terms of image distortion (letting the browser handle
   it).

3. Automated invalidation of the images when a new config is
   created.
2015-12-18 20:03:09 -05:00
Nimisha Asthagiri
d170c92f3b Refactor course_image_url 2015-12-04 11:25:40 -05:00