File tree Expand file tree Collapse file tree 5 files changed +42
-2
lines changed
settings/activity/steps/results Expand file tree Collapse file tree 5 files changed +42
-2
lines changed Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ export const DEFAULT_BOT_USERNAME = 'GraaspBot';
5151export const SHORT_TIME_LIMIT = 10 ; // seconds
5252export const DEFAULT_LANG = 'en' ;
5353
54- export const DEFAULT_EVALUATION_TYPE = EvaluationType . Vote ;
54+ export const DEFAULT_EVALUATION_TYPE = EvaluationType . None ;
5555
5656export const HIGHLIGHT_RESPONSE_TIME_MS = 2000 ;
5757
Original file line number Diff line number Diff line change 11export enum EvaluationType {
2+ None = 'none' ,
23 Rate = 'rate' ,
34 Vote = 'vote' ,
45 Rank = 'rank' ,
Original file line number Diff line number Diff line change 1+ import { FC } from 'react' ;
2+ import Grid from '@mui/material/Grid' ;
3+ import Response from '@/modules/common/response/Response' ;
4+ import Stack from '@mui/material/Stack' ;
5+ import { useActivityContext } from '../context/ActivityContext' ;
6+ import ExportResponsesButton from '../common/ExportRepsonsesButton' ;
7+
8+ interface NoEvaluationResultsProps { }
9+
10+ const NoEvaluationResults : FC < NoEvaluationResultsProps > = ( ) => {
11+ const { allResponses } = useActivityContext ( ) ;
12+ return (
13+ < Stack
14+ direction = "column"
15+ justifyItems = "center"
16+ alignItems = "center"
17+ spacing = { 2 }
18+ >
19+ < Grid container spacing = { 2 } >
20+ { allResponses
21+ ? allResponses . map ( ( response ) => (
22+ < Grid item key = { response . id } xl = { 2 } sm = { 4 } xs = { 6 } >
23+ < Response response = { response } />
24+ </ Grid >
25+ ) )
26+ : '' }
27+ </ Grid >
28+ < ExportResponsesButton responses = { allResponses } />
29+ </ Stack >
30+ ) ;
31+ } ;
32+
33+ export default NoEvaluationResults ;
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import Pausable from '../common/Pausable';
88import { RatingsProvider } from '../context/RatingsContext' ;
99import { VoteProvider } from '../context/VoteContext' ;
1010import VoteResults from './VoteResults' ;
11+ import NoEvaluationResults from './NoEvaluationResults' ;
1112
1213interface ResultsViewProps { }
1314
@@ -31,7 +32,7 @@ const ResultsView = (props: ResultsViewProps): JSX.Element => {
3132 </ RatingsProvider >
3233 ) ;
3334 default :
34- return null ;
35+ return < NoEvaluationResults /> ;
3536 }
3637 } ;
3738
Original file line number Diff line number Diff line change @@ -49,6 +49,11 @@ const EvaluationSettings: FC<ResultsSettingsProps> = ({
4949 handleResultsTypeChange ( event . target . value as EvaluationType ) ;
5050 } }
5151 >
52+ < FormControlLabel
53+ value = { EvaluationType . None }
54+ control = { < Radio /> }
55+ label = { tEvaluationType ( 'NONE' ) }
56+ />
5257 < FormControlLabel
5358 value = { EvaluationType . Rate }
5459 control = { < Radio /> }
You can’t perform that action at this time.
0 commit comments