Automattic / Automattic/sensei

Changing the Course teachers causes ordered modules to break

Open
#6,331 2 comments 0 reactions 0 assignees View on GitHub
[Type] Bug Modules
Dominant language
PHP
Stars
593
Forks
218
Avg merge
1d 22h
Merged PRs (30d)
53

Description

### Steps to Reproduce
1. Create a course with two or more modules and some lessons in each of them.
2. Go to **Sensei > Modules > Order Modules** and change the order of the modules for the course in step 1.
3. Edit the course in step 1. Change the Course teacher from admin to someone else with `teacher` role.

### What I Expected

Nothing except the Course teacher to be changed.

### What Happened Instead

The order of the modules in the course changed. They are not in the order we set them in step 2.

### PHP / WordPress / Sensei LMS version
- PHP: 7.2.34
- Sensei LMS: 4.9.1

### Browser / OS version
- MacOS: 12.6.1
- Firefox: 107.0.1

### Context / Source

p1671618125369829-slack-C02P7FHLVR9

p1671565852445619-slack-C026V8PUALS

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue through Sensei > Modules > Order Modules, then change the course teacher as described and trace where the module order is changed. Done means changing the teacher no longer alters the previously saved module order, with a regression test covering the reproduction steps.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.