-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This guide details the steps to set up Tutor locally with custom plugins, themes, and configuration.
Note:
- Ensure that all repositories are public. If any repository is private, use a GitHub token for authentication.
- Ensure you have docker installed and running
Install Tutor with full features by running:
pip install "tutor[full]>=16.0.0,<17.0.0"
Start the Tutor development environment:
tutor dev launch
Note: Once you launch the tutor, A directory will be created on your system root. for macOS, the path is Library/Application Support/tutor
Inside tutor, Navigate to the env/build/openedx/requirements directory and clone your custom plugins repository
cd env/build/openedx/requirements
Navigate to the env/build/themes directory and clone your frontend themes repository:
Inside the requirements directory, create a file called private.txt with the following content:
-e ./sherab-custom-plugin
This tells Tutor to install your custom plugin in editable mode.
In your root dir (Library/Applcation Support), check for a dir called tutur-plugins (create it if it's not there mkdir tutur-plugins). In the tutor-plugins directory, create a file called configuration_plugins.yml with the following content:
name: configuration_plugin
version: 0.0.1
patches:
openedx-lms-development-settings: |
FEATURES['CUSTOM_COURSES_EDX'] = True
FEATURES['ENABLE_CHANGE_USER_PASSWORD_ADMIN'] = True
FEATURES['ENABLE_SPECIAL_EXAMS'] = True
FEATURES['MILESTONES_APP'] = True
FEATURES['ENABLE_PREREQUISITE_COURSES'] = True
FEATURES['ENABLE_DISCUSSION_HOME_PANEL'] = True
FEATURES['ENABLE_DISCUSSION_EMAIL_DIGEST'] = True
FEATURES['ENABLE_ACCOUNT_DELETION'] = False
FEATURES['CUSTOM_CERTIFICATE_TEMPLATES_ENABLED'] = True
FEATURES['SHOW_HEADER_LANGUAGE_SELECTOR'] = True
FEATURES['SHOW_FOOTER_LANGUAGE_SELECTOR'] = False
FEATURES['ORGANIZATIONS_APP'] = True
FEATURES['ENABLE_COURSE_DISCOVERY'] = True
FEATURES['ALWAYS_REDIRECT_HOMEPAGE_TO_DASHBOARD_FOR_AUTHENTICATED_USER'] = False
DEFAULT_FROM_EMAIL = "contact@sherab.org"
CONTACT_EMAIL = "contact@sherab.org"
DEFAULT_FEEDBACK_EMAIL = "contact@sherab.org"
TECH_SUPPORT_EMAIL = "contact@sherab.org"
COMMUNITY_FORUM_URL = "https://community.sherab.org/"
SEARCH_SKIP_ENROLLMENT_START_DATE_FILTERING = True
LANGUAGES += [('bo', 'བོད་སྐད།')]
Tip: Ensure that quotes and special characters are formatted correctly.
a. tutor plugins enable configuration_plugin
b. tutor config save
Note: Check if the plugin is enabled
tutor plugins list
Set your custom theme by running:
tutor dev do settheme <theme_name>
Replace <theme_name> with the name of the theme you wish to use.
Execute the following command to run LMS database migrations:
tutor dev run lms ./manage.py lms migrate
If Tutor is running, stop it using:
tutor dev stop
Append the custom plugin repository URL to Tutor's extra pip requirements:
tutor config save --append OPENEDX_EXTRA_PIP_REQUIREMENTS=git+https://github.com/Esukhia/sherab-custom-plugin.git
Build the Docker image with your custom edX platform repository and version:
tutor images build openedx \
--build-arg EDX_PLATFORM_REPOSITORY=https://github.com/Sherab-1/edx-platform.git \
--build-arg EDX_PLATFORM_VERSION=sherab-development \
--no-cache
Finally, start Tutor in detached mode:
tutor dev start -d
if you get npm socket timeput error, increase the npm timeout setting in the docker file
RUN npm config set fetch-timeout 120000 && npm config set fetch-retry-maxtimeout 120000