southernsun / yt-quiz-lms

YouTube Quiz / LMS library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

YouTube Quiz / LMS Library

Most LMS (Learning Management Systems) are too complex or expensive to use for a single video with a couple of questions. Using the YouTube API, I developed a LMS where you can specify which YouTube video to use and which questions to ask at which point within the video.

How to use

  1. In index.htm set the videoId to the id of the YouTube video you want to use.
  2. Update js/questions.js with your own questions and answers.
  3. Setup an API Endpoint and configure your endpoint in js/yt-quiz.js SendResult() method.
  4. Send out invites to users with an additional parameter to the url to keep track of all the users that did your quiz. Parameter to use: ?email=, ex. http://example.com/index.htm?email=a.friend@example.com
  • done!

Example

http://bjorn.kuiper.nu/upload/blog/20200207/index.htm?email=a.friend@example.com

What is tracked...

The user's e-mail address, the number of questions answered, the number of questions answered correctly and the total percentage of the video that the user exactly watched.

Example of MVC API Endpoint

       public class Model
       {
           public string email { get; set; }
           public int total { get; set; }
           public int correct { get; set; }
           public double percentage { get; set; }
           public double viewed { get; set; }
       }

       [System.Web.Mvc.HttpPost]

       public async Task<JsonResult> QuizResult(Model model)
       {
       } 

About

YouTube Quiz / LMS library

License:GNU Lesser General Public License v3.0


Languages

Language:JavaScript 62.6%Language:HTML 26.1%Language:CSS 11.4%