SE-4287 Fix for CRI-223
Please give the pull request a short but descriptive title.
Use [conventional commits](https://www.conventionalcommits.org/) to separate and summarize commits logically.
Use this template as a guide. Omit sections that don't apply. You may link to information rather than copy it.
More details about the template are at https://github.com/edx/open-edx-proposals/pull/180
(link will be updated when that document merges)
In CMS > Course > Settings > Grading page (/settings/grading/<course-id>)
when language is changed, the reloaded page gives a 500 error.
This happens because Django language view:
adding None to the end of url for patterns like this:
e.g result will be for example `/course_team/course-v1:edX+DemoX+Demo_Course/None`
I'm sure that this is not correct behaviour and also the grading page triggers a 500 error because of the used pattern.
Jira Ticket: [SE-4287](https://tasks.opencraft.com/browse/SE-4287)
*Steps to Reproduce*
1. Header language selector should be enabled
2. You should have more than 1 language enabled (in django admin > Darklang Configuration
3. Choose a existing course and go to Settings > Grading
4. Change language using the language dropdown in the header and wait for the page reload.
5. Language is updated but the reloaded page gives an error.
To enable language select add to your settings:
SHOW_HEADER_LANGUAGE_SELECTOR = True
FEATURES['SHOW_HEADER_LANGUAGE_SELECTOR'] = True
To your settings.
"None" if there's no rush, or provide a specific date or event (and reason) if there is one.
I tried to split urls like:
url(r'^$', contentstore_views.grading_handler, name='grading_handler'),
url(fr'^(?P<grader_index>\d+)?$', contentstore_views.grading_handler, name='grading_handler_id')
But this is requires a lot of changes on backend