edx-platform icon indicating copy to clipboard operation
edx-platform copied to clipboard

fix: allow only enrolled users in course team roles

Open navinkarkera opened this issue 1 year ago • 20 comments

Description

The course team management section under Instructor > Membership tab allows users to be added a role even if are not enrolled in the course. This behaviour does not match the help text displayed in the section.

This PR updates modify_access api to enrolls user if they are not enrolled after adding them to a role as well as changes the help text to reflect actual changes.

Inconsistencies in studio and lms interface to add Admin/Staff users found by @kaustavb12 Currently there are two ways to add an user as a course staff/admin. Either through the instructor dashboard in LMS, or through the Studio. In Studio, if an unenrolled user is added as the course staff, the user is auto enrolled, even though the message in the Studio Course team page says otherwise (It says "All course team members can access content in Studio, the LMS, and Insights, but are not automatically enrolled in the course") :

However, in LMS, if an unenrolled user is added as the course staff, the user is NOT auto-enrolled. Although the message there says that only enrolled users can have course team roles.

This PR is updates LMS instructor dashboard behaviour to match with studio as well as studio text to reflect the real changes.

#32436 Is fixing the API for forum related roles as there is no inconsistency in case of forum related roles.

Supporting information

Private-ref: BB-7609

Testing instructions

  • Setup master devstack or tutor locally.
  • Register two users, one of which should have staff access.
  • Using the staff user, enroll to a course.
  • Under Instructor > Membership tab, go to Course Team Management section.
  • Without the changes in this PR, you will be able to add the other user (who did not enroll in this course) to any role.
  • With the changes in this PR, it will raise an error with appropriate msg.

image

Other information

A point of discussion: Should we revoke user's course related roles when they unroll from a course?

navinkarkera avatar Jun 23 '23 14:06 navinkarkera

Thanks for the pull request, @navinkarkera! 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:

  • supporting documentation
  • Open edX discussion forum 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 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.

openedx-webhooks avatar Jun 23 '23 14:06 openedx-webhooks

Hi @navinkarkera! Is this all set for review?

mphilbrick211 avatar Jun 27 '23 21:06 mphilbrick211

@mphilbrick211 Thanks for checking. Yes, it is ready,

navinkarkera avatar Jun 28 '23 04:06 navinkarkera

Hello @openedx/teaching-and-learning! Would someone be able to help merge this? Thanks!

mphilbrick211 avatar Jul 25 '23 20:07 mphilbrick211

Hi @navinkarkera! Flagging the new tests for you per the recent update: https://discuss.openedx.org/t/minor-change-to-edx-platform-check-statuses/11131

mphilbrick211 avatar Sep 12 '23 18:09 mphilbrick211

Hi @openedx/teaching-and-learning! Friendly ping on this.

mphilbrick211 avatar Sep 14 '23 14:09 mphilbrick211

How long has the behavior as it is now been in place? It doesn't matter what the message is, if teams have been doing it this way for years changing it is going to confuse everyone. It adds a step to onboarding an assistant, who does that step and where?

ashultz0 avatar Oct 23 '23 15:10 ashultz0

How long has the behavior as it is now been in place? It doesn't matter what the message is, if teams have been doing it this way for years changing it is going to confuse everyone. It adds a step to onboarding an assistant, who does that step and where?

Hi @navinkarkera - flagging this for you :)

mphilbrick211 avatar Nov 13 '23 21:11 mphilbrick211

@mphilbrick211 Thanks for the reminder. I'll get back to this PR soon.

navinkarkera avatar Nov 15 '23 14:11 navinkarkera

Sandbox deployment failed.

Check failure logs here https://grove-stage-build-logs.nyc3.digitaloceanspaces.com/34602668-5652246006.log

Instance config : https://grove-stage-build-logs.nyc3.digitaloceanspaces.com/34602668-5652246006-config.yml Instance requirements : https://grove-stage-build-logs.nyc3.digitaloceanspaces.com/34602668-5652246006-requirements.txt

Please check the settings and requirements and retry deployment by updating the pull request or posting a /grove sandbox update comment.

open-craft-grove avatar Nov 30 '23 12:11 open-craft-grove

@mphilbrick211 Thanks for the reminder. I'll get back to this PR soon.

Hi @navinkarkera - just checking in on this.

mphilbrick211 avatar Feb 21 '24 16:02 mphilbrick211

How long has the behavior as it is now been in place?

@ashultz0 I think its been at least 10 years.

It doesn't matter what the message is, if teams have been doing it this way for years changing it is going to confuse everyone. It adds a step to onboarding an assistant, who does that step and where?

It is true that this adds an additional step which can be done in the same instructor tab on top. image

If we don't want to change the behaviour, we should update the help text to reflect the actual changes.

navinkarkera avatar Mar 04 '24 06:03 navinkarkera

@mariajgrimaldi Would you like to review this as well as it is related to https://github.com/openedx/edx-platform/pull/32436? cc: @mphilbrick211

navinkarkera avatar Mar 05 '24 10:03 navinkarkera

@mariajgrimaldi Would you like to review this as well as it is related to #32436? cc: @mphilbrick211

Hi @mariajgrimaldi! Checking in to see if you're able to review this one?

mphilbrick211 avatar Mar 19 '24 23:03 mphilbrick211

Hi folks @mphilbrick211, @navinkarkera! What @ashultz0 says is pretty valid. Although I understand the text is misleading, we're proposing changing the current behavior. So, should this go through a product review? This question also goes to https://github.com/openedx/edx-platform/pull/32436

I left a message in #wg-product-core asking the same question. Thanks!

mariajgrimaldi avatar Mar 20 '24 13:03 mariajgrimaldi

See https://openedx.slack.com/archives/C057J2D1WU9/p1710940996542269 for more context on the status change

mariajgrimaldi avatar Mar 20 '24 14:03 mariajgrimaldi

@navinkarkera - I'm curious if implementing this fix differently to match the behavior in Studio was considered?: In Studio, if an unenrolled user is added as the course staff, the user is auto enrolled in the course.

Of course, we'd want to update the text to the fix you make to the LMS as well to let the user know that adding the user will auto-enroll the user in the course if we go this route.

This would add less steps for the user and keeping the flow consistent from Studio to the LMS makes sense. (It would be great to update the helper text in Studio at some point, too, but I understand that may be beyond the scope of this ticket).

crathbun428 avatar Mar 21 '24 20:03 crathbun428

@crathbun428 That also makes sense. I am open to suggestions here as my only issue is with the text and behaviour mismatch.

navinkarkera avatar Mar 25 '24 08:03 navinkarkera

@navinkarkera - Perfect. If this doesn't prove too difficult, this is how we'd want to implement this instead. This way we're not adding an additional step for users in the flow, while also making things simple process-wise and clear through the helper text.

If we were to implement this way instead, the helper text could say something like: Course team members with the Staff role help you manage your course. Staff can enroll and unenroll learners, modify their grades, and access all course data. Staff also have access to your course in Studio. Any users not yet enrolled in the course will be automatically enrolled when added as Staff.

I'll mark Product Review as complete for now - happy to do a quick review if needed if and when the implementation is adjusted. Please let me know if any of the above isn't clear. cc: @mariajgrimaldi; @mphilbrick211

crathbun428 avatar Mar 25 '24 15:03 crathbun428

@crathbun428 Thanks! Should we also do the same for forum related roles: https://github.com/openedx/edx-platform/pull/32436

@mariajgrimaldi The PR is ready for your review.

navinkarkera avatar Mar 28 '24 07:03 navinkarkera

@mariajgrimaldi Gentle reminder.

navinkarkera avatar Apr 24 '24 10:04 navinkarkera

@navinkarkera: on it! Thanks for the reminder

mariajgrimaldi avatar Apr 24 '24 13:04 mariajgrimaldi

@navinkarkera 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

openedx-webhooks avatar Apr 26 '24 17:04 openedx-webhooks

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

edx-pipeline-bot avatar Apr 26 '24 18:04 edx-pipeline-bot

2U Release Notice: This PR has been deployed to the edX production environment.

edx-pipeline-bot avatar Apr 26 '24 19:04 edx-pipeline-bot