Problem display name, max attempts in content libraries do not persist in imported courses
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.
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).
Reason for Variance
User Impact Summary
Is it ready to merge ?
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 , .