Skip to content
/ apidemo Public

Source code for a demo of Totara 17's new external API functionality, provided as a companion to a developer screencast

Notifications You must be signed in to change notification settings

totara/apidemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Source code for a demo of Totara 17's new external API functionality, provided as a companion to a developer screencast

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages