Moodle Plugins directory: kwtSMS - OTP and SMS Notifications | Moodle.org
kwtSMS - OTP and SMS Notifications
Overview
kwtSMS Notifications connects your Moodle site to the https://www.kwtsms.com to send SMS messages when key events happen. Students get notified about enrollments, grades, and completions. Admins get alerted when new users register.
All SMS sending runs in test mode by default, so you can verify everything works before going live.
Supported events
The plugin listens to 7 Moodle events and sends SMS automatically:
Student notifications:
- User enrolled in a course
- User unenrolled from a course
- Grade posted for a student
- Course completed by a student
- Quiz submitted by a student
- Assignment submitted by a student
Admin alerts:
- New user registered on the site. Each event can be toggled on or off individually from the Integrations tab.
Bilingual template system
Every event has its own SMS template with both English and Arabic versions. Templates support placeholders like {firstname}, {coursename}, and {grade} that get replaced with real values at send time.
The plugin automatically picks the right language based on the recipient's Moodle profile language. Templates can be edited inline from the admin UI, and reset to factory defaults at any time.
A live character counter shows SMS page count as you type (160 chars for English, 70 for Arabic per page).
SMS logging
Every send attempt is logged with full detail: recipient phone, message text, event type, status (sent, failed, or skipped), skip reason, credits used, API response, and error codes. Logs can be filtered by status, event type, phone number, and date range. Export filtered results as CSV.
Phone number handling
The plugin normalizes phone numbers automatically: converts Arabic-Indic digits to Latin, strips formatting characters, removes leading zeros, and prepends the configured country code. Numbers are validated, deduplicated, and checked against your account's coverage list before sending.
Gateway management
Connect to kwtSMS with your API credentials directly from the Gateway tab. The plugin caches your balance, sender IDs, and coverage data. A daily scheduled task refreshes this data and sends a low balance alert to admin phones when credits drop below your configured threshold.
Message processing
Outgoing messages are cleaned automatically: HTML tags stripped, emoji removed, invisible Unicode characters removed, and Arabic-Indic digits converted to Latin. This keeps SMS content compatible across all carriers.
Requirements
- Moodle 4.3 or later
- PHP 8.1 or later
- A kwtSMS account (https://www.kwtsms.com/account/signup/)
- SMS credits loaded in your kwtSMS account
Installation
1. Download and extract to local/kwtsms/
2. Visit Site Administration to trigger the install
3. Go to Site Administration > Plugins > Local plugins > kwtSMS Notifications
4. Connect your kwtSMS account from the Gateway tab
5. Configure settings and enable events from the Settings and Integrations tabs
Links
- https://www.kwtsms.com
- https://github.com/boxlinknet/kwtsms-moodle
- https://github.com/boxlinknet/kwtsms-moodle/issues
and addressed all the issues created.