Django application that provides a service for cloning courses in an Open edX instance.
The application provides a RESTful API that can be used to create a new course by cloning an existing one. The application uses Celery to perform the cloning operation in the background, and provides a task status endpoint to check the status of the task.
- Docker and Docker Compose
- Python 3.x
- Virtualenv
- Ensure that the Open edX platform devstack is running. Devstack won't run the Celery message broker by default.
Ensure to start the redis broker by running the command
make dev.up.redis
. (note: edx-platform should have the changes from this commit)
- Create a Python 3 virtual environment for the project.
- Install the required Python packages by running the command:
make upgrade && make dev_requirements
. - Start the services for this project by running the command:
make dev.up
. - Setup required oauth application with LMS, by running the command:
./provision-clone_course.sh
.
TODO: How can a new user go about deploying this component? Is it just a few commands? Is there a larger how-to that should be linked here?
PLACEHOLDER: For details on how to deploy this component, see the deployment how-to
Clone course
POST /api/v1/clone/clone/
This API endpoint is used to clone an existing course to a new course.
The request body should contain a JSON object with the following fields:
source_course_id
: The ID of the course to clone.destination_course_id
: The ID of the new course.
Example Request:
{
"source_course_id": "course-v1:edX+DemoX+Demo_Course",
"destination_course_id": "course-v1:new+TestX+Demo_Course_Clone",
}
Example Response:
{
"task_id": "4f95e48a-8b68-45dc-942f-9ac19d5af352"
}
Check clone status
GET /api/v1/clone/status/
This API endpoint is used to check the status of a cloning task.
The request should include a query parameter task_id
with the ID of the cloning task.
Example Request:
GET /api/v1/clone/status/?task_id=4f95e48a-8b68-45dc-942f-9ac19d5af352
Example Response:
{
"status": "SUCCESS",
"source_id": "course-v1:edX+DemoX+Demo_Course",
"dest_id": "course-v1:new+TestX+Demo_Course_Clone",
"response":{"message":"Course cloned successfully."}
}
PLACEHOLDER: Start by going through the documentation. If you need more help see below.
(TODO: Set up documentation)
If you're having trouble, we have discussion forums at https://discuss.openedx.org where you can connect with others in the community.
Our real-time conversations are on Slack. You can request a Slack invitation, then join our community Slack workspace.
For anything non-trivial, the best path is to open an issue in this repository with as many details about the issue you are facing as you can provide.
https://github.com/openedx/clone_course/issues
For more information about these options, see the Getting Help page.
The code in this repository is licensed under the AGPL 3.0 unless otherwise noted.
Please see LICENSE.txt for details.
Contributions are very welcome. Please read How To Contribute for details.
This project is currently accepting all types of contributions, bug fixes, security fixes, maintenance work, or new features. However, please make sure to have a discussion about your new feature idea with the maintainers prior to beginning development to maximize the chances of your change being accepted. You can start a conversation by creating a new issue on this repo summarizing your idea.
All community members are expected to follow the Open edX Code of Conduct.
The assigned maintainers for this component and other project details may be
found in Backstage. Backstage pulls this data from the catalog-info.yaml
file in this repo.
Please do not report security issues in public. Please email security@tcril.org.