Skip to main content

Quizzes

API endpoints related to quizzing

POST /quizzes/getQuizzes

Gets data for all quizzes, paginated, which can be searched, filtered, and sorted

POST /quizzes/questions

Update quiz questions if a question already exists for the given learnosity_question_uid then just update the title. Otherwise create a question.

POST /quizzes

Create a new Quiz

POST /quizzes/import

Creates a new Quiz from a SurveyJS JSON output

GET /quizzes/:quizid

Gets the SurveyJS readable JSON for the provided `quizid`

POST /quizzes/delete

Deletes quiz and quiz revision for each valid quiz id provided

POST /quizzes/associations

Associate a Guide with one or more Quizzes

DELETE /quizzes/associations

Deletes one or more Guide Quiz associations. Admin and authors can delete Guide Quiz associations.

POST /quizzes/attempt

Creates a new Quiz Attempt

GET /quizzes/associations/:guideid

Gets all Quiz associations for the given guideid, or an empty array if the Guide hasn't been paired to a Quiz yet.

GET /quizzes/courseAssignments/:quizid

Gets all Courses assignments for the given quizid, or an empty array if the Quiz hasn't been paired to a Course yet.

GET /quizzes/passingScore/$course_stageid:int/$quizid:int

Gets the passing score of the course stage if specified, otherwise returns the default passing score from the quiz.

POST /quizzes/attach/guide

Create a new revision for the guide and save a new guide_quiz_revision with the new guide_revisionid and the current quiz_revisionid

POST /quizzes/sessions/save

Create a new session for the user with the given quizid if no session exists or update the response_json if a session already exists for the user with the given quizid

POST /quizzes/sessions/submit

Saves a quiz session once the quiz has been completed.

POST /quizzes/sessions/cancel

Cancel a session for the user with the given quizid, if no session exists return simply ok, if session exists update the cancelled and end_date

GET /quizzes/submissions/:sessionid

Returns the Quiz results for the given Quiz sessionid

GET /quizzes/sessions

Get all quiz sessions limited to what a user has access to. If admin: All sessions, if User: Their own sessions, and if Team Owner: Their own submissions and submissions for all team members

Copyright© 2019 Moddit