Adicionando workflow de realização de um exame

parent 61aa9d2a
This diff is collapsed.
paths:
'/assessments/{oid}':
get:
summary: 'Obtains the assessment'
responses:
'200':
description: 'Successfully received the assessment'
schema:
x-oad-type: reference
$ref: '#/definitions/Assessment'
x-oad-type: response
parameters:
-
name: oid
in: path
required: true
type: integer
format: int32
x-oad-type: parameter
x-oad-type: operation
'/assesments/{oid}/questions':
get:
summary: 'GEt questions from a given assessment'
responses:
'200':
description: 'Successfully recovered question(s) '
schema:
x-oad-type: reference
$ref: '#/definitions/Question'
x-oad-type: response
parameters:
-
name: oid
in: path
required: true
type: integer
format: int32
x-oad-type: parameter
-
name: oids
in: query
required: false
type: array
collectionFormat: csv
items:
type: integer
format: int32
x-oad-type: parameter
x-oad-type: operation
definitions:
QuestionType:
x-oad-type: integer
type: integer
title: 'Enumerator QuestionType'
description: 'Value that identifies the question as objective of subjective'
format: int32
enum:
- 2
- 1
ExamType:
x-oad-type: integer
type: integer
title: 'Enumerator ExamType'
description: 'Value that identifies the exam as objective only, subjective only or mixed'
format: int32
enum:
- 0
- 1
- 2
AssessmentType:
x-oad-type: integer
type: integer
title: 'Enumerator AssessmentType'
description: 'Value that identifies the exam as online or on site'
format: int32
enum:
- 0
- 1
QuestionCategory:
x-oad-type: object
type: object
title: QuestionCategory
description: 'Category for which the Question belongs'
properties:
label:
x-oad-type: string
type: string
title: Label
description: 'The label of the category'
oid:
x-oad-type: integer
type: integer
title: OID
description: 'The object persistence identification'
format: int32
readOnly: true
AssessmentStatus:
x-oad-type: integer
type: integer
title: AssessmentStatus
description: 'The current idication status of the assessment (there''s none in the moment...)'
format: int32
ScheduledEvent:
x-oad-type: object
type: object
title: ScheduledEvent
description: 'The begining and ending of the assessment'
properties:
oid:
x-oad-type: integer
type: integer
title: OID
description: 'The object identification'
format: int32
readOnly: true
startsAt:
x-oad-type: string
type: string
title: startsAt
description: 'The time of the begining of the assessment'
format: date-time
endsAt:
x-oad-type: string
type: string
title: endsAt
description: 'The time of the ending of the assessment'
format: date-time
Assessment:
x-oad-type: object
type: object
title: Assessment
description: 'The assessment'
properties:
status:
x-oad-type: reference
$ref: '#/definitions/AssessmentStatus'
readOnly: true
type:
x-oad-type: reference
$ref: '#/definitions/AssessmentType'
readOnly: true
schedule:
x-oad-type: reference
$ref: '#/definitions/ScheduledEvent'
readOnly: true
enforceSequence:
x-oad-type: boolean
type: boolean
title: enforceSequence
description: 'Boolean indicading if the assessment must enforce the exams to be done in it''s order'
location:
x-oad-type: string
type: string
title: location
exam:
x-oad-type: reference
$ref: '#/definitions/Exam'
ExamQuestionStatus:
x-oad-type: integer
type: integer
title: ExamQuestionStatus
description: 'Enumerator indicading if the exam is active or canceled'
format: int32
enum:
- 0
- 1
QuestionGroup:
x-oad-type: object
type: object
title: QuestionGroup
properties:
oid:
x-oad-type: integer
type: integer
title: OID
format: int32
readOnly: true
label:
x-oad-type: string
type: string
title: label
weight:
x-oad-type: integer
type: integer
title: weight
format: int32
ExamQuestion:
x-oad-type: object
type: object
title: ExamQuestion
properties:
group:
x-oad-type: integer
type: integer
title: group
description: 'Group for which this given *ExamQuestion* belongs in this *Exam*'
format: int32
readOnly: true
order:
x-oad-type: integer
type: integer
title: order
description: 'Position of this *ExamQuestion* in this *Exam*'
format: int32
weight:
x-oad-type: integer
type: integer
title: weight
description: 'Weight associated with this *ExamQuestion*'
format: int32
question:
x-oad-type: integer
type: integer
title: 'question oid'
description: 'The oid of the question that this *ExamQuestion* represents'
format: int32
readOnly: true
Exam:
x-oad-type: object
type: object
title: Exam
description: 'The gathering of multiple *ExamQuestion* with their respective *QuestionGroup*'
properties:
type:
x-oad-type: reference
$ref: '#/definitions/ExamType'
readOnly: true
label:
x-oad-type: string
type: string
title: label
cover:
x-oad-type: string
type: string
title: cover
description: 'An html t be embedded'
groups:
x-oad-type: array
type: array
title: groups
description: 'The possible *QuestionGroup* of this *Exam*'
items:
x-oad-type: reference
$ref: '#/definitions/QuestionGroup'
questions:
x-oad-type: array
type: array
title: questions
description: 'All the *ExamQuestions* of this *Exam*'
items:
x-oad-type: reference
$ref: '#/definitions/ExamQuestion'
Alternative:
x-oad-type: object
type: object
title: Alternative
description: 'Alternative for a *ObjectiveQuestion*'
properties:
order:
x-oad-type: integer
type: integer
title: order
format: int32
statement:
x-oad-type: string
type: string
title: statement
Question:
x-oad-type: object
type: object
title: Question
properties:
categories:
x-oad-type: array
type: array
title: categories
items:
x-oad-type: reference
$ref: '#/definitions/QuestionCategory'
uniqueItems: true
type:
x-oad-type: reference
$ref: '#/definitions/QuestionType'
readOnly: true
statement:
x-oad-type: string
type: string
title: statement
answerKey:
x-oad-type: allOf
allOf:
-
x-oad-type: string
type: string
title: answerKey
description: 'Answer key for a *Subjective Question*'
-
x-oad-type: integer
type: integer
title: oid
description: 'OID of the correct alternative in an *Objective Question*'
format: int32
alternatives:
x-oad-type: array
type: array
title: alternatives
items:
x-oad-type: reference
$ref: '#/definitions/Alternative'
uniqueItems: true
info:
title: 'ExamPlayer API'
version: 0.1.0
description: 'The API to be consumed by the ExamPlayer'
contact:
name: 'Bernardo Sunderhus'
email: bernardosunderhus@evologica.com.br
url: 'https://gitlab.dev.evologica.com.br/Competify'
license:
name: MIT
basePath: /
consumes:
- application/json
produces:
- application/json
swagger: '2.0'
# Processo de reaização de um assessment
1. A aplicação deverá adquirir o `assessment` a ser realizado através da rota `/assessment/{assessmentId}`
```json
{
"enforceSequence": false,
"locationType": 0,
"oid": 0,
"status": 0,
"submitterType": 0,
"type": 0,
"schedule": {
"startsAt": "date-time",
"endsAt": "date-time"
},
"exam": {
"type": 0,
"label": "test",
"cover": "<gateemeele>oi</gateemeele>",
"groups": [
{
"label": "group 1",
"weight": 0,
"oid": 0
}
],
"questions": [
{
"oid": 0,
"order": 0,
"weight": 0,
"group": 0,
"status": 0,
"question": 0
}
]
}
}
```
2. Com o assessment em mãos, a aplicação é capaz de liberar o começo do exame, criando assim um `draft`, por um método POST na rota `assessments/{assessmentId}/drafts`.
```json
{
"oid": 0,
"answers": [],
"assessment": 0,
"finishedAt": "date-time",
"lastUpdate": "date-time",
"startedAt": "date-time",
"status": 0,
"type": 0,
"uploadUri": ""
}
```
3. Para exibir uma nova questão, a aplicação deverá buscar a mesma através da rota `/assessments/{assessmentId}/questions/{questionId}`
4. Assim que uma questão for realizada, um novo POST na rota `assessments/{assessmentId}/drafts` deverá ser realizado passando a nova questão
```json
{
"oid": 0,
"answers": [
{
"choice": 0,
"freeText": "",
"question": 0
}
],
"assessment": 0,
"finishedAt": "date-time",
"lastUpdate": "date-time",
"startedAt": "date-time",
"status": 0,
"type": 0,
"uploadUri": ""
}
```
5. Ao finalizar a prova o `draft` deve ser convertido em `submission` através do método POST na rota `/assessments/{assessmentId}/submissions`
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