Download the PHP package asifm42/scorm-cloud-php without Composer

On this page you can find all versions of the php package asifm42/scorm-cloud-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package scorm-cloud-php

SCORM Cloud PHP API Bindings

This fork provides support for psr-4 autoloading.

This library provides implementations for the majority, but not all, of the SCORM Cloud API. It is provided under the BSD 3-clause License (see LICENSE).

You can sign up for a SCORM Cloud account at https://cloud.scorm.com.

See our API quick start guide for more information.

Requirements

Requires PHP 5 or greater.

Installation

This library is available via Composer.

Command-line:

composer require asifm42/scorm-cloud-php

Composer.json:

{
    "require": {
        "asifm42/scorm-cloud-php": "dev-master"
    }
}

Configuration

The ScormEngineService class provides simple access to the API bindings:

where your app id is the app ID in question, your secret key is a secret key for that app ID, and your origin string is a company/app description. (The origin string is used for debugging on the SCORM Cloud developers' side.) See API quick start for information on app ID / secret keys.

Example API Calls

Once installed and configured, it's time to make API calls. As explained in the quick start guide, the library implements the scaffolding used to interact with the actual web API.

The samples directory contains sample code for several API calls. It's not required for the library to function.

Registration Exists

Corresponds to rustici.registration.exists.

Create Registration

Corresponds to rustici.registration.createRegistration.

As explained in the LMS Integration Guide, the registration, course, and learner IDs are provided by your system. The course ID needs to be an ID for a course that's already been imported. See the LMS integration guide for more information about integrating a typical LMS with SCORM Cloud.

Building Launch Link

As explained in rustici.registration.launch, the launch API call is different from nearly every other API call in that it's intended for integrating systems to redirect learners to that API call URL instead of calling it server-side.

The client library facilitates this by providing a GetLaunchUrl method:

where registration id is the registration to launch and redirect on exit url is the URL to which the learner should be redirected if they exit the course. (Note: as discussed in the LMS Integration Guide, don't rely on learners hitting the redirect on exit URL.)

In a typical PHP web-app, you might redirect to this:

The library provides other (default null) parameters for GetLaunchUrl that might be useful.

Implementing Other API Calls

Although this library implements most of the SCORM Cloud API, it doesn't implement all of it. In cases where the library is insufficient, you can use the ServiceRequest class to directly call API methods described in the API reference:

This snippet of code manually builds a ServiceRequest with one parameter and then uses CallService to invoke the request for a particular API method.

As it happens, this is (close to) the implementation of the RegistrationExists method above.

If you find methods missing and would like to implement them, we would be eternally grateful for any pull requests.

Support

Need to get in touch with us? Contact us at [email protected]. Ask us anything.

Don't hesitate to submit technical questions. Our support staff are excellent, and even if they can't answer a question or resolve a problem, tickets get escalated quickly to real, live developers.


All versions of scorm-cloud-php with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package asifm42/scorm-cloud-php contains the following files

Loading the files please wait ....