A Moodle local plugin that sends xAPI statements to an external Learning Record Store (LRS). Designed to integrate seamlessly with the Saudi National eLearning Center (NELC) and compatible with any xAPI-compliant LRS.
- xAPI Statement Generation - Automatically generates and sends xAPI statements for key learning activities
- NELC Integration - Full compatibility with Saudi National eLearning Center xAPI standards
- Course Duration Tracking - Extended course and lesson metadata including duration fields
- Multi-language Support - Platform names in both English and Arabic
- Activity Tracking - Comprehensive tracking of:
- User activity initialization
- Course enrollment (registration)
- Video watching and virtual class attendance
- Lesson, module, and course completion
- Quiz attempts with scoring
- Learning progress tracking
- Course ratings and certificate issuance
| Component | Minimum Version |
|---|---|
| Moodle | 4.0+ (2022041900) |
| PHP | As per Moodle requirements |
| Required Plugin | tool_courserating (any version) |
| LRS | Any xAPI-compliant Learning Record Store |
Upload the plugin folder to your Moodle installation directory:
moodle/public/local/
⚠️ IMPORTANT: The plugin folder must be named exactlymoodle_lrs_pluginfor Moodle to detect it correctly. If you downloaded a zip file (e.g.,moodle-lrs-plugin-master.zip), extract it and rename the folder tomoodle_lrs_pluginbefore uploading.
Final folder path after uploading:
moodle/public/local/moodle_lrs_plugin- Log in to your Moodle site as a Site Administrator
- Navigate to Site administration → Notifications
- Moodle will automatically detect the new plugin
- Click Upgrade Moodle database now
During installation, Moodle will check for required dependencies. If the tool_courserating plugin is missing:
- Install the required plugin from the Moodle plugins directory
- Return to the notifications page
- Complete the Moodle LRS Plugin installation
Click Continue to finish the installation process.
After successful installation, configure the plugin settings:
- Navigate to: Site administration → Plugins → Local plugins → Moodle LRS Plugin
- Configure the following parameters:
| Setting | Description | Example |
|---|---|---|
| LRS Endpoint | URL of your Learning Record Store | https://lrs.example.com/xapi/ |
| LRS Username | Authentication username for LRS | moodle_user |
| LRS Password | Authentication password for LRS | secure_password |
| Platform Name (English) | Platform display name in English | National Learning Platform |
| Platform Name (Arabic) | Platform display name in Arabic | المنصة الوطنية للتعلم |
- Click Save changes
The plugin automatically extends existing Moodle tables with the following fields:
| Field | Type | Default | Description |
|---|---|---|---|
course_duration |
INTEGER(10) | 0 | Course duration in minutes |
course_language |
CHAR(10) | 'en-US' | Course language code |
is_nelc_enabled |
INTEGER(1) | 1 | NELC integration flag |
| Field | Type | Default | Description |
|---|---|---|---|
lesson_duration |
INTEGER(10) | 0 | Lesson duration in minutes |
| Field | Type | Default | Description |
|---|---|---|---|
lesson_duration |
INTEGER(10) | 0 | Resource duration in minutes |
Note: All fields are created automatically during plugin installation. No manual database modifications are required.
The plugin tracks and generates xAPI statements for the following Moodle events, fully compliant with NELC xAPI standards:
| Event | Verb | Description | Activity Type |
|---|---|---|---|
| User Login | initialized |
Tracks when a learner successfully starts an activity in the LMS | N/A |
| Course Enrollment | registered |
Records when users officially enroll in a course | course |
| Video Watched | watched |
Captures video consumption (90% = watched) | video |
| Lesson Completed | completed |
Monitors individual lesson completions | lesson |
| Virtual Class Attended | attended |
Tracks attendance in live virtual classroom sessions | virtual-classroom |
| Quiz Attempted | attempted |
Records quiz attempts with scores and success status | unit-test / assessment |
| Module Completed | completed |
Captures completion of course modules/units | module |
| Course Progress | progressed |
Tracks ongoing learning progress percentage | course |
| Course Completed | completed |
Records full course completion | course |
| Course Rated | rated |
Captures learner ratings and reviews | course |
| Certificate Earned | earned |
Records certificate issuance with verification link | certificate |
- NELC Compliance: All statements follow Saudi National eLearning Center xAPI profile guidelines
- Unique Identification: Uses National ID/Iqama as actor identifier
- ISO Standards: Durations in ISO 8601 format (
PT1H30M00S), languages in ISO 639-1 (ar-SA,en-US) - Hierarchical Context: Maintains parent-child relationships between courses, modules, and activities
- Metadata Rich: Includes instructor info, platform details, browser data, and custom NELC extensions
All statements comply with xAPI 1.0.3 specification and NELC integration requirements.
Need help with installation, integration, or custom development?
This plugin is licensed under the MIT License. See the LICENSE file for details.
Custom modifications and enterprise support are available upon request.
Contributions are welcome! Please feel free to submit a Pull Request.
Developed by: Mohammed Hassan
Copyright: 2025
Version: 2.0.2