PHP code example of bzzix / laravel-lrs-package
1. Go to this page and download the library: Download bzzix/laravel-lrs-package 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/ */
bzzix / laravel-lrs-package example snippets
$xapi->Registered([
'name' => '1234567890', // Student National ID
'email' => '[email protected] ',
'courseId' => 'Course URL',
'courseName' => 'Course Title',
'courseDesc' => 'Course Description',
'instructor' => 'Instructor Name',
'inst_email' => '[email protected] ',
// Optional NELC Extensions
'duration' => 'PT10H', // ISO 8601 Duration
'learnerFullName' => 'Full Name',
'learnerMobileNo' => '+966...',
'learnerNationality' => 'Saudi',
'dateOfBirth' => 'YYYY-MM-DD',
'lmsUrl' => 'LMS Base URL'
]);
$xapi->Initialized([
'name' => '1234567890', // National ID
'email' => '...',
'courseId' => '...',
'courseName' => '...',
'courseDesc' => '...',
'instructor' => '...',
'inst_email' => '...'
]);
$xapi->Watched([
'name' => '1234567890',
'lessonUrl' => 'Video URL',
'lessonName' => 'Video Title',
'completion' => true,
'duration' => 'PT5M',
'courseId' => '...',
// ... basic info
]);
$xapi->Attempted([
'name' => '1234567890',
'quizUrl' => '...',
'attempNumber' => '1',
'scaled' => 0.9, // 0 to 1
'raw' => 90,
'min' => 0,
'max' => 100,
'completion' => true,
'success' => true,
// ... basic info
]);
$xapi->Registered([
'name' => '1234567890', // رقم الهوية الوطنية للطالب
'email' => '[email protected] ',
'courseId' => 'رابط الدورة',
'courseName' => 'اسم الدورة',
'courseDesc' => 'وصف الدورة',
'instructor' => 'اسم المحاضر',
'inst_email' => 'بريد المحاضر',
'duration' => 'PT10H',
'learnerFullName' => 'الاسم الرباعي',
'learnerMobileNo' => '+966...',
'learnerNationality' => 'Saudi',
'dateOfBirth' => 'YYYY-MM-DD'
]);
$xapi->Attempted([
'name' => '1234567890',
'quizUrl' => 'رابط الاختبار',
'attempNumber' => '1',
'scaled' => 0.9,
'raw' => 90,
'min' => 0,
'max' => 100,
'completion' => true,
'success' => true,
'courseId' => '...',
'courseName' => '...',
// ... البيانات الأساسية
]);