Problem display name, max attempts in content libraries do not persist in imported courses
Description
When working with content libraries and imported content, problem settings that are set in the content library (specifically display names and max attempts) do not persist in imports.
Here are the steps I ran through, with attached screenshots.
Created content in my "myopenedxlibrary" library.
Changed the problems' display name and max attempts values in my content library.
Added a randomized content block to my course A.
Selected content from my "myopenedxlibrary​" library.
Exported my course A.
Opened my course B.
Imported my course A into my course B.
Checked what display name and max attempts values appear in my course B.
Results:
1. My course B's problem display name values all say "Blank Advanced Problem", even though:
my course A's problem display name values match the changes I made in my content library before pulling in those problems.
the problem types used were not the Blank Advanced Problem component.
2. My course B's max attempts values all have been reset to blank, or unlimited, even though my course A's max attempts values match the specific number I gave in my content library before pulling in those problems.
Steps to Reproduce
1. Create content in your content library Z
2. Change the problems' display name and max attempts values in your content library Z
3. Add a randomized content block to a course A
4. Select content from your content library Z
5. Export course A
6. Import course A into a course B
7. Check what display name and max attempts values appear in course B
Expected: Course B's problem display name and max attempts values should match what is in content library Z, which is what displays in course A.
Actual: Course B's problem display name values say "Blank Advanced Problem" and max attempts values are reset to the default (unlimited).
Current Behavior
Expected Behavior
Reason for Variance
Release Notes
User Impact Summary
Activity
Addressed in https://github.com/edx/edx-platform/pull/13286.
Is it ready to merge ?
Currently, this issue doesn't seem to get resolved on stage.
I've created another follow up PR based on my previous work to fix it:
https://github.com/edx/edx-platform/pull/13286. Its in code review.
Addressed in https://github.com/edx/edx-platform/pull/12813.
I am trying to move the fix into import module rather than split modulestore as I've figured that _update_items_from_fields method is not just being used during import workflow but also on other places like update_item which is being used by other modules often, _duplicate_item (responsible for cloning an existing xblock) etc.
Why do I think like this?
there is no such issue in workflows other than import, so we will be adding just extra processing for the blocks that lies in 'library_content' category which can also result in bugs. This issue is reproducible via import so that's why I am inclined to move the fix to import module (ofcourse with a TODO).
FYI , .