Revise Logic for Assigning a New Enrollment's _default_course_mode
Revising the logic to assing the _default_course_mode to a new enrollment
I'm looking at `common.djangoapps.enrollment.api._default_course_mode` which decides the logic for the enrollment mode in any enrollments that do not specify a particular mode.
Currently the logic says:
1. Get the available modes
2. If the default mode (normally audit) is available, use it.
3. If the 'audit' mode is available, use it
4. If the 'honor' mode is available, use it
5. If you get here, use default
Normally you never get to step 5 because the method to get the available modes returns the default mode if nothing else is in there, but I see this being a safe choice as the last default.
I would like to add some extra behavior between 4 and 5:
if there is only one mode, and we are here(that means is not the default mode), then use it.
We need this for a course which is being sold using ecommerce and uses `no-professional-id`, but the administrators of the course need to manually enroll users and they should end in the same track.
[ ] Product manager review
Steps to Test or Reproduce
Using the instructor dashboard enroll a user in a course that only has one mode `no-id-professional`, and the user will be enrolled in mode `audit`
Impacted Areas in Application
Development and Design Notes
How do you plan on implementing this proposal?
This will only impact courses which have one single mode and that is not `honor` nor `audit`