-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Show location in the settings xblock. #11999
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
Show location in the settings xblock. #11999
Conversation
|
Thanks for the pull request, @oksana-slu! I've created OSPR-1217 to keep track of it in JIRA. JIRA is a place for product owners to prioritize feature reviews by the engineering development teams. Feel free to add as much of the following information to the ticket:
All technical communication about the code itself will still be done via the GitHub pull request interface. As a reminder, our process documentation is here. If you like, you can add yourself to the AUTHORS file for this repo, though that isn't required. Please see the CONTRIBUTING file for more information. |
|
@oksana-slu I don't understand what this means. Maybe @scottrish has some context. |
|
@nedbat @scottrish |
|
This setting doesn't seem like something authors should need to set. What is the benefit of the conditional logic / flag to exposing the course ID / location? Could this be always included behind the scenes to an xblock? Is there any downside to doing this? I ask because the expectation is that settings in the Settings tab for an XBlock should (whenever possible) be meaningful to course authors and not be configuration logic for xblock details. |
|
@oksana-slu any thoughts based on @marcotuts 's feedback? |
|
edit: sorry I got my PRs confused. I've updated my comment here: I now understand that the location is read only and added here as metadata to be copied in for the conditional block. My feedback summary is this: Thanks! |
|
@oksana-slu are you still interested in pursuing this? |
|
@nedbat |
|
@marcotuts @nedbat |
|
@oksana-slu it's up to you - if the historical context is useful, then we should continue on this PR. If it's more helpful to restart the discussion, then close and create a new one |
|
@oksana-slu Feel free to ping people here in a comment when you are ready for more review. |
|
@nedbat |
|
Note that tests are not running on this PR, @nedbat |
|
Can one of the admins verify this patch? |
| <% }) %> | ||
| <li class="field comp-setting-entry metadata_entry"> | ||
| <div class="wrapper-comp-setting"> | ||
| <label class="label setting-label"><%= gettext("Location id") %></label> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be using <%- instead of <%= (both this line and the next) to ensure the text is escaped.
|
Jenkins ok to test |
|
Jenkins add to whitelist |
|
@cahrens |
|
jenkins run all |
|
Jenkins ok to test |
|
jenkins run all |
|
@oksana-slu looks like there's a build error - can you look into it? |
|
FYI that the safe templating change was just something I noticed while looking over OSPRs-- I'm not actually reviewing this PR. We still need product sign-off on this feature. |
|
jenkins run all |
|
@oksana-slu I'm going to review your PR this week. Can you fix the rebase issue (currently, GitHub sees >250 commits!) and let me know when there is a sandbox available. Thanks! |
0c02e12 to
943757a
Compare
|
@andy-armstrong One test is failed, I will fix it asap |
|
jenkins run bokchoy |
|
@oksana-slu this looks good to me. 👍 @marcotuts the changes appear to have addressed your feedback about the rendering of the ID. If you want to give thumbs, then I'll go ahead and merge this. |
|
@andy-armstrong Did "id" in the string get changed to "ID"? 👍 from me if that is done. |
|
Ah, confirmed that it has been updated. Thanks! |
|
Thanks for the updated FYI @andy-armstrong. 👍 from me! |
|
@oksana-slu will you have time to fix the Bok Choy test failure this week? It would be great to have this PR merged. Thanks! |
|
@andy-armstrong Could you please explain what should I do in such situation? |
|
@oksana-slu That's very frustrating, and I don't have much advice to offer. One useful thing is to find the screenshot that is taken when the test fails. In this case it is here: The test is looking for a message, and the screenshot seems to be showing the correct one, so that doesn't help. Maybe there's a timing problem with the test that isn't introduced by your changes. Given that your changes seem unrelated, I suggest rebasing again and see if maybe that fixes it. If it doesn't, then I suggest introducing a wait into the test so that it waits for the element to be available. |
|
jenkins run bokchoy |
|
@oksana-slu Sorry for this late change. After consulting with @marcotuts we realize we need to change the name of this ID to avoid confusion with the "Location ID" that is visible in the Studio course outline sidebar. |
|
@andy-armstrong @catong @oksana-slu The tests are passing and the ID name change has been made. Is this ready to be merged? |
|
👍 |

Background:
Review of xblock location is enabled. Field "display_block_location" is added to course settings; this is a field visibility of xblock location depends on. This functionality is an important part of Conditional Mode editing
Studio Updates:
The next file is modified: common/lib/xmodule/xmodule/course_module.py, common/lib/xmodule/xmodule/x_module.py.
The new tests are added common/test/acceptance/tests/studio/test_studio_container.py, common/lib/xmodule/xmodule/tests/test_course_module.py.
For new functionality, the next tests are corrected: common/lib/xmodule/xmodule/tests/test_editing_module.py, common/lib/xmodule/xmodule/tests/test_split_test_module.py, common/lib/xmodule/xmodule/tests/test_xml_module.py, common/test/acceptance/pages/studio/settings_advanced.py, lms/djangoapps/courseware/tests/test_video_mongo.py.
LMS Updates: None