File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
src/data/services/lms/hooks Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ export const useORAConfigData = (): types.ORAConfig => (
21
21
data . useORAConfig ( ) . data
22
22
) ;
23
23
24
+ export const usePrompts = ( ) => useORAConfigData ( ) . prompts ;
25
+
24
26
export const useSubmissionConfig = ( ) : types . SubmissionConfig => (
25
27
useORAConfigData ( ) . submissionConfig
26
28
) ;
@@ -31,6 +33,24 @@ export const useAssessmentStepConfig = (): types.AssessmentStepConfig => (
31
33
32
34
export const useRubricConfig = ( ) : types . RubricConfig => useORAConfigData ( ) . rubric ;
33
35
36
+ export const useEmptyRubric = ( ) => {
37
+ const rubric = useRubricConfig ( ) ;
38
+ const out = {
39
+ optionsSelected : rubric . criteria . reduce (
40
+ ( obj , curr ) => ( { ...obj , [ curr . name ] : null } ) ,
41
+ { } ,
42
+ ) ,
43
+ criterionFeedback : { } ,
44
+ overallFeedback : '' ,
45
+ } ;
46
+ rubric . criteria . forEach ( criterion => {
47
+ if ( criterion . feedbackEnabled ) {
48
+ out . criterionFeedback [ criterion . name ] = '' ;
49
+ }
50
+ } ) ;
51
+ return out ;
52
+ } ;
53
+
34
54
export const useLeaderboardConfig = ( ) : types . LeaderboardConfig => useORAConfigData ( ) . leaderboardConfig ;
35
55
36
56
export const usePageDataStatus = ( ) => {
You can’t perform that action at this time.
0 commit comments