Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 1.27 KB

README.md

File metadata and controls

44 lines (30 loc) · 1.27 KB

This repository contains the source code for a demo of Totara 17's new external API functionality as a companion to a developer screencast of the functionality.

The GIT commit history is tagged with the steps shown in the screencast so you can follow along.

To test the code you would need:

  • Two Totara sites, both accessible over the network from where this code is running.
  • A computer running:

Then follow these steps:

  1. Clone the repository:
git clone https://github.com/totara/apidemo.git
cd apidemo
  1. Install dependencies via composer:
composer install
  1. Edit the config.php file and enter the URLs and OAuth2 credentials of the two sites. See the screencast for details on how to obtain client id and secret.

  2. Update the SERVICE_ACCOUNT_USERNAME constant in src/Sync.php to match the service account username on the target site.

  3. Run the command:

php run.php

WARNING: User data on the target site will be created, updated, and deleted by this code.

The code in this repository is for demonstration purposes only - it is not production ready or supported by Totara Learning.

This repository is licensed for use under GPLv3 or later.