Skip to content
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

Fixes for courseware anonymous access. #18344

Merged

Conversation

symbolist
Copy link
Contributor

@symbolist symbolist commented Jun 8, 2018

https://github.com/edx/edx-platform/pull/16315 added the ability to allow anonymous access to courseware. This PR makes small adjustments to the functionality:

  • The section tabs are no longer disabled. It was already possible to switch tabs with the arrows so no point in disabling them.
  • The front-end no longer tries to save the tab the learner is on or to fetch completion status of the unit when switching between units since those are only applicable to logged in users and cause a "Please login" message to pop up.

Note that currently only HTML blocks work correctly with anonymous access.

JIRA tickets: OSPR-2462

Screenshots: N/A

Merge deadline: None

Sandbox: https://pr18344.sandbox.opencraft.hosting/courses/course-v1:edX+DemoX+Demo_Course/courseware/interactive_demonstrations/

Reviewers

@openedx-webhooks
Copy link

Thanks for the pull request, @symbolist! I've created OSPR-2462 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.

@openedx-webhooks openedx-webhooks added needs triage open-source-contribution PR author is not from Axim or 2U labels Jun 8, 2018
@symbolist symbolist changed the title Fixes for courseware anonymous access. [WIP] Fixes for courseware anonymous access. Jun 8, 2018
@mduboseedx
Copy link
Contributor

@symbolist Thanks for the PR. Feel free to ping me once this is ready. Just so you know, we've had some issues with the quality so it may not pass at moment despite there not be an issue with quality.

Could you also add a Description once this is ready to be reviewed? Thanks!

@openedx-webhooks openedx-webhooks added waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. and removed needs triage labels Jun 8, 2018
@symbolist
Copy link
Contributor Author

@mduboseedx I just added details to the description. Thanks for the note about the quality check! And I'll update you when this is ready to be reviewed.

@e0d
Copy link
Contributor

e0d commented Jun 11, 2018

@mulby @caesar2164 also noticed this in flight PR.

@symbolist symbolist force-pushed the symbolist/navigation-for-anonymous-users branch 2 times, most recently from 8d1265c to ed71b58 Compare June 13, 2018 16:15
@symbolist
Copy link
Contributor Author

@xitij2000 There is quality issue but besides that this is ready for review.

@symbolist symbolist force-pushed the symbolist/navigation-for-anonymous-users branch from ed71b58 to 6801697 Compare June 13, 2018 17:13
@symbolist
Copy link
Contributor Author

jenkins run a11y

@symbolist symbolist force-pushed the symbolist/navigation-for-anonymous-users branch from 2d9c401 to 6801697 Compare June 14, 2018 15:07
Copy link
Contributor

@xitij2000 xitij2000 left a comment

Choose a reason for hiding this comment

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

👍

  • I tested this: tested that navigation works when using the waffle flag
  • I read through the code
  • I checked for accessibility issues
  • Includes documentation

@mduboseedx
Copy link
Contributor

@edx/learner @ormsbee This is related #16315 and #18134 about anonymous access to the courseware. Could this be given a review?

@openedx-webhooks openedx-webhooks added awaiting prioritization and removed waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. labels Jun 14, 2018
@symbolist symbolist changed the title [WIP] Fixes for courseware anonymous access. Fixes for courseware anonymous access. Jun 15, 2018
@symbolist
Copy link
Contributor Author

@mduboseedx Thanks! I have also added a link to a sandbox for testing purposes.

@symbolist
Copy link
Contributor Author

Hi @mduboseedx, is there an estimate for when this can get reviewed?

Also a heads up that OpenCraft is planning to work on some of the ideas discussed in https://github.com/edx/edx-platform/pull/18134 and will be submitting them for upstreaming.

@mduboseedx
Copy link
Contributor

@edx/learner @rock345 Do you know when this might be reviewed?

fyi for @ormsbee

Copy link
Contributor

@ormsbee ormsbee left a comment

Choose a reason for hiding this comment

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

One nitpick about the line length, but otherwise, it looks fine to me. @edx/learner: is my review enough or do you folks feel that you need to look this over as well?

@symbolist, @xitij2000: Thank you for your patience in this.

@@ -1,7 +1,7 @@
<%page expression_filter="h"/>
<%! from django.utils.translation import ugettext as _ %>

<div id="sequence_${element_id}" class="sequence" data-id="${item_id}" data-position="${position}" data-ajax-url="${ajax_url}" data-next-url="${next_url}" data-prev-url="${prev_url}">
<div id="sequence_${element_id}" class="sequence" data-id="${item_id}" data-position="${position}" data-ajax-url="${ajax_url}" data-next-url="${next_url}" data-prev-url="${prev_url}" data-save-position="${'true' if save_position else 'false'}" data-show-completion="${'true' if show_completion else 'false'}">
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: Please put a line break or two in here so we don't have a 300 column line.

@symbolist symbolist force-pushed the symbolist/navigation-for-anonymous-users branch from 6801697 to 36b3316 Compare July 20, 2018 09:31
@edx-status-bot
Copy link

Your PR has finished running tests. There were no failures.

@symbolist
Copy link
Contributor Author

@ormsbee Thanks for the review! I have split the attributes across multiple lines as you suggested.
I have also done a rebase.

@mduboseedx FYI

@pomegranited
Copy link
Contributor

@mduboseedx Could you check with the Learner team to see if @ormsbee 's approval here is enough to merge this? Should be squashed and merged if all is ok.

@staubina
Copy link
Contributor

@ormsbee I believe your review is enough here.

@pomegranited
Copy link
Contributor

Beautiful, thank you @staubina and @ormsbee ! @xitij2000 Could you please merge, since you have access to do so? CC @symbolist

@xitij2000
Copy link
Contributor

@pomegranited I don't have merge access here. I think only @bradenmacdonald does.

@pomegranited
Copy link
Contributor

Ah ok thanks @xitij2000 . @ormsbee maybe, could you merge here if you're happy with this PR? CC @mduboseedx

@mduboseedx mduboseedx merged commit 6bc8b4d into openedx:master Aug 16, 2018
@openedx-webhooks
Copy link

@symbolist 🎉 Your pull request was merged!

Please take a moment to answer a two question survey so we can improve your experience in the future.

@symbolist
Copy link
Contributor Author

Thanks @mduboseedx!

@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production on Friday, August 17, 2018.

@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the production environment.

@micahl98
Copy link

I need to test this anonymous course access but cannot understand how exactly to set the waffle flag... it does appear to be in the latest openedx build, any guidance welcome!

@pomegranited pomegranited deleted the symbolist/navigation-for-anonymous-users branch March 1, 2019 00:39
@pomegranited
Copy link
Contributor

pomegranited commented Mar 1, 2019

Hi @micahl98, thanks for reaching out 😄 There's a DOCS PR to be completed and we're prepping a blog post about this now, but am happy to share more details about how to use this feature here.

Because this is a brand new feature, there's currently a two-step process to enable it for each course. This may change in the future as demand increases and further optimizations are developed.

To use this feature on your course:

  1. Ask your site administrator to use Django Admin to enable the seo.enable_anonymous_courseware_access Waffle Flag for this feature. There are two choices here:

    • Create a normal Waffle flag to enable this flag for all courses, setting the user restrictions as desired (see waffle docs for details):
      waffle flag
    • Create a Waffle flag course override with your course ID to enable this flag for specific courses.
      waffle course override
  2. View your course in Studio, and navigate to the Advanced Settings page. Locate the Course Visibility For Unenrolled Learners setting shown below:
    course visibility
    By default, this is set to "private", which ensures that only enrolled learners can access your course content.
    If you change this to "public_outline", then only your course outline will be visible to everyone.
    If you change this to "public", then all of your course content will be visible to anyone.

  3. If you want your course to be crawled by Google, you should also ensure that your course's About page is visible, and that it is shown in the course catalog. Without these settings, only people with a link to your course outline or specific content blocks will be able to find your course.

    Locate the Advanced Settings > Course Visibility in Catalog setting, and ensure it is set to "both" as shown below:
    catalog visibility

@robrap
Copy link
Contributor

robrap commented Mar 1, 2019

@pomegranited: Would it cause a problem if you were to enable seo.enable_anonymous_courseware_access, but not take the additional steps? The reason I ask is that if it doesn't cause any issues, one could in theory just turn on the waffle flag seo.enable_anonymous_courseware_access, and not override course-by-course. If there is a reason you cannot do this, you may want to mention it in your docs. Thanks.

@ormsbee
Copy link
Contributor

ormsbee commented Mar 1, 2019

@robrap: I believe that's actually because we (edX) asked that it be restricted more tightly so that it could be rolled out on a course-by-course basis. This is a powerful feature that will likely see enthusiastic uptake from course teams, but copyright/visibility issues will likely have to be discussed at a policy level with different institutions, and we didn't want a blanket switch that let individual course teams turn it on without that discussion having happened. (@pomegranited: Please correct me if I'm misremembering.)

That being said, I do think we'll want to have a better experience around this for Juniper. The belt-and-suspenders option was just the lowest risk thing that let us roll out without having to address policies.

FYI @marcotuts ^ I know we're all in Ironwood + conference craziness right now, but we should talk about this after things settle down a bit.

@micahl98
Copy link

micahl98 commented Mar 1, 2019 via email

@robrap
Copy link
Contributor

robrap commented Mar 2, 2019

@ormsbee: Just making sure that it is clear that a CourseWaffleFlag allows someone to set the flag on a per course when the waffle flag itself is unset. Or, the CourseWaffleFlag let's someone turn the flag off per course when the waffle flag itself is set to true. I understand that for edx.org we are only enabling the override per course. I was just pointing out that for an Open edX instance where someone wants this on (or available) to all courses, they could just turn on the waffle flag itself, rather than having to turn the override the flag for each course. They would still need to follow @pomegranited's second step per course, but the first step documented could be done a single time for the waffle flag if so desired.
@pomegranited: Sorry if this was already clear to you, but your instructions didn't seem to show this as an option.

@pomegranited
Copy link
Contributor

Thanks for catching this @robrap and @ormsbee ! I've updated my comment above to include both the site-wide and course-specific options, and will ensure this makes it into the docs and blog post too.

@micahl98 -- does this update meet your needs?

@ormsbee
Copy link
Contributor

ormsbee commented Mar 4, 2019

@robrap: Ah! I did not understand that about CourseWaffleFlags, though it makes perfect sense. Thank you!

@robrap
Copy link
Contributor

robrap commented Mar 4, 2019

@ormsbee @pomegranited: 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged open-source-contribution PR author is not from Axim or 2U
Projects
None yet
Development

Successfully merging this pull request may close these issues.