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/:quizRevisionid

Gets the SurveyJS readable JSON for the provided `quiz_revisionid`

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