GitLab wurde aktualisiert. Dank regelmäßiger Updates bleibt das THM GitLab sicher und Sie profitieren von den neuesten Funktionen. Vielen Dank für Ihre Geduld.

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

Update course stats routes


Signed-off-by: Jonas-Ian Kuche's avatarJonas-Ian Kuche <jonas-ian.kuche@mni.thm.de>
parent 811c06ef
......@@ -784,23 +784,7 @@ paths:
content:
application/json:
schema:
type: object
properties:
participantCount:
type: integer
format: int32
completeCount:
type: integer
format: int32
50pCorrect:
type: integer
format: int32
75pCorrect:
type: integer
format: int32
100pCorrect:
type: integer
format: int32
$ref: '#/components/schemas/SessionStatistic'
example:
participantCount: 100
completeCount: 90
......@@ -1355,7 +1339,7 @@ paths:
$ref: '#/components/responses/ForbidenError'
'404':
$ref: '#/components/responses/NotFoundError'
/api/courses/{courseID}/stats:
/api/courses/{courseID}/stats/user:
get:
operationId: myCourseStats
summary: The user Statistics for the course
......@@ -1393,7 +1377,7 @@ paths:
$ref: '#/components/responses/ForbidenError'
'404':
$ref: '#/components/responses/NotFoundError'
/api/courses/{courseID}/overview:
/api/courses/{courseID}/stats/overview:
get:
operationId: courseOverview
summary: A overview of users and session for the docent
......@@ -1439,7 +1423,44 @@ paths:
$ref: '#/components/responses/ForbidenError'
'404':
$ref: '#/components/responses/NotFoundError'
/api/courses/{courseID}/stats/sessions:
get:
operationId: coursesSessionStatistics
summary: Gets an overview of all sessions in this course
tags:
- session
parameters:
- $ref: '#/components/parameters/CourseID'
security:
- userBearer: []
responses:
'200':
description: A statistical overview of all sessions in this course
content:
application/json:
schema:
type: array
items:
type: object
properties:
session:
$ref: '#/components/schemas/Session'
stats:
$ref: '#/components/schemas/SessionStatistic'
example:
participantCount: 100
completeCount: 90
50pCorrect: 80
75pCorrect: 40
100pCorrect: 10
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/UnauthorizedError'
'403':
$ref: '#/components/responses/ForbidenError'
'404':
$ref: '#/components/responses/NotFoundError'
/api/users/me:
get:
operationId: aboutMe
......@@ -2288,6 +2309,24 @@ components:
type: integer
format: int32
example: 6
SessionStatistic:
type: object
properties:
participantCount:
type: integer
format: int32
completeCount:
type: integer
format: int32
50pCorrect:
type: integer
format: int32
75pCorrect:
type: integer
format: int32
100pCorrect:
type: integer
format: int32
parameters:
QuizID:
name: quizID
......
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