BB-1471: Allow redirection to any course page from course home

Description

This PR adds a configuration that allows direct redirection from the course home to any course page.

*JIRA tickets*: TDB.

*Sandbox URL*: TBD - sandbox is being provisioned.

*Merge deadline*: None.

*Testing instructions:*

1. Checkout this branch.
1. Set `course_experience.unified_course_tab` on [WaffleFlag settings](http://localhost:8000/admin/waffle/flag/).
1. Go to a course's main page and check that it redirects to /course page with the unified course experience.
1. Disable the WaffleFlag, and add the following variable to the [SiteConfiguration Settings](http://localhost:8000/admin/site_configuration/siteconfiguration/):

```
{
...
"COURSE_HOME_BEHAVIOUR": "courseware"
}
```

1. Check if navigating to a course's home page redirect's to the courseware (http://localhost:8000/courses/course-v1:edX+DemoX+Demo_Course/).
1. Test changing that setting to `info`, `about` and `course`, and assert that the correct redirection are made.
1. Set `COURSE_HOME_BEHAVIOUR` to `thisdoesntexist` and check that the page defaults to the original behaviour (showing the course info page) and logs a warning to the console.

*Author notes and concerns*:
1. I'm not sure `SiteConfiguration` is the best place for this setting.
2. This function is partially covered by tests, I can create more unit tests if required.

*Reviewer:*

  • [ ] @xitij2000

  • [ ] edX reviewer[s] TBD

Status

Assignee

Marco Morales

Reporter

Open Source Pull Request Bot

Labels

Contributor Name

Giovanni Cimolin da Silva

Repo

edx/edx-platform

Customer

Epic Link

None

OSCM Assignee

None

Priority

Unset
Configure