PHP code example of elefant / app-scorm

1. Go to this page and download the library: Download elefant/app-scorm library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

elefant / app-scorm example snippets




// Get a single value
$value = scorm\Data::get_value ($module, $user_id, $key);

// Get all values for a particular user and module
$values = scorm\Data::get_values ($module, $user_id);




/**
 * Receives SCORM commits as a notification with the following
 * $data parameters:
 *
 * - module: The name of the SCORM module
 * - data: An array of key/value pairs of SCORM values
 *
 * Note that you can retrieve the current user via User::val('id').
 * For a list of SCORM values, visit:
 *
 * http://scorm.com/scorm-explained/technical-scorm/run-time/run-time-reference/
 */

if (! $this->internal) {
	die ('Must be called by another handler');
}

// Add your handling logic here