Skip to content

(WIP) Content library code for upstream PR - Internal review - #5

Closed
bradenmacdonald wants to merge 36 commits into
masterfrom
content-library-revisions
Closed

(WIP) Content library code for upstream PR - Internal review#5
bradenmacdonald wants to merge 36 commits into
masterfrom
content-library-revisions

Conversation

@bradenmacdonald

Copy link
Copy Markdown
Member

For internal review before I open the upstream PR.

Things yet to do:

  • Integrate and update tests
  • Rebase against edx-platform master and squash commits
  • Scope.settings overrides
  • Test graded items, make sure grades aren't disappearing
  • Test with child objects!
  • Test performance (can we have 1,000 problems in the library? 10,000?)

Testing instructions:

  1. Check out this branch on a vanilla devstack (not solutions), and do paver install_python_prereqs and paver update_db
  2. As 'edxapp' user, edit ~/cms.env.json and add "ENABLE_CONTENT_LIBRARIES": true to the FEATURES object.
  3. Edit ~/cms.auth.json. Go to MODULESTORE > default > OPTIONS > stores - it should contain two or three entries. Re-order the entries so that the store with "NAME": "split", comes first in the stores list. (This makes split the default modulestore for any new courses.)
  4. Start paver devstack studio and go to localhost:8001 in your browser.
  5. Log in as staff, and create a new library (a new "New library" button should appear at top right of studio home page).
  6. Add some content to the library.
  7. Go to studio home and go into a course or create a new course.
  8. Go to Settings > Advanced Settings and add "library_content" to advanced_modules.
  9. Go to Content > Outline. Create a new section and subsection, then edit it. Click "Advanced" and add a new "library_content" block.
  10. Once the block is added, click "Edit" to edit its settings. Most are explained on the settings editor. For the "Library" setting, you must click "Add", then paste the LibraryLocator of your library. This looks like library-v1:ProblemX+PR0B. (It's in the URL when you go to the library in studio). Hit Save.
  11. Click "Update now with latest components from the library".
  12. Optional: Click "View >" to preview all the blocks found in the library.
  13. Hit "Publish", then start up the LMS and go to localhost:8000. Browse into the course, and you should see that the block is replaced by random blocks from the library. To test the randomization, click the lowest "STAFF DEBUG INFO" link underneath the module, then click "Delete Student State", then refresh the page.

Shows the XBlock children stored in the library - just don't press any buttons
Most edit actions in studio now work and create a versioned history.
Allows modules with 'always_recalculate_grades' to use their children's state when computing their grade via grades.grade()
The new locators help avoid the problematic stripping of branch information.
…ed structures

Before, every library also needed draft-branch and published-branch or studio library view would crash

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Same code on line 655 - might make sense to extract method / function.

@e-kolpakov

Copy link
Copy Markdown

Looks good overall, there are some code style and naming comments though.

@bradenmacdonald

Copy link
Copy Markdown
Member Author

@e-kolpakov Thanks for the review and the helpful comments! I'm probably going to ignore the JavaScript style changes for now, since it's just a question of style and I didn't write that code, as mentioned in an earlier comment.

@e-kolpakov

Copy link
Copy Markdown

@bradenmacdonald 👍

@bradenmacdonald
bradenmacdonald force-pushed the content-library-revisions branch from 4fc4022 to 4e841ef Compare October 29, 2014 03:47
@bradenmacdonald

Copy link
Copy Markdown
Member Author

Upstream WIP PR opened at https://github.com/edx/edx-platform/pull/5779

@bradenmacdonald
bradenmacdonald deleted the content-library-revisions branch November 11, 2014 05:25
e-kolpakov pushed a commit that referenced this pull request Dec 30, 2015
e-kolpakov pushed a commit that referenced this pull request Dec 30, 2015
…dback-update-5

Hash Update #5: Diagnostic-Feedback [Bug Fixes]
samuelallan72 pushed a commit that referenced this pull request Jun 7, 2019
SE-1151 Inlines all the discussion underscore templates
DanielVZ96 pushed a commit that referenced this pull request Jan 31, 2024
Allows installation of local versions of NPM
packages via module.config.js, allowing frontend devs
to test out frontend library changes within devstack.

The mounts follow nearly the same pattern that micro-services
do, which allows devs to develop local versions of
Python packages alongside devstack micro-services.

See included ADR #5 for details and rationale.

TNL-8407
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