feat: add custom html templates for components - #30108
Conversation
|
Thanks for the pull request, @keithgg! 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. |
bb54ee8 to
afe9048
Compare
|
@keithgg Thank you for your contribution. Please let me know once it is ready for our review. |
|
@natabene this is ready for review. |
|
👍
|
9c63e21 to
d62de86
Compare
d62de86 to
59e68bd
Compare
59e68bd to
dcadd21
Compare
There was a problem hiding this comment.
@keithgg It's working perfectly for me. I left a few comments on the code, but mostly as suggestions to start a discussion.
Also, this needs a bit more documentation somewhere (maybe in the class description? and simple tips like file needs to be yaml, not yml, file structure needs to match the block type, etc).
cbb4e60 to
b54c79e
Compare
|
@giovannicimolin @pkulkark I've made the requested changes. Please take a look. |
pkulkark
left a comment
There was a problem hiding this comment.
@keithgg Just the one nit about using dictionary object over list. Otherwise LGTM 👍
👍
- I tested this: Verified this works as expected (on a different sandbox)
- I read through the code
-
I checked for accessibility issuesN/A -
Includes documentationN/A
|
@giovannicimolin It looks like I can't merge this unless you add your approval too. Unless I don't have the right access to merge (I should have since I'm a core committer)? CC @natabene |
|
@pkulkark Approved based on your review. |
This setting allows loading of Resource Templates from outside the edx-platform codebase. Operators will be able to add their own custom resource templates without needing to fork the codebase.
b54c79e to
ed81774
Compare
|
@keithgg 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
|
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production. |
|
EdX Release Notice: This PR has been deployed to the production environment. |
1 similar comment
|
EdX Release Notice: This PR has been deployed to the production environment. |
Description
At Opencraft, we have clients that want to be able to add custom HTML templates that show up while creating course components in Studio.
Currently, there's no way to achieve this besides forking
edx-platformand adding theyamlfiles tocommon/lib/xmodule/xmodule/templates/This PR allows operators to set a custom directory where templates can be additionally loaded from.
settings.CUSTOM_RESOURCE_TEMPLATES_DIRECTORYexists.yamlfiles with the same logic as in thexmodule/templatesdirectory.Supporting information
Testing instructions
settings.CUSTOM_RESOURCE_TEMPLATES_DIRECTORYto a valid path.htmldirectory.common/lib/xmodule/xmodule/templates/htmlto the above directory with a different filename.Deadline
"None"
Other
Settings