Skip to content

[SE-3381] [JUNIPER BACKPORT] Allows adding new tinymce plugins through platform configuration - #307

Merged
nizarmah merged 22 commits into
opencraft-release/juniper.3from
nizar/tinymce-easy-plugin-modification-juniper-backport
Jan 6, 2021
Merged

[SE-3381] [JUNIPER BACKPORT] Allows adding new tinymce plugins through platform configuration#307
nizarmah merged 22 commits into
opencraft-release/juniper.3from
nizar/tinymce-easy-plugin-modification-juniper-backport

Conversation

@nizarmah

@nizarmah nizarmah commented Jan 6, 2021

Copy link
Copy Markdown

THIS BACKPORT IS NOT NEEDED FOR KOA

This re-applies the reverted changes from #306


This makes it possible to install new tinymce plugins through the environment settings.

This PR is responsible for adding the tinymce plugin settings to the tinymce javascript configuration.

JIRA tickets: SE-3381, SE-3247

Dependencies:

Upstream Pull Request:

Sandbox: Upskill STG

Testing instructions:

Testing Changes
  1. Login to Studio using staff@example.com/edx
  2. Create a new Unit with an HTML Text
  3. Make sure that the ADSK Link shows in the toolbar
  4. Create a link and make sure you can preview it, and see it on the LMS
Testing Multiple App Servers
  1. SSH into each app server and verify the output of ls /edx/var/edxapp/staticfiles/studio/bundles/ | grep -i commons is the same.

Reviewers

  • TBD

Settings

EDXAPP_CMS_ENV_EXTRA:
  JS_ENV_EXTRA_CONFIG:
    TINYMCE_ADDITIONAL_PLUGINS:
    - name: adsklink
      toolbar: true
      extra_settings:
        linktypes:
        - download
        - offer
        filetypes:
        - PDF
        - zip
        - Video
        - Design
        orientations:
        - Vertical
        - Horizontal
        styles:
        - Primary
        - Normal
        - Secondary

TINYMCE_ADDITIONAL_PLUGINS_LIST:
- repo: https://gitlab.com/nizarmah/tinymce-adsk-plugin
  name: adsklink
  plugin_path: "/adsklink"

edx_ansible_source_repo: "https://github.com/open-craft/configuration.git"
configuration_version: "nizar/tinymce_plugins_role_backport"
edx_platform_commit: "nizar/tinymce-easy-plugin-modification-backport"

pkulkark and others added 21 commits November 25, 2020 22:30
This adds a way for tinymce plugins to use
custom environment variables.
The reason behind the added null check is because when testing, devstack settings might be null
…dx-platform into nizar/tinymce-easy-plugin-modification-backport
…and because sometimes we want to specify an order

(cherry picked from commit 28c2082)
(cherry picked from commit 441fcad5fc0fed7d3442aa2654c0858648a95d35)
(cherry picked from commit dabac7a12580dec92f3a2c1e37b8b551d8d0b9f9)
(cherry picked from commit 6fa07ec6c7863885a1f9f80ab3370001e37698f3)
(cherry picked from commit a8fa550a57f3168400bed3345dcc470fb481d789)
Reason behind this is the follow eslint error that was showing up during the build: Error - Unexpected trailing comma. (comma-dangle)

(cherry picked from commit 78a6cf1f72a9bab7842ef52d68536920af974815)
(cherry picked from commit 7a53899a723e41b486c92287509efa0a42181e9e)
(cherry picked from commit e882cd41a7c5a25f94bfe15d42fc478ed37469cd)
@nizarmah
nizarmah force-pushed the nizar/tinymce-easy-plugin-modification-juniper-backport branch from 98170ec to 11e35da Compare January 6, 2021 09:07
@nizarmah
nizarmah force-pushed the nizar/tinymce-easy-plugin-modification-juniper-backport branch from 11e35da to 6897568 Compare January 6, 2021 10:14
@nizarmah
nizarmah requested a review from pkulkark January 6, 2021 11:26

@pkulkark pkulkark left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nizarmah LGTM 👍

  • I tested this: verified the tinymce plugin is installed correctly and the file hashes are consistent across multiple servers.
  • I read through the code
  • I checked for accessibility N/A
  • Includes documentation N/A

@nizarmah
nizarmah merged commit 327de01 into opencraft-release/juniper.3 Jan 6, 2021
@nizarmah
nizarmah deleted the nizar/tinymce-easy-plugin-modification-juniper-backport branch January 6, 2021 12:13
tecoholic pushed a commit that referenced this pull request Dec 1, 2022
…Service and Result Service

This commit upgrades the version of the lti-consumer-xblock library from version 6.4.0 to version 7.0.2. This includes versions 7.0.0, 7.0.1, and 7.0.2.

Version 7.0.0 includes refactoring to remove deprecated method calls to rebind_noauth_module_to_user, get_real_user, runtime.hostname, and runtime.course_id.

Version 7.0.1 includes a fix to the clean method of the LtiConfiguration model. The fix changes the way we look up the course ID so that we can access the course ID without needing to load the XBlock.

Version 7.0.2 includes fixes to LTI 1.1 Basic Outcomes Services and LTI 2.0 Result Service when using an external_user_id as a user identifier.

Note that version 7.0.1 was originally deployed in openedx#31369. It was reverted soon after in openedx#31377. The issue occurred in version 7.0.0, in the following line https://github.com/openedx/xblock-lti-consumer/pull/249/files#diff-ab027143adc95b9776c12e973e28f025a21b0d88112937af93645829686527fdL186. self in the call to the service is an instance of the OutcomeService. self should be an instance of an XBlock (i.e. LtiConsumerXBlock). Version 7.0.2 fixes this bug by moving the call to the service to the LtiConsumerXBlock, where self is an instance of an XBlock. Therefore, we are deploying this version to fix forward.

Please see the CHANGELOG entries below for these versions for a full description of the changes.

Version 7.0.0: https://github.com/openedx/xblock-lti-consumer/blob/master/CHANGELOG.rst#700---2022-11-29
Version 7.0.1: https://github.com/openedx/xblock-lti-consumer/blob/master/CHANGELOG.rst#701---2022-11-29
Version 7.0.2: https://github.com/openedx/xblock-lti-consumer/blob/master/CHANGELOG.rst#702---2022-11-29.

The commit messages of each version are included below for convenience.

7.0.0
-----
refactor: replace block.location with block.scope_ids.usage_id

7.0.1
-----
fix: do not attempt to load the block just to look at the location
the block is not loadable in exams so clean fails in that IDA, but
we shouldn't need the block to ask a question about the course

7.0.2
-----
In #307, we added the ability to send a stable, static user identifier (i.e. external user ID) to fix failed launches with the QwikLabs tool. This is because the QwikLabs tool did not work with the course-anonymized user IDs we used to send (i.e. anonymous user IDs). Inadvertently, this change broke the LTI 1.1 Basic Outcomes Service and the LTI 2.0 Result Service for courses that use the external user ID (i.e. they have the lti_consumer.enable_external_user_id_1p1_launches CourseWaffleFlag enabled). The Basic Outcomes Service and Result Service handle grade pass backs. Because we now have two ways to identify a user in LTI 1.1/2.0, we must update the Basic Outcomes Service and Result Service to support both. This commit fixes this bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants