Skip to content

Show location in the settings xblock. - #11999

Merged
andy-armstrong merged 2 commits into
openedx:masterfrom
raccoongang:kssl/show_location_id_xblock
Sep 16, 2016
Merged

Show location in the settings xblock.#11999
andy-armstrong merged 2 commits into
openedx:masterfrom
raccoongang:kssl/show_location_id_xblock

Conversation

@oksana-slu

Copy link
Copy Markdown
Contributor

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

img 1

img 2

@openedx-webhooks

Copy link
Copy Markdown

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:

  • supporting documentation
  • edx-code email threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

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.

@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U needs triage product review PR requires product review before merging and removed needs triage labels Mar 31, 2016
@nedbat

nedbat commented Mar 31, 2016

Copy link
Copy Markdown
Contributor

@oksana-slu I don't understand what this means. Maybe @scottrish has some context.

@oksana-slu

Copy link
Copy Markdown
Contributor Author

@nedbat @scottrish
We have developed conditional mode which is enabled within Studio functionality. For using new conditional mode user needs to add location in source list (conditional setting, see picture ).
img 4
At the moment it is quite difficult to get this data in Open edX. So we add to advanced settings new field "Display block location". If user sets "true", every xblock will contain location (read only). This data can be added in settings of conditional mode.

@marcotuts

Copy link
Copy Markdown
Contributor

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.

@jbarciauskas

Copy link
Copy Markdown
Contributor

@oksana-slu any thoughts based on @marcotuts 's feedback?

@openedx-webhooks openedx-webhooks added waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. and removed product review PR requires product review before merging labels May 11, 2016
@marcotuts

marcotuts commented May 11, 2016

Copy link
Copy Markdown
Contributor

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:
1.) Could this be rendered at the bottom of the settings list, and given that this is metadata / details and not a setting, could this be rendered as text instead of as an input field that is disabled?

Thanks!

@nedbat

nedbat commented Jun 9, 2016

Copy link
Copy Markdown
Contributor

@oksana-slu are you still interested in pursuing this?

@oksana-slu

Copy link
Copy Markdown
Contributor Author

@nedbat
Hello!
Sorry for delaying.(I miss your comment). We are still interested in this PR.
It could be rendered as a button, but we need time to change the business logic of location feature.
If we return to this in month, will it be ok?
Does this PR influence on https://github.com/edx/edx-platform/pull/11710?
thank you

@oksana-slu

Copy link
Copy Markdown
Contributor Author

@marcotuts @nedbat
Could I ask a question.
I adapted source code according the requirements.
But taking into account your comments, my previous commit is not of current interest. Should I make new PR or just change the source code in current PR.
Thanks

@jbarciauskas

Copy link
Copy Markdown
Contributor

@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

@nedbat

nedbat commented Jun 23, 2016

Copy link
Copy Markdown
Contributor

@oksana-slu Feel free to ping people here in a comment when you are ready for more review.

@oksana-slu

Copy link
Copy Markdown
Contributor Author

@nedbat
I have updated PR with your comments, review it please.

@cahrens

cahrens commented Jun 28, 2016

Copy link
Copy Markdown

Note that tests are not running on this PR, @nedbat

@benpatterson

Copy link
Copy Markdown
Contributor

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>

Copy link
Copy Markdown

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.

@jbarciauskas

Copy link
Copy Markdown
Contributor

Jenkins ok to test

@jbarciauskas

Copy link
Copy Markdown
Contributor

Jenkins add to whitelist

@oksana-slu

Copy link
Copy Markdown
Contributor Author

@cahrens
I fixed everything what you asked.
Thanks

@jbarciauskas

Copy link
Copy Markdown
Contributor

jenkins run all

@nedbat

nedbat commented Jun 29, 2016

Copy link
Copy Markdown
Contributor

Jenkins ok to test

@jbarciauskas

Copy link
Copy Markdown
Contributor

jenkins run all

@jbarciauskas

Copy link
Copy Markdown
Contributor

@oksana-slu looks like there's a build error - can you look into it?

@cahrens

cahrens commented Jun 29, 2016

Copy link
Copy Markdown

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.

@andy-armstrong

Copy link
Copy Markdown
Contributor

jenkins run all

@andy-armstrong

Copy link
Copy Markdown
Contributor

@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!

@openedx-webhooks openedx-webhooks added waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. and removed engineering review labels Aug 31, 2016
@oksana-slu
oksana-slu force-pushed the kssl/show_location_id_xblock branch from 0c02e12 to 943757a Compare September 4, 2016 12:53
@oksana-slu

Copy link
Copy Markdown
Contributor Author

@andy-armstrong
I fixed the rebase issue.
We updated the sandbox with location_id
LMS: https://edx-show-location-id.raccoongang.com
Studio: https://studio-show-location-id.raccoongang.com

One test is failed, I will fix it asap
Thanks

@andy-armstrong

Copy link
Copy Markdown
Contributor

jenkins run bokchoy

@andy-armstrong

Copy link
Copy Markdown
Contributor

@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.

@catong

catong commented Sep 6, 2016

Copy link
Copy Markdown
Contributor

@andy-armstrong Did "id" in the string get changed to "ID"? 👍 from me if that is done.

@catong

catong commented Sep 6, 2016

Copy link
Copy Markdown
Contributor

Ah, confirmed that it has been updated. Thanks!

@openedx-webhooks openedx-webhooks added engineering review and removed waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. labels Sep 6, 2016
@marcotuts

Copy link
Copy Markdown
Contributor

Thanks for the updated FYI @andy-armstrong.

👍 from me!

@openedx-webhooks openedx-webhooks added waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. and removed engineering review labels Sep 7, 2016
@andy-armstrong

Copy link
Copy Markdown
Contributor

@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!

@oksana-slu

Copy link
Copy Markdown
Contributor Author

@andy-armstrong
This test "test_create_book_message" was ok locally.
http://prntscr.com/che9zo

Could you please explain what should I do in such situation?
thanks

@andy-armstrong

Copy link
Copy Markdown
Contributor

@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:

https://build.testeng.edx.org/job/edx-platform-bok-choy-pr/25747/artifact/test_root/log/shard_2/common.test.acceptance.tests.studio.test_studio_textbooks.TextbooksTest.test_create_first_book_message.png

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.

@andy-armstrong

Copy link
Copy Markdown
Contributor

jenkins run bokchoy

@catong

catong commented Sep 13, 2016

Copy link
Copy Markdown
Contributor

@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.
Can you please change "Location ID" to "Component Location ID"?
Thanks, please let us know if you have any questions. FYI @andy-armstrong

@shaunagm

Copy link
Copy Markdown
Contributor

@andy-armstrong @catong @oksana-slu The tests are passing and the ID name change has been made. Is this ready to be merged?

@catong

catong commented Sep 15, 2016

Copy link
Copy Markdown
Contributor

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open-source-contribution PR author is not from Axim or 2U waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants