-
Notifications
You must be signed in to change notification settings - Fork 4.2k
[FC-0009] New actions menu for copy/pasting units in Studio (behind waffle flag) #32891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FC-0009] New actions menu for copy/pasting units in Studio (behind waffle flag) #32891
Conversation
|
Thanks for the pull request, @bradenmacdonald! 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:
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. |
4f68d57 to
552f815
Compare
633246e to
cbe0bd7
Compare
cbe0bd7 to
c89d8f7
Compare
dab10e6 to
24edc39
Compare
|
Thanks for the pull request, @bradenmacdonald! 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:
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. |
Agrendalath
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bradenmacdonald, some notes for the follow-up tickets:
- Copying the Python library works correctly when we copy a single Problem XBlock. However, if we copy the entire Unit, this zip file is no longer copied to the clipboard.
- Copying the LibraryContentBlock raises an exception. If we are not planning to support it eventually, we should at least handle this use case gracefully while copying the Unit. Otherwise, only the XBlocks placed before the LibraryContentBlock are pasted.
- I'm randomly getting the following exceptions while loading a pasted Unit. This Unit contains SGA XBlocks with static assets (some present in the course files and some non-existent ones) linked in the "Solution" field. It occurs when I reload the page a few times. However, this is probably unrelated, as I'm getting some other Memcached errors since I pulled the most recent changes into my devstack today.
2023-08-14 12:29:47,514 ERROR 2259 [django.request] [user 3] [ip 172.31.0.1] log.py:224 - Internal Server Error: /asset-v1:new+new+new+type@asset+block/absent.jpg
Traceback (most recent call last):
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/utils/deprecation.py", line 116, in __call__
response = self.process_request(request)
File "/edx/app/edxapp/edx-platform/openedx/core/djangoapps/contentserver/middleware.py", line 84, in process_request
content = self.load_asset_from_location(loc)
File "/edx/app/edxapp/edx-platform/openedx/core/djangoapps/contentserver/middleware.py", line 288, in load_asset_from_location
content = get_cached_content(location)
File "/edx/app/edxapp/edx-platform/openedx/core/djangoapps/contentserver/caching.py", line 29, in get_cached_content
return CONTENT_CACHE.get(str(location).encode("utf-8"), version=STATIC_CONTENT_VERSION)
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/core/cache/backends/memcached.py", line 77, in get
return self._cache.get(key, default)
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pymemcache/client/hash.py", line 347, in get
return self._run_cmd("get", key, default, default=default, **kwargs)
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pymemcache/client/hash.py", line 322, in _run_cmd
return self._safely_run_func(client, func, default_val, *args, **kwargs)
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pymemcache/client/hash.py", line 211, in _safely_run_func
result = func(*args, **kwargs)
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pymemcache/client/base.py", line 687, in get
return self._fetch_cmd(b"get", [key], False, key_prefix=self.key_prefix).get(
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pymemcache/client/base.py", line 1165, in _fetch_cmd
raise MemcacheUnknownError(line[:32])
pymemcache.exceptions.MemcacheUnknownError: b'z\xd2v\xc8\x05\x04\xa5\x89o\x82\xa9b\xbb\x95?\x94vA\x16\x94t\xb3}\xa1\xfe\xc7\x99+\xa1\x97\xb1X'2023-08-14 12:29:47,545 ERROR 2259 [django.request] [user 3] [ip 172.31.0.1] log.py:224 - Internal Server Error: /assets/courseware/v1/75c11d787c658add35ad8425c4cd1e3d/asset-v1:new+new+new+type@asset+block/present.webp
Traceback (most recent call last):
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/utils/deprecation.py", line 116, in __call__
response = self.process_request(request)
File "/edx/app/edxapp/edx-platform/openedx/core/djangoapps/contentserver/middleware.py", line 84, in process_request
content = self.load_asset_from_location(loc)
File "/edx/app/edxapp/edx-platform/openedx/core/djangoapps/contentserver/middleware.py", line 288, in load_asset_from_location
content = get_cached_content(location)
File "/edx/app/edxapp/edx-platform/openedx/core/djangoapps/contentserver/caching.py", line 29, in get_cached_content
return CONTENT_CACHE.get(str(location).encode("utf-8"), version=STATIC_CONTENT_VERSION)
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/django/core/cache/backends/memcached.py", line 77, in get
return self._cache.get(key, default)
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pymemcache/client/hash.py", line 347, in get
return self._run_cmd("get", key, default, default=default, **kwargs)
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pymemcache/client/hash.py", line 322, in _run_cmd
return self._safely_run_func(client, func, default_val, *args, **kwargs)
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pymemcache/client/hash.py", line 211, in _safely_run_func
result = func(*args, **kwargs)
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pymemcache/client/base.py", line 687, in get
return self._fetch_cmd(b"get", [key], False, key_prefix=self.key_prefix).get(
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pymemcache/client/base.py", line 1153, in _fetch_cmd
key, value, buf = self._extract_value(
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pymemcache/client/base.py", line 1103, in _extract_value
buf, value = _readvalue(self.sock, buf, int(size))
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pymemcache/client/base.py", line 1689, in _readvalue
buf = _recv(sock, RECV_SIZE)
File "/edx/app/edxapp/venvs/edxapp/lib/python3.8/site-packages/pymemcache/client/base.py", line 1750, in _recv
return sock.recv(size)
OSError: [Errno 9] Bad file descriptor👍
- I tested this: checked that copying and pasting Units works as expected
- I read through the code
- I checked for accessibility issues: n/a
- Includes documentation: n/a
- I made sure any change in configuration variables is reflected in the corresponding client's
configuration-securerepository: n/a
| } | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: if we decide to change the styling of these menus, we will need to make changes in two files. Would it make sense to share these rules between the outline and unit views?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Frankly, I didn't worry about the UI maintainability too much as the whole thing is slated to be replaced by an MFE this Fall/Winter.
Co-authored-by: Piotr Surowiec <piotr@surowiec.it>
|
@bradenmacdonald 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
|
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
|
2U Release Notice: This PR has been deployed to the edX production environment. |
|
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
|
2U Release Notice: This PR has been deployed to the edX production environment. |
Description
This PR implements openedx/modular-learning#19 .
Normally, the Studio outline view looks like this:
When the new Waffle flag
contentstore.enable_copy_paste_unitsis enabled, most of the actions get pushed into the new "Actions menu":This is analogous to the change for components that happened in #31853
As you can see, when the new menu is enabled, there is also a new Copy to Clipboard action that can be used to copy/paste units, either within a course or among different courses.
Supporting information
See ticket linked above.
Testing instructions
contentstore.enable_copy_paste_unitswhich is enabled for Everyone.Deadline
None
Other information
Depends on #32812
Private-ref: MNG-3771