Skip to content

Commit

Permalink
Subscription settings added (#338)
Browse files Browse the repository at this point in the history
  • Loading branch information
marslanabdulrauf authored Nov 29, 2022
1 parent 21d8d80 commit c6c8abd
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@

IDA_LOGOUT_URI_LIST,

# Subscription Plans
PLAN_FEATURES,

# Methods to derive settings
_make_mako_template_dirs,
_make_locale_paths,
Expand Down
43 changes: 43 additions & 0 deletions lms/envs/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@
)
from openedx.core.lib.derived import derived, derived_collection_entry
from openedx.core.release import doc_version
from openedx.features.edly.constants import (
ADDITIONAL_USER_PRICE,
COURSE_AUTHORS,
ELITE,
ESSENTIALS,
MONTHLY_ACTIVE_USERS,
NUMBER_OF_COURSES,
NUMBER_OF_REGISTERED_USERS,
STAFF_USERS,
TRIAL,
WP_ADMIN_USERS,
)
from xmodule.modulestore.modulestore_settings import update_module_store_settings
from xmodule.modulestore.edit_info import EditInfoMixin
from lms.djangoapps.lms_xblock.mixin import LmsBlockMixin
Expand Down Expand Up @@ -3998,3 +4010,34 @@ def _make_locale_paths(settings): # pylint: disable=missing-function-docstring

##################### SUPPORT URL ############################
SUPPORT_HOW_TO_UNENROLL_LINK = ''

# Subscription Plans
PLAN_FEATURES = {
TRIAL: {
ADDITIONAL_USER_PRICE: 0,
MONTHLY_ACTIVE_USERS: 20,
NUMBER_OF_REGISTERED_USERS: 20,
NUMBER_OF_COURSES: 3,
STAFF_USERS: 1,
WP_ADMIN_USERS: 1,
COURSE_AUTHORS: 1,
},
ESSENTIALS: {
ADDITIONAL_USER_PRICE: 2,
MONTHLY_ACTIVE_USERS: 1000,
NUMBER_OF_REGISTERED_USERS: 5000,
NUMBER_OF_COURSES: 50,
STAFF_USERS: 1,
WP_ADMIN_USERS: 1,
COURSE_AUTHORS: 3,
},
ELITE: {
ADDITIONAL_USER_PRICE: 2,
MONTHLY_ACTIVE_USERS: 5000,
NUMBER_OF_REGISTERED_USERS: 50000,
NUMBER_OF_COURSES: 200,
STAFF_USERS: 3,
WP_ADMIN_USERS: 3,
COURSE_AUTHORS: 10,
}
}
9 changes: 9 additions & 0 deletions openedx/features/edly/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,12 @@
ELITE = 'elite'
TRIAL_EXPIRED = 'trial expired'
DEACTIVATED = 'deactivated'

# FEATURE FLAGS
ADDITIONAL_USER_PRICE = 'additional_user_price'
MONTHLY_ACTIVE_USERS = 'monthly_active_users'
NUMBER_OF_REGISTERED_USERS = 'number_of_registered_users'
NUMBER_OF_COURSES = 'number_of_courses'
STAFF_USERS = 'staff_users'
WP_ADMIN_USERS = 'wp_admin_users'
COURSE_AUTHORS = 'course_authors'

0 comments on commit c6c8abd

Please sign in to comment.