Verified Commit c499cf0d authored by Jonas-Ian Kuche's avatar Jonas-Ian Kuche
Browse files

Add result statistics


Signed-off-by: Jonas-Ian Kuche's avatarJonas-Ian Kuche <jonas-ian.kuche@mni.thm.de>
parent 7259d007
......@@ -778,6 +778,33 @@ paths:
$ref: '#/components/responses/ForbidenError'
'404':
$ref: '#/components/responses/NotFoundError'
/api/sessions/{sessionID}/resultStatstistics:
get:
operationId: getResultStatstistics
summary: Gets the result statistics for the docent
tags:
- session
parameters:
- $ref: '#/components/parameters/SessionID'
security:
- userBearer: []
responses:
'200':
description: The questions with statistics
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Statistics'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbidenError'
'404':
$ref: '#/components/responses/NotFoundError'
/api/courses:
post:
operationId: createCourse
......@@ -1571,6 +1598,206 @@ components:
description: Must be greather then min
example: 5
required: [question, min, max]
Statistics:
properties:
number:
type: integer
format: int32
example: 0
type:
type: string
enum: [multipleChoice, open, sort, pairs, blankText, wordCloud, rating]
example: multipleChoice
question:
anyOf:
- $ref: '#/components/schemas/StatisticsMultipleChoice'
- $ref: '#/components/schemas/StatisticsOpen'
- $ref: '#/components/schemas/StatisticsSort'
- $ref: '#/components/schemas/StatisticsPairs'
- $ref: '#/components/schemas/StatisticsBlankText'
- $ref: '#/components/schemas/StatisticsWordCloud'
- $ref: '#/components/schemas/StatisticsRating'
required: [type, question]
StatisticsMultipleChoice:
properties:
question:
type: string
maxLength: 256
example: "What is OpenApi?"
instantFeedback:
type: boolean
example: true
answers:
type: object
properties:
options:
type: array
items:
type: object
properties:
answer:
type: string
maxLength: 64
correct:
type: boolean
required: [answer, correct]
possibleAnswers:
type: integer
format: int32
example: 1
minimum: 1
required: [options, possibleAnswers]
example:
question: "What is OpenApi?"
answerType: choice
answers:
options:
- answer: "an API description format for REST APIs"
correct: true
- answer: "2th answer"
correct: false
- answer: "3th answer"
correct: false
- answer: "4th answer"
correct: false
possibleAnswers: 1
stats:
type: array
items:
type: number
example: [80, 10, 5, 5]
StatisticsOpen:
properties:
question:
type: string
maxLength: 256
example: "What is OpenAPI?"
stats:
type: array
items:
type: string
StatisticsSort:
properties:
question:
type: string
maxLength: 256
example: "Sort the words alphabetically"
answers:
type: array
items:
type: string
maxLength: 64
example: ["Apple", "Banana", "Xylophone", "Zebra"]
stats:
type: object
properties:
correct:
type: number
example: 80
incorrect:
type: number
example: 20
StatisticsPairs:
properties:
question:
type: string
maxLength: 256
example: "Find matching pairs"
answers:
type: array
items:
type: array
items:
type: string
maxLength: 64
minItems: 2
maxItems: 2
example:
- ["Apple", "Bannana"]
- ["Bus", "Train"]
- ["Coffe", "Tea"]
stats:
type: object
properties:
correct:
type: number
example: 80
incorrect:
type: number
example: 20
StatisticsBlankText:
properties:
question:
type: string
maxLength: 256
example: "Fill in the blanks"
text:
type: array
items:
type: string
maxLength: 1024
example:
- "The OpenAPI Specification, originally known as the "
- " Specification, is a specification for machine-readable interface files for describing, producing, consuming, and visualizing RESTful web services. It became a separate project in "
- ", overseen by the OpenAPI Initiative, an open-source collaboration project of the "
- "."
blanks:
type: array
items:
type: string
maxLength: 64
example: ["Swagger", "2016", "Linux Foundation"]
stats:
type: object
properties:
correct:
type: number
example: 80
incorrect:
type: number
example: 20
StatisticsWordCloud:
properties:
question:
type: string
maxLength: 256
example: "Name cities in Germany"
answers:
type: object
properties:
max:
type: number
example: 10
description: The maximum number of words a session can submit to the word cloud
stats:
type: object
example:
Gießen: 20
Marburg: 10
Frankfurt: 40
Munich: 60
Berlin: 90
StatisticsRating:
properties:
question:
type: string
maxLength: 256
example: "How much do you like this API-Documentation?"
answers:
type: object
properties:
min:
type: number
example: 0
max:
type: number
description: Must be greather then min
example: 5
stats:
type: array
items:
type: number
example: [1, 2, 4, 10, 2]
Answer:
anyOf:
- type: array
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment