|
1 | | -# NOTE: Code has been copied from the following source files |
2 | | -# https://github.com/openedx/edx-platform/blob/master/common/djangoapps/xblock_django/constants.py |
3 | 1 | """ |
4 | 2 | Constants used by DjangoXBlockUserService |
5 | 3 | """ |
6 | 4 |
|
7 | | -# Optional attributes stored on the XBlockUser |
| 5 | +# This is the view that will be rendered to display the XBlock in the LMS. |
| 6 | +# It will also be used to render the block in "preview" mode in Studio, unless |
| 7 | +# the XBlock also implements author_view. |
| 8 | +STUDENT_VIEW = 'student_view' |
| 9 | + |
| 10 | +# This is the view that will be rendered to display the XBlock in the LMS for unenrolled learners. |
| 11 | +# Implementations of this view should assume that a user and user data are not available. |
| 12 | +PUBLIC_VIEW = 'public_view' |
| 13 | + |
8 | 14 |
|
9 | | -# The anonymous user ID for the user in the course. |
10 | | -ATTR_KEY_ANONYMOUS_USER_ID = 'edx-platform.anonymous_user_id' |
11 | | -# The global (course-agnostic) anonymous user ID for the user. |
12 | | -ATTR_KEY_DEPRECATED_ANONYMOUS_USER_ID = 'edx-platform.deprecated_anonymous_user_id' |
13 | | -# The country code determined from the user's request IP address. |
14 | | -ATTR_KEY_REQUEST_COUNTRY_CODE = 'edx-platform.request_country_code' |
15 | | -# Whether the user is authenticated or anonymous. |
16 | | -ATTR_KEY_IS_AUTHENTICATED = 'edx-platform.is_authenticated' |
17 | 15 | # The personally identifiable user ID. |
18 | 16 | ATTR_KEY_USER_ID = 'edx-platform.user_id' |
19 | | -# The username. |
20 | | -ATTR_KEY_USERNAME = 'edx-platform.username' |
21 | | -# Whether the user is enrolled in the course as a Beta Tester. |
22 | | -ATTR_KEY_USER_IS_BETA_TESTER = 'edx-platform.user_is_beta_tester' |
23 | | -# Whether the user has staff access to the platform. |
24 | | -ATTR_KEY_USER_IS_GLOBAL_STAFF = 'edx-platform.user_is_global_staff' |
25 | | -# Whether the user is a course team member with 'Staff' or 'Admin' access. |
26 | | -ATTR_KEY_USER_IS_STAFF = 'edx-platform.user_is_staff' |
27 | | -# A dict containing user's entries from the `UserPreference` model. |
28 | | -ATTR_KEY_USER_PREFERENCES = 'edx-platform.user_preferences' |
29 | | -# The user's role in the course ('staff', 'instructor', or 'student'). |
30 | | -ATTR_KEY_USER_ROLE = 'edx-platform.user_role' |
| 17 | +# The country code determined from the user's request IP address. |
| 18 | +ATTR_KEY_REQUEST_COUNTRY_CODE = 'edx-platform.request_country_code' |
| 19 | + |
| 20 | +COURSE_VIDEO_SHARING_PER_VIDEO = 'per-video' |
| 21 | +COURSE_VIDEO_SHARING_ALL_VIDEOS = 'all-on' |
| 22 | +COURSE_VIDEO_SHARING_NONE = 'all-off' |
0 commit comments