Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
dc209b8
QAGDEV-723 - [FE] Прикрепления тестов к заданиям v2
nik1999777 Aug 15, 2025
042100b
Merge origin/develop: keep local test-container.tsx
nik1999777 Aug 15, 2025
869df43
Merge conflict
nik1999777 Aug 15, 2025
3800d22
QAGDEV-723 - [FE] Прикрепления тестов к заданиям v3
nik1999777 Aug 16, 2025
0ea7a3a
QAGDEV-723 - [FE] Прикрепления тестов к заданиям v4
nik1999777 Aug 17, 2025
97ecebe
QAGDEV-723 - [FE] Прикрепления тестов к заданиям v5
nik1999777 Aug 17, 2025
a7f5a77
QAGDEV-723 - [FE] Прикрепления тестов к заданиям v6
nik1999777 Aug 17, 2025
4dfedb9
Merge pull request #386 from qa-guru/QAGDEV-723
nik1999777 Aug 17, 2025
9150e87
QAGDEV-723 - [FE] Прикрепления тестов к заданиям v7
nik1999777 Aug 17, 2025
d736c33
Merge pull request #387 from qa-guru/QAGDEV-723
nik1999777 Aug 17, 2025
30281f7
QAGDEV-723 - [FE] Прикрепления тестов к заданиям v8
nik1999777 Sep 1, 2025
242fe0c
Merge pull request #388 from qa-guru/QAGDEV-723
nik1999777 Sep 1, 2025
99ee6d7
QAGDEV-723 - [FE] Прикрепления тестов к заданиям v9
nik1999777 Sep 7, 2025
264f9b9
Merge pull request #390 from qa-guru/QAGDEV-723
nik1999777 Sep 7, 2025
28e008b
QAGDEV-723 - [FE] Прикрепления тестов к заданиям v10
nik1999777 Sep 9, 2025
d9dec15
Merge pull request #391 from qa-guru/QAGDEV-723
nik1999777 Sep 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/api/graphql/lecture/lecture.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ query lecture($id: ID!) {
subject
description
content
testGroup {
id
testName
successThreshold
testQuestions {
id
text
testAnswers {
id
text
}
}
}
files {
id
homeWork
Expand Down
5 changes: 5 additions & 0 deletions src/api/graphql/lecture/update-lecture.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ mutation updateLecture($input: LectureInput!) {
description
content
contentHomeWork
testGroup {
id
testName
successThreshold
}
speakers {
id
firstName
Expand Down
3 changes: 3 additions & 0 deletions src/api/graphql/test/delete-test-answer.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mutation deleteTestAnswer($id: ID!) {
deleteTestAnswer(id: $id)
}
3 changes: 3 additions & 0 deletions src/api/graphql/test/delete-test-group.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mutation deleteTestGroup($id: ID!) {
deleteTestGroup(id: $id)
}
3 changes: 3 additions & 0 deletions src/api/graphql/test/delete-test-question.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
mutation deleteTestQuestion($id: ID!) {
deleteTestQuestion(id: $id)
}
6 changes: 6 additions & 0 deletions src/api/graphql/test/lecture-test.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
query lectureTest($lectureId: ID) {
lectureTest(lectureId: $lectureId) {
id
testName
}
}
28 changes: 28 additions & 0 deletions src/api/graphql/test/send-test-answer-to-review.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
mutation sendTestAnswerToReview($attemptId: ID!) {
sendTestAnswerToReview(attemptId: $attemptId) {
id
status
answer
lecture {
subject
}
training {
name
}
student {
firstName
lastName
}
mentor {
firstName
lastName
}
creationDate
testAttempts {
id
startTime
endTime
result
}
}
}
33 changes: 33 additions & 0 deletions src/api/graphql/test/send-test-answer.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
mutation sendTestAnswer(
$questionId: ID!
$attemptId: ID!
$testAnswerIds: [ID]!
) {
sendTestAnswer(
questionId: $questionId
attemptId: $attemptId
testAnswerIds: $testAnswerIds
) {
id
startTime
endTime
successfulCount
errorsCount
result
testAttemptQuestionResults {
testQuestion {
id
text
}
result
testAnswerResults {
testAnswer {
id
text
}
result
answer
}
}
}
}
9 changes: 9 additions & 0 deletions src/api/graphql/test/start-test.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
mutation startTest($lectureId: ID!, $trainingId: ID!) {
startTest(lectureId: $lectureId, trainingId: $trainingId) {
id
startTime
successfulCount
errorsCount
result
}
}
7 changes: 7 additions & 0 deletions src/api/graphql/test/test-answer-by-question.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
query testAnswerByQuestion($questionId: ID) {
testAnswerByQuestion(questionId: $questionId) {
id
text
correct
}
}
29 changes: 29 additions & 0 deletions src/api/graphql/test/test-attempt-detail.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
query testAttemptDetail($id: ID!) {
testAttemptForAdmin(id: $id) {
id
startTime
endTime
successfulCount
errorsCount
result
testAttemptQuestionResults {
testQuestion {
id
text
testAnswers {
id
text
}
}
result
testAnswerResults {
testAnswer {
id
text
}
result
answer
}
}
}
}
25 changes: 25 additions & 0 deletions src/api/graphql/test/test-attempt.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
query testAttempt($id: ID!) {
testAttempt(id: $id) {
id
startTime
endTime
successfulCount
errorsCount
result
testAttemptQuestionResults {
testQuestion {
id
text
}
result
testAnswerResults {
testAnswer {
id
text
}
result
answer
}
}
}
}
19 changes: 19 additions & 0 deletions src/api/graphql/test/test-attempts-all.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
query testAttemptsAll($offset: Int!, $limit: Int!, $sort: TestAttemptSort) {
testAttemptsAll(offset: $offset, limit: $limit, sort: $sort) {
items {
id
startTime
endTime
successfulCount
errorsCount
result
studentName
trainingName
lectureSubject
testGroupName
}
offset
limit
totalElements
}
}
10 changes: 10 additions & 0 deletions src/api/graphql/test/test-attempts-by-lecture.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
query testAttemptsByLecture($lectureId: ID!, $trainingId: ID!) {
testAttempts(lectureId: $lectureId, trainingId: $trainingId) {
id
startTime
endTime
successfulCount
errorsCount
result
}
}
10 changes: 10 additions & 0 deletions src/api/graphql/test/test-questions.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
query testQuestions {
testQuestions {
id
text
testAnswers {
id
text
}
}
}
15 changes: 15 additions & 0 deletions src/api/graphql/test/test-test-groups-by-id.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
query testTestGroupsById($id: ID) {
testTestGroupsById(id: $id) {
id
testName
successThreshold
testQuestions {
id
text
testAnswers {
id
text
}
}
}
}
7 changes: 7 additions & 0 deletions src/api/graphql/test/test-test-groups.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
query testTestGroups {
testTestGroups {
id
testName
successThreshold
}
}
7 changes: 7 additions & 0 deletions src/api/graphql/test/update-test-answer.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
mutation updateTestAnswer($input: TestAnswerInput!) {
updateTestAnswer(input: $input) {
id
text
correct
}
}
15 changes: 15 additions & 0 deletions src/api/graphql/test/update-test-group.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
mutation updateTestGroup($input: TestGroupInput!) {
updateTestGroup(input: $input) {
id
testName
successThreshold
testQuestions {
id
text
testAnswers {
id
text
}
}
}
}
10 changes: 10 additions & 0 deletions src/api/graphql/test/update-test-question.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
mutation updateTestQuestion($input: TestQuestionInput!) {
updateTestQuestion(input: $input) {
id
text
testAnswers {
id
text
}
}
}
34 changes: 34 additions & 0 deletions src/api/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,13 @@ type Query {
student TestAttempt section
"""
testAttempts(lectureId: ID!, trainingId: ID!): [TestAttemptShortDto]
testAttemptsAll(
offset: Int!
limit: Int!
sort: TestAttemptSort
): TestAttemptsDto
testAttempt(id: ID!): TestAttemptDto
testAttemptForAdmin(id: ID!): TestAttemptDto
testAttemptQuestions(attemptId: ID!): [TestAttemptQuestionResultDto]
"""
commentHomeWork section
Expand Down Expand Up @@ -647,6 +653,10 @@ type TestAttemptShortDto {
successfulCount: Int
errorsCount: Int
result: Boolean
studentName: String
trainingName: String
lectureSubject: String
testGroupName: String
}

type TestAttemptDto {
Expand All @@ -657,6 +667,30 @@ type TestAttemptDto {
errorsCount: Int
result: Boolean
testAttemptQuestionResults: [TestAttemptQuestionResultDto]
student: UserDto
training: TrainingDto
lecture: LectureInfoDto
testGroup: TestGroupDto
}

type TestAttemptsDto {
items: [TestAttemptShortDto]
offset: Int
limit: Int
totalElements: Long
}

input TestAttemptSort {
field: TestAttemptSortField
order: Order
}

enum TestAttemptSortField {
START_TIME
END_TIME
SUCCESSFUL_COUNT
ERRORS_COUNT
RESULT
}

type TestAttemptQuestionResultDto {
Expand Down
7 changes: 7 additions & 0 deletions src/features/admin-panel/admin-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { useResponsive } from "shared/hooks";
import UsersAdmin from "./users-admin";
import CourseAdmin from "./courses-admin";
import StatisticsAdmin from "./statistics-admin/statistics-admin";
import TestsAdmin from "./tests-admin";
import { StyledTabPanel, StyledTypography } from "./admin-panel.styled";

const AdminPanel: FC = () => {
Expand All @@ -37,6 +38,12 @@ const AdminPanel: FC = () => {
path: "/statistics",
component: StatisticsAdmin,
},
{
label: "Тесты",
value: "4",
path: "/tests",
component: TestsAdmin,
},
];

const currentRoute =
Expand Down
Loading