Skip to content

Commit 97ecebe

Browse files
committed
QAGDEV-723 - [FE] Прикрепления тестов к заданиям v5
1 parent 0ea7a3a commit 97ecebe

16 files changed

+1304
-129
lines changed

src/api/graphql/test/send-test-answer-to-review.graphql

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,16 @@ mutation sendTestAnswerToReview($attemptId: ID!) {
44
status
55
answer
66
lecture {
7-
id
87
subject
98
}
109
training {
11-
id
1210
name
1311
}
1412
student {
15-
id
1613
firstName
1714
lastName
1815
}
1916
mentor {
20-
id
2117
firstName
2218
lastName
2319
}
@@ -27,8 +23,6 @@ mutation sendTestAnswerToReview($attemptId: ID!) {
2723
startTime
2824
endTime
2925
result
30-
successfulCount
31-
errorsCount
3226
}
3327
}
3428
}

src/api/graphql/test/start-test.graphql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ mutation startTest($lectureId: ID!, $trainingId: ID!) {
22
startTest(lectureId: $lectureId, trainingId: $trainingId) {
33
id
44
startTime
5-
endTime
65
successfulCount
76
errorsCount
87
result

src/api/graphql/test/test-attempt.graphql renamed to src/api/graphql/test/test-attempt-detail.graphql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
query testAttempt($id: ID!) {
2-
testAttempt(id: $id) {
1+
query testAttemptDetail($id: ID!) {
2+
testAttemptForAdmin(id: $id) {
33
id
44
startTime
55
endTime

src/api/graphql/test/test-attempt-questions.graphql

Lines changed: 0 additions & 21 deletions
This file was deleted.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
query testAttemptsAll($offset: Int!, $limit: Int!, $sort: TestAttemptSort) {
2+
testAttemptsAll(offset: $offset, limit: $limit, sort: $sort) {
3+
items {
4+
id
5+
startTime
6+
endTime
7+
successfulCount
8+
errorsCount
9+
result
10+
}
11+
offset
12+
limit
13+
totalElements
14+
}
15+
}

src/api/graphql/test/test-attempts.graphql

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/api/schema.graphql

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,13 @@ type Query {
195195
student TestAttempt section
196196
"""
197197
testAttempts(lectureId: ID!, trainingId: ID!): [TestAttemptShortDto]
198+
testAttemptsAll(
199+
offset: Int!
200+
limit: Int!
201+
sort: TestAttemptSort
202+
): TestAttemptsDto
198203
testAttempt(id: ID!): TestAttemptDto
204+
testAttemptForAdmin(id: ID!): TestAttemptDto
199205
testAttemptQuestions(attemptId: ID!): [TestAttemptQuestionResultDto]
200206
"""
201207
commentHomeWork section
@@ -659,6 +665,26 @@ type TestAttemptDto {
659665
testAttemptQuestionResults: [TestAttemptQuestionResultDto]
660666
}
661667

668+
type TestAttemptsDto {
669+
items: [TestAttemptShortDto]
670+
offset: Int
671+
limit: Int
672+
totalElements: Long
673+
}
674+
675+
input TestAttemptSort {
676+
field: TestAttemptSortField
677+
order: Order
678+
}
679+
680+
enum TestAttemptSortField {
681+
START_TIME
682+
END_TIME
683+
SUCCESSFUL_COUNT
684+
ERRORS_COUNT
685+
RESULT
686+
}
687+
662688
type TestAttemptQuestionResultDto {
663689
testQuestion: TestQuestionDto
664690
result: Boolean

0 commit comments

Comments
 (0)