Revise Logic for Assigning a New Enrollment's _default_course_mode

Description

  1. Proposal Title
    Revising the logic to assing the _default_course_mode to a new enrollment

  1.  

    1. Status

IDEA

  1.  

    1. Migrations

NO

  1.  

    1. Description

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.

  1.  

    1. Todos

  • [ ] Product manager review

  1.  

    1. 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`

  1.  

    1. Impacted Areas in Application

Enrollments

  1.  

    1. Development and Design Notes

How do you plan on implementing this proposal?

  1.  

    1. Deployment Notes

This will only impact courses which have one single mode and that is not `honor` nor `audit`

Won't Do

Assignee

Zachary Rockwell

Reporter

Open Source Pull Request Bot

Contributor Name

Felipe Montoya

Repo

edx/edx-platform

Customer

Epic Link

None

OSCM Assignee

None

Platform Map Area (Levels 1 & 2)

None

Platform Map Area (Levels 3 & 4)

None

Blended Hour Utilization Percentage

None

edX Theme

None

edX Squad

None

Github Lines Added

None

Github Lines Deleted

None

Priority

Unset