Error changing user's permissions. on Course

Hello.

I have a issue where i am not able to assign “Discussion Admin” to users.
This affects some of my coruses, but not all,
i created a new one, and there i can add a “discoussion admin”

On the problematic courses i can add "Staff, Admin, “Course Data researcher” and betatesters, but the rest i get an error…
I have tried looking in the log of tutor, but there i only see the “http” request , and nothing on why it does not work .

anyone have any tips to where i should look ?

Hi @oivheg-bouvet! I attempted to reproduce your issue, without success. First, I had trouble figuring out where was the role assignment page. I finally figured it’s in the “Membership” tab from the course instructor dashboard. For instance: https://demo.openedx.overhang.io/courses/course-v1:edX+DemoX+Demo_Course/instructor#view-membership

But then, the UI that I get is different from yours, which leads me to believe that you are running a different Open edX version than mine.

Which Open edX version are you running (Koa/Juniper/Ironwood…)? Did you install with Tutor? If yes, which version?

In order to debug this further, we need the status code and response body of the courses/<course-id>/instructor/api/update_forum_role_membership POST request. This will give us the actual root cause of the issue.

Hello.

Thanks for the repsose, yes i might have been a little unclear.

  1. Yes installed using tutor, i have latest verison v11.1.0, but it have been upgraded from earlier versions.
  2. I use a different theme, so that is why it is different.

i now understood where to look and the result of the post request is:
Status 400
and the respsone body says " Role does not exist.

Of the 4 courses i have, One of them i am able to add a “discussion Moderator”
and i use the same user when i try.

repsosne when it is works is

    {
  "course_id": "course-v1:Himolde+DIKU+2021_T1",
  "action": "allow"
}

So the question then , migh be how can i add the role to the current courses, as i do not want to have to create new ones. as there currently are Learnes on thos courses. ( but i fear , that might be the only way )

Exporting course, and creating a new one, works wihtout any problems, so ther is something wrong in the specific courses.

It’s weird that you are missing some Role objects. However the solution is fairly simple. You should run:

tutor local run lms ./manage.py lms seed_permissions_roles course-v1:Himolde+DIKU+2021_T1

Then you can try to assign the role again.

Great, that worked.

Thanks for the help