Skip to content

Keith/bb 5885 esme - #30170

Closed
keithgg wants to merge 103 commits into
openedx:masterfrom
open-craft:keith/bb_5885_esme
Closed

Keith/bb 5885 esme#30170
keithgg wants to merge 103 commits into
openedx:masterfrom
open-craft:keith/bb_5885_esme

Conversation

@keithgg

@keithgg keithgg commented Apr 4, 2022

Copy link
Copy Markdown
Contributor

This PR contains cherry-pick changes from https://github.com/openedx/edx-platform/pull/30108/files. Duplicating the description below.

Description

At Opencraft, we have clients that want to be able to add custom HTML templates that show up while creating course components in Studio.

Currently, there's no way to achieve this besides forking edx-platform and adding the yaml files to common/lib/xmodule/xmodule/templates/

This PR allows operators to set a custom directory where templates can be additionally loaded from.

  • Checks if settings.CUSTOM_RESOURCE_TEMPLATES_DIRECTORY exists.
  • If so, load the yaml files with the same logic as in the xmodule/templates directory.

Supporting information

Testing instructions

  • Update the setting settings.CUSTOM_RESOURCE_TEMPLATES_DIRECTORY to a valid path.
  • In that directory create an html directory.
  • Copy a template from common/lib/xmodule/xmodule/templates/html to the above directory with a different filename.
  • In the Studio, edit a Unit. Under the Text component you should see your new template list (on the Sandbox I've added many).

Deadline

4 April 2022

Adolfo R. Brandes and others added 30 commits April 9, 2021 14:02
The 500 page included ugly ")}" characters.

(cherry picked from commit e58ad6c)
(cherry picked from commit a0fdc97)
It was checking for global staff, but really only needed to check
for course staff. This corrects the check
This was to support an experiment in using coverage test contexts to
record what tests ran each line of code (informally known as
who-tests-what, or wtw).   It never became operational.

(cherry picked from commit 4437305)
…aa-741

feat: AA-741: Enables the dates tab for all enrolled learners
…aa-646-lilac

fix: AA-646: Fix is_staff_user check to check for course staff
…led (openedx#27467)

Since the ENABLE_COURSEWARE_MICROFRONTEND Django setting
was removed, the "View in New Experience" button began
to always appear in Legacy courseware for global staff
members in *all* environments.

This was OK for edx.org's purposes, since the Learning MFE
is deployed in all of our production environments.
However, many (perhaps most) Lilac Open edX instances will
*not* deploy the Learning MFE. So, we need to make sure that
this button is not shown by default.

Since we cannot programmatically tell from LMS whether
or not the Learning MFE is deployed, we will depend on
the value of the `courseware.microfrontend_course_team_preview`
flag, which is already being used to decide whether
course staff can see the "View in New Experience" button.

Whether or not the button is shown, global staff will
still be permitted to browse courses in the Learning
MFE if it is deployed.

openedx/wg-build-test-release#49
Backported from master
This commit refactors the way the Account MFE is activated in the
platform. The main objective is to control the global
activation/deactivation of the MFE through the
account.redirect_to_microfrontend waffle flag and use the Site
Configurations to control MFE activation/deactivation with per-site
granularity. Notice that the Site Configuration object will have
precedence over the waffle flag value.

Since the classic Account Django view will be most likely supported
during Lilac, the expiration of this temporary waffle flag was
extended till the end of 2021

With this commit:

- There's no need to create a Site Configuration object to get the MFE
activated. Setting the waffle flag to True is enough.
- It helps multisite installations to better handling granular
per-site activation/deactivation.

BREAKING CHANGE:

For operators of multisite installations, the activation of the waffle
flag will now activate the MFE for all sites, unless explicitly
disabled on a per-site basis.

Otherwise, this is a backwards-compatible change, since the MFE will
remain activated for installations where this is already enabled.
…27359)

* fix: address VisibleBlocks caching race condition

* sets visual block creation in an atomic transaction

* refactor: add logging statement to bulk create

Co-authored-by: Raul Gallegos <raul@opencraft.com>
(cherry picked from commit 6ccdaca)
…_globally_backport

refactor!: Using Waffle flag to enable Account MFE globally.
The get_course_members API returns a dict of users associated with a course.
This is a potentially expensive operation on a large course, so there is a
control in place to limit its cost.  If a course has more than
settings.COURSE_MEMBER_API_ENROLLMENT_LIMIT enrollments, then the function
raises an OverEnrollmentLimitException.

This API was added to help implement the LTI 1.3 Names and Roles Provisioning
service.

Jira references: [BD-24] [BB-2726] [TNL-7330]
Pull request: openedx#25843
Co-authored-by: Giovanni Cimolin da Silva <giovannicimolin@gmail.com>

(cherry picked from commit 2a8a58a)
In order to upgrade to Django > 2.2.20, we can't continue to use
absolute paths in the block_structure's data FileField. This used to
work for S3, but it will not work going forward due to a security fix
in Django 2.2.21.

This data migration will remove the starting '/' from any paths in the
block_structure table. The resulting locations in S3 should be
unaffected.
…openedx#27130) (openedx#27834)

* fix: Hide enterprise/login button if enterprise integration disabled.

[BTR-52](https://openedx.atlassian.net/browse/BTR-52)
Fix an issue with existing button for enterprise login on the login page
when enterprise integration is disabled.

Co-authored-by: Igor Degtiarov <igor.degtiarov@raccoongang.com>
(cherry picked from commit e17b2ab)
When getting a subsection grade for a user, instead of failing
if the user can't access that subsection,
fallback to the collected structure.
fix!: Make default queue names service variant specific.

(cherry picked from commit 4b29872)
Signed-off-by: Farhaan Bukhsh <farhaan@opencraft.com>
…ession

for Chrome version 92. This token is added to the courseware iFrame, which
enables the iFrame to retain the ability to summon modals & alerts - or open
new windows via JS. This token has a limited lifespan - it currently expires around
Dec 14, 2021. The common token can be overridden using ENV_TOKENS.

TNL-8559
arjunsinghy96 and others added 21 commits November 22, 2021 12:46
The action buttons in wiki modal have href attribute
but does not have an event listener for click.
This PR changes the buttons to anchor tags so that they
work as expected when clicked.
Rebase to lilac remove usage of _is_storage_backing_enabled
Fix imports etc
* Fix PREVENT_STAFF_STRUCTURE_DELETION flag for ajax requests

* Add testcase for CourseCreatorRole
(cherry picked from commit b01544d)
…ease

BB-4877: Handle code drift for opencraft-release/lilac.2 branch
…d_timezone

[BB-5271] feat: Change studio schedule datetime inputs to user timezone
[SE-5163] Apply security patches for xss and email search from logout page
* feat: Implement couse progress bar

(cherry picked from commit 6af2de1)
Signed-off-by: Gabor Boros <gabor.brs@gmail.com>
ADD html snippets from overview unit

From here: https://studio.esme-staging.opencraft.hosting/course/course-v1:esme+CT+2021?show=block-v1%3Aesme%2BCT%2B2021%2Btype%40chapter%2Bblock%400d4aefe059784786bd1f8eb850a633b2

The snippets from the overview Unit were added.

ADD snippets from all other subsections

Added snippets from Typical Section and Quiz
CSS lines were removed from all files, as per requested.

CORRECT typo which made template invalid

(cherry picked from commit 09adc9f)
The customer required replacing the default list,
which requires deleting these snippet files.

(cherry picked from commit 86e3c3d)
This defines optional extra fields that are not hidden under the toggle on the
registration page.

(cherry picked from commit 230795f)

Signed-off-by: Gabor Boros <gabor.brs@gmail.com>
(cherry picked from commit 5ab0418)
Signed-off-by: Gabor Boros <gabor.brs@gmail.com>
This setting allows loading of Resource Templates from outside the
edx-platform codebase.

Operators will be able to add their own custom templates without needing
to fork the codebase.

(cherry picked from commit d62de8675db67490e7160d9c21b1a7505a1ea1af)
@openedx-webhooks openedx-webhooks added needs triage open-source-contribution PR author is not from Axim or 2U labels Apr 4, 2022
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @keithgg! I've created OSPR-6558 to keep track of it in JIRA, where we prioritize reviews. Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@keithgg

keithgg commented Apr 4, 2022

Copy link
Copy Markdown
Contributor Author

Opened against the wrong branch. Closing.

@keithgg keithgg closed this Apr 4, 2022
@openedx-webhooks

Copy link
Copy Markdown

@keithgg Even though your pull request wasn’t merged, please take a moment to answer a two question survey so we can improve your experience in the future.

@Agrendalath
Agrendalath deleted the keith/bb_5885_esme branch May 10, 2022 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open-source-contribution PR author is not from Axim or 2U rejected

Projects

None yet

Development

Successfully merging this pull request may close these issues.