Skip to content

Content library and import updates #423

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

Merged
merged 6 commits into from
May 6, 2025
Merged

Content library and import updates #423

merged 6 commits into from
May 6, 2025

Conversation

Dantemss
Copy link
Member

@Dantemss Dantemss commented May 1, 2025

https://openstax.atlassian.net/browse/CORE-808

  • Support updating existing exercises by nickname
  • Strip tags from img src attributes
  • Update content-ruby to support new ABL

@Dantemss Dantemss self-assigned this May 1, 2025
@Dantemss Dantemss force-pushed the more-content-fixes branch from a43c50e to 2276c02 Compare May 2, 2025 17:57
@Dantemss Dantemss marked this pull request as ready for review May 5, 2025 15:13
@Dantemss Dantemss requested a review from jivey May 5, 2025 15:13
@Dantemss
Copy link
Member Author

Dantemss commented May 5, 2025

This PR will allow me to more easily get the book-slug and module-slug tags working for Algebra 1

hash.each { |uuid, slugs| slugs.uniq! }
end
end
) { OpenStax::Content::Abl.new.slugs_by_page_uuid }
Copy link
Member

Choose a reason for hiding this comment

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

So this functionality moved inside the gem?

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah pretty much

header == 'uuid' || header == 'page uuid' || header == 'section uuid'
uuid_index ||= headers.index { |header| header&.end_with?('uuid') && !header.include?('book') }
section_index ||= headers.index do |header|
header&.start_with?('section') && !header.include?('uuid') && !header.include?('name')
Copy link
Member

Choose a reason for hiding this comment

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

Does algebra have slightly different headers? Maybe it's not a worry if we are sure about the imported format, but I just want to double check that loosening the matching is not going to be a concern.

Copy link
Member Author

Choose a reason for hiding this comment

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

it was a mess of different headers, let me say that

Copy link
Member

@jivey jivey left a comment

Choose a reason for hiding this comment

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

I can't really tell the impact of the header change but if it's looking good from your testing then maybe it's fine.

@Dantemss Dantemss merged commit 69cffe4 into main May 6, 2025
4 of 5 checks passed
@Dantemss Dantemss deleted the more-content-fixes branch May 6, 2025 23:37
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