learnosity / learnosity-demos
Jumpstart your integration of the Learnosity APIs into your learning platform.
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 29
Watchers: 64
Forks: 37
Open Issues: 1
Type:project
Requires
- php: >=8.1
- learnosity/learnosity-sdk-php: ^1
- dev-develop
- dev-master
- dev-bump/styleguide
- dev-dependabot/npm_and_yarn/babel/preset-env-7.26.0
- dev-dependabot/npm_and_yarn/babel/core-7.26.0
- dev-dependabot/composer/learnosity/learnosity-sdk-php-1.0.5
- dev-dependabot/npm_and_yarn/gulp-5.0.0
- dev-dependabot/npm_and_yarn/gulp-cli-3.0.0
- dev-dependabot/npm_and_yarn/www/assessment/customization/style-guide/minimist-1.2.8
- dev-LRN-44260/bug/bug-fix
- dev-revert-233-revert-228-LRN-39712/feature/cut-score-last-score-by-item-by-user
- dev-dependabot/npm_and_yarn/json5-2.2.3
- dev-dependabot/npm_and_yarn/www/assessment/customization/style-guide/json5-1.0.2
- dev-dependabot/npm_and_yarn/gulp-replace-1.1.4
- dev-dependabot/npm_and_yarn/www/assessment/customization/style-guide/qs-6.5.3
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/www/assessment/customization/style-guide/loader-utils-1.4.2
- dev-dependabot/npm_and_yarn/www/assessment/customization/style-guide/minimatch-3.0.8
- dev-dependabot/npm_and_yarn/www/assessment/customization/style-guide/terser-5.14.2
- dev-dependabot/npm_and_yarn/www/assessment/customization/style-guide/nanoid-3.3.2
- dev-dependabot/npm_and_yarn/hosted-git-info-2.8.9
- dev-dependabot/npm_and_yarn/www/assessment/customization/style-guide/node-sass-7.0.0
- dev-dependabot/npm_and_yarn/copy-props-2.0.5
- dev-dependabot/npm_and_yarn/path-parse-1.0.7
This package is auto-updated.
Last update: 2024-10-30 18:19:39 UTC
README
Jumpstart your integration of the Learnosity APIs into your learning platform.
Overview
This repository has been designed to allow users to quickly view and interact with some of the core Learnosity APIs.
Each page shows a basic integration to a specific Learnosity API which you can utilize and learn from.
Requirements
- PHP 7.4+
- You must be connected to the Internet to use this site
Getting Started
The following shows you how to get the code in this repository up and running as a stand-alone site.
First, get the code with
git clone https://github.com/Learnosity/learnosity-demos.git
Note: To simplify the next steps, you'll need the make
utility (usually available
in the development tools of your platform). If this option is not available to
you, see the next two sections, which show you how to start the demos site
manually.
The simple Makefile
included with this project allows you to start one or the other
modes, by running either of the following commands from the learnosity-demos
directory that was just created.
make run-php # See “Using PHP's native server” below to see what this does
You can then visit http://localhost:8080 in a browser.
Note that you must use localhost as the domain (not 127.0.0.1). Any port is fine but the internal security in some of the APIs is domain restricted. So until you contact Learnosity to whitelist specific domains, access is restricted to localhost.
If port 8080 is already in use, you can specify a custom port instead, with
make run-php PORT=8000 # Using custom port 8000
You would then be able visit http://localhost:8000 in a browser.
Using PHP's native server
You can use PHP's built-in server to quickly get up and running.
git clone https://github.com/Learnosity/learnosity-demos.git
cd learnosity-demos
php -S localhost:8080 --docroot www
Consumer
This package comes with demo security (consumer) credentials. If you have your own consumer details (as provided by Learnosity) you may use them by editing lrn_config.php
Documentation
More API documentation is available at the Learnosity Developer Documentation
PHP dependency management using Composer
While this demonstration project ships with dependency libraries (such as the Learnosity SDK) for ease of use, it is not recommended practice to do so on production projects. The composer tool can be used for the purpose of installing and upgrading third-party libraries.
See composer-getting-started for instructions on setting it up on your
platform. You can then try it out on this project, by running the following in
the learnosity-demos
directory you cloned using git
as detailed in the
previous sections.
composer install # Reinstall dependencies as specified in the shipped composer.lock
composer update # Upgrade dependencies according to constraints in composer.json
Note that the make
-based instructions in the “Getting Started” section take
care of the following for you.
For simplicity, the get-composer.php
script can be used to fetch a
local version of composer. It will be named composer.phar
, and will have to be
called as ./composer.phar
instead of just composer
.
If using Mac OS X, you can set up Homebrew to use a specific tap.
brew tap homebrew/php
brew install composer