Skip to content

Feature Requirements

JB Tellez edited this page Jul 18, 2018 · 3 revisions

Quiz

/api/v1/quiz/12 The # is the day of class that we're in. Expect 5 random questions from days 1 through ##-1 Output expected:

  {
      count:5,
      results: [
         {
           question: "How many feet do dogs have?",
           answers: [1,2,3,4,5,6],
           correctAnswer: 4,
         },
         ...
      ]
  }

models/quiz.js Fetch from guide repo a list of all day folders Fetch /quiz.json from each day's folder

Code Runner

POST /api/vi/code/run Send code from front end, day, filename Run it Save it to the right day's demo folder at GH (ACP) Send back and object with the output POST: { day: 22, filename: 'arraysplit', code: '....' }

GET /api/v1/code/12?name=arraysplit Go to GH for that day, get the "arraysplit.js" from the repo Send back and object: { day: 22, filename: 'arraysplit', code: '....' }

models/code.js constructor(payload) save() "run" do the run thing And send it out to GitHub

fetchOne() gets the specified code from GitHub

Randomizer / Student Feature

/api/v1/roster Give the whole class

{ count: 16, results: [ {} ] }

/api/v1/roster/pairs Give the pairs

  {
      count: 8,
      results: [
         [person1,person2],
         ...
      ]
   }

/api/v1/roster/random Give the pairs { count: 1, results: [ "person" ] }

Dashboard

CRUD ROUTE for the classes /api/v1/classes GET/POST/PUT/DELETE { classCode: '401n5', canvasClassId: '8fds9adsu', githubRepo: 'git@github.com/.../' }

Clone this wiki locally