66 HomeworkViewModel , StatisticsCourseHomeworksModel ,
77 StatisticsCourseMatesModel ,
88 StatisticsCourseMeasureSolutionModel
9- } from "../../../ api/ " ;
9+ } from "@/ api" ;
1010import ApiSingleton from "../../../api/ApiSingleton" ;
1111import HelpPopoverChartInfo from './HelpPopoverChartInfo' ;
1212import StudentCheckboxList from "./StudentCheckboxList" ;
@@ -15,6 +15,7 @@ import StudentPunctualityChart from './StudentPunctualityChart';
1515import NameBuilder from "../../Utils/NameBuilder" ;
1616import { DotLottieReact } from "@lottiefiles/dotlottie-react" ;
1717import { StudentsRadarChart } from "./StudentsRadarChart" ;
18+ import { appBarStateManager } from "@/components/AppBar" ;
1819
1920interface IStudentStatsChartState {
2021 isFound : boolean ;
@@ -87,6 +88,8 @@ const StudentStatsChart: React.FC = () => {
8788
8889 useEffect ( ( ) => {
8990 setCurrentState ( )
91+ appBarStateManager . setContextAction ( { actionName : "К курсу" , link : `/courses/${ courseId } /stats` } )
92+ return ( ) => appBarStateManager . reset ( )
9093 } , [ ] )
9194
9295 useEffect ( ( ) => {
@@ -100,19 +103,6 @@ const StudentStatsChart: React.FC = () => {
100103 return student . name + ' ' + student . surname ;
101104 }
102105
103- const renderGoBackToCoursesStatsLink = ( ) => {
104- return (
105- < Link
106- to = { `/courses/${ state . course . id } /stats` }
107- style = { { color : '#212529' } }
108- >
109- < Typography >
110- Назад к курсу
111- </ Typography >
112- </ Link >
113- )
114- }
115-
116106 const tasks = state . homeworks . flatMap ( h => h . tasks ?? [ ] )
117107 const tasksAmount = tasks . length
118108 const tasksWithDeadlineAmount = state . tasksWithDeadline . length
@@ -139,9 +129,6 @@ const StudentStatsChart: React.FC = () => {
139129 < sup style = { { color : "#2979ff" } } > бета</ sup >
140130 </ Typography >
141131 </ Grid >
142- < Grid item >
143- { isLoggedIn && renderGoBackToCoursesStatsLink ( ) }
144- </ Grid >
145132 </ Grid >
146133 { state . isSelectionMode &&
147134 < Grid item >
@@ -161,6 +148,8 @@ const StudentStatsChart: React.FC = () => {
161148 selectedStudents = { selectedStudents }
162149 homeworks = { state . homeworks }
163150 solutions = { state . solutions }
151+ averageStudent = { state . averageStudent }
152+
164153 />
165154 </ Grid > }
166155 < Grid xs = { 12 } item >
0 commit comments