Skip to content

CNS Courseware LMS

Full Stack Engineering

CNS Courseware is a Moodle 5.1 platform selling course materials to Nigerian university students, with 500+ active users. I built a custom catalogue driven by course fields, Paystack enrolment, a membership plugin with trial and subscription states, signed webhooks, and nightly expiry, plus 24 Bash release scripts run through npm.

How it’s built

CNS Courseware LMS · Moodle 5.1 courseware platform for Nigerian university students (cns.com.ng)

CNS Courseware is a Moodle 5.1 site that sells course materials to Nigerian university students. I built a custom theme on a ThemesAlmond base, a catalogue that drives previews and checkout from course custom fields, Paystack enrolment, and a membership plugin with a trial and subscription state machine, signed webhooks and a nightly expiry task. All 71 commits are mine, and 24 Bash scripts run behind npm commands for deployment.

custom local plugins plus 1 custom theme
3
membership tables
4
lines of custom plugin PHP
~6,200
release and ops shell scripts
24
commits, all mine
71

Technology and what it does here

Moodle 5.1 (PHP)
Base LMS, public/version.php reports 5.1.4; code under public/ per 5.1 layout
Paystack
Course purchase and membership payments, server-side verify, HMAC-signed webhook
Moodle custom fields
Course price stored as customfield_data drives catalogue, preview and amount checks
Moodle scheduled tasks
Expire_subscriptions runs daily at 02:15; notify_new_course and blog subscriber emails
Mustache + SCSS
Theme_cns_theme on Boost: navbar, checkout, course overview templates; 11 CNS SCSS files
Bash + npm scripts
Deploy, db/file sync, cron install, self-enrol rollout, PDF embedding, seeding
Nginx + PHP-FPM
Templated vhost with HTTPS redirect

Implementation details

  • The Paystack callback re-verifies the reference server side and compares the paid kobo amount to the course price custom field before enrolling.
  • Membership is a state machine (none, trial, active, expired) where trial or active members get unlimited access and others get a free quota of N courses.
  • Webhook payloads are checked with verify_webhook_signature against the x-paystack-signature header.
  • A scheduled task expires lapsed subscriptions nightly.

System architecture

The public catalogue uses Moodle’s course data. The learner’s access path determines whether the platform can enrol them directly or must verify a payment first.

Drag to rotate

Course discovery and free access

  1. Passes to the next component: Course metadata
  2. Passes to the next component: Free access

Paid courses and memberships

  1. Passes to the next component: Payment reference
  2. Passes to the next component: Verified payment

System connections

Decision branches

Component details

Project screenshots

CNS Courseware homepage with course search and links to browse coursesOpen full-size screenshot in a new tab
The public CNS Courseware homepage gives learners a starting point for finding courses.

Results and testing

  • One learner workflow across the stack

    The source traces course fields into the public preview and checkout, then follows payment verification into the Moodle enrolment API and confirmation email.

  • A separate membership lifecycle

    The membership plugin records pending references, checks incoming webhook signatures, extends the access window, and expires it through a scheduled task.

  • Next engineering milestone

    Bind each payment to a server-created order and make the access grant safe to retry. Exercise duplicate notifications, mismatched orders, and a failed enrolment after a successful charge with local fixtures.

From Catalogue to Course

Learners needed to understand what a course included and what it cost before enrolling. I built those screens from Moodle’s course records so staff could maintain the underlying content in one place.

  • Build course previews and enrolment paths

    I built the catalogue plugin, course preview, and checkout. Moodle custom fields supplied the price and duration, and the preview showed the course structure. Free courses used Moodle’s enrolment API. Paid courses verified the Paystack transaction on the server before calling the enrolment plugin.

  • Adapt the learner interface

    I customized the existing Almondb theme on Moodle’s Boost foundation with CNS navigation, course layouts, and checkout templates. I added an inline PDF.js reader with a fullscreen option for learners reading course materials on smaller screens.

Membership and Platform Operations

Membership added a second access path. I gave it its own payment records, trial and expiry rules, and administrative workflow within Moodle.

  • Manage subscriptions and payment callbacks

    I added configurable trial and free course allowances, recorded pending subscription payments before redirecting to Paystack, and built a signed webhook to process successful charges. A scheduled Moodle task marks expired memberships and the course entry hook applies the access rules.

  • Automate migrations and scheduled work

    I wrote tooling to migrate course records and stored files, rebuild category paths, and run Moodle upgrades and cache refreshes. I also added cron setup and diagnostics that check the scheduler and run the Moodle CLI task runner.

Technologies

  • Moodle 5.1
  • PHP
  • Mustache
  • SCSS
  • Paystack
  • Nginx
  • Bash

Next project · AI/ML Engineer

Sigmant

Portfolio assistant

Gabriel’s projects, experience, and research