Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wonder Learning

A front-end e-learning platform: a course catalog, video lessons, progress tracking and a short quiz per course. No backend, no build step and no dependencies. Lessons are public YouTube videos, credited to their creators.

Features

  • Catalog: rendered from one data file (js/course-data.js), with category filters and free-text search across course titles, descriptions, lesson titles and authors. Filters and search are kept in the URL.
  • Course page: a lesson list beside a YouTube player (iframe API). Clicking a lesson switches video without reloading the page.
  • Progress: a lesson is marked done automatically when its video ends, or by hand. Progress bars on the catalog and course page.
  • Resume: the playback position is saved every 5 seconds, so a lesson reopens where you stopped.
  • Continue where you left off: shown on the catalog for the first unfinished course.
  • Knowledge check: a 3-question quiz per course, unlocked when every lesson is done. The best score is saved.
  • Robust storage: progress lives in localStorage under wl-progress. Reads go through JSON.parse inside try/catch, and storage errors (private mode, full quota) are tolerated.
  • Fallback: if the YouTube API cannot load, the page offers a direct link to the video.
  • Accessible: real buttons, aria-pressed filters, a labelled progress bar, aria-current on the playing lesson, and text set with textContent only.

Run it

npx serve .        # or: python3 -m http.server

Use a local server, not file://. The YouTube iframe API talks to the page with postMessage, which does not work from a null origin.

Test it

node --test test/

The unit tests cover per-course progress, duplicate-proof completion, undoing a lesson, corrupt and old-format data, storage that throws, resume points, best quiz score, percentages, quiz scoring, filtering and search, and the shape of the catalog data.

The repository was also tested end to end in Chrome: filters, search, the YouTube player loading, completion, quiz unlocking and scoring, persistence across reloads, the "not found" page, phone width, and a real video playing to the end and marking its lesson done.

Data shape

// localStorage['wl-progress']
{
  "git-101": {
    "done": ["git-101-l1", "git-101-l2"],
    "quiz": 3,
    "resume": { "git-101-l2": 312 }
  }
}

Add a course

Add an object to courses in js/course-data.js with an id, title, category, level, description, lessons (each with id, title, videoId, author) and a quiz. Nothing else changes.

Licence

MIT for the code. Videos belong to their creators and are embedded with YouTube's player.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages