Skip to content

This repo hosts the learning-assistant application, a plugin for edx-platform.

License

Notifications You must be signed in to change notification settings

edx/learning-assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

learning-assistant

PyPI CI Codecov Documentation Supported Python versions License status-badge

Purpose

Plugin for a learning assistant backend, intended for use within edx-platform.

This library contains data models and logic for a platform wide learning assistant.

Dependencies

In addition to the edx-platform repository in which this library is installed, this plugin also leverages the frontend-lib-learning-assistant as a frontend interface for the learning assistant.

Getting Started

Developing

One Time Setup

# Clone the repository (in the ../src relative to devstack repo)
git clone [email protected]:openedx/learning-assistant.git
cd learning-assistant

# Set up a virtualenv with the same name as the repo and activate it
# Here's how you might do that if you have virtualenvwrapper setup.
mkvirtualenv -p python3.8 learning-assistant

In your requirements/edx/private.txt requirements file in edx-platform, add:

-e /edx/src/learning-assistant

In your lms/envs/private.py settings file in edx-platform (create file if necessary), add the below settings. The value of the API key shouldn't matter, because it's not being used at this point, but the setting needs to be there.

CHAT_COMPLETION_API = '' # copy url from edx-internal
CHAT_COMPLETION_API_KEY = '' # add value though value itself does not matter

LEARNING_ASSISTANT_PROMPT_TEMPLATE = '' # copy value from edx-internal

LEARNING_ASSISTANT_AVAILABLE = True

In devstack, run make lms-shell and run the following command: paver install_prereqs;exit. This will install anything included in your private.txt requirements file.

In django admin, add the following waffle flag learning_assistant.enable_course_content and make sure it is turned on for Everyone. The flag should be checked on for: Superusers, Staff, and Authenticated.

This plugin depends on the lms and discovery - both should be running.

Enabling Xpert for audit learners

In addition to the "One Time Setup" instructions, the following instructions should be followed to enable Xpert for audit learners locally. In your env.development config file in frontend-app-learning, add the below setting.

ENABLE_XPERT_AUDIT='true'

Ensure that you have a non-expired verified mode set up locally for your testing course. You can do this by checking if http://localhost:18000/admin/course_modes/coursemode/ has a course mode with a future expiration date.

The Xpert for audit learner frontend code depends on the lms, discovery, and ecommerce services. Ensure that all three services are running without errors.

Every time you develop something in this repo

# Activate the virtualenv
# Here's how you might do that if you're using virtualenvwrapper.
workon learning-assistant

# Grab the latest code
git checkout main
git pull

# Install/update the dev requirements
make requirements

# Run the tests and quality checks (to verify the status before you make any changes)
make validate

# Make a new branch for your changes
git checkout -b <your_github_username>/<short_description>

# Using your favorite editor, edit the code to make your change.
vim ...

# Run your new tests
pytest ./path/to/new/tests

# Run all the tests and quality checks
make validate

# Commit all your changes
git commit ...
git push

# Open a PR and ask for review.

License

The code in this repository is licensed under the AGPL 3.0 unless otherwise noted.

Please see LICENSE.txt for details.

Contributing

This repo is not currently accepting contributions.

The Open edX Code of Conduct

All community members are expected to follow the Open edX Code of Conduct.

Reporting Security Issues

Please do not report security issues in public. Please email [email protected].

About

This repo hosts the learning-assistant application, a plugin for edx-platform.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published