@capytale/meta-player 0.9.0 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/MetaPlayer.tsx +0 -2
- package/src/features/pedago/hooks.ts +7 -2
- package/src/types.ts +0 -1
package/package.json
CHANGED
package/src/MetaPlayer.tsx
CHANGED
|
@@ -55,7 +55,6 @@ const MetaPlayer: FC<MetaPlayerProps> = (props) => {
|
|
|
55
55
|
[props.antiCheatOptions],
|
|
56
56
|
);
|
|
57
57
|
const uiOptions: UIOptions = {
|
|
58
|
-
closePedagoByDefault: false,
|
|
59
58
|
noWorkflow: false,
|
|
60
59
|
noSaveForStudents: false,
|
|
61
60
|
...props.uiOptions,
|
|
@@ -65,7 +64,6 @@ const MetaPlayer: FC<MetaPlayerProps> = (props) => {
|
|
|
65
64
|
makeStore({
|
|
66
65
|
layout: {
|
|
67
66
|
...layoutInitialState,
|
|
68
|
-
isPedagoVisible: !uiOptions.closePedagoByDefault,
|
|
69
67
|
showWorkflow: !uiOptions.noWorkflow,
|
|
70
68
|
showSaveForStudents: !uiOptions.noSaveForStudents,
|
|
71
69
|
},
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
selectInstructions,
|
|
7
7
|
selectInstructionsType,
|
|
8
8
|
selectMode,
|
|
9
|
+
selectSharedNotesType,
|
|
9
10
|
} from "../activityData/activityDataSlice";
|
|
10
11
|
import {
|
|
11
12
|
selectIsGradingVisible,
|
|
@@ -22,6 +23,7 @@ export const usePedagoOptions = () => {
|
|
|
22
23
|
const hasGradingOrComments = useAppSelector(selectHasGradingOrComments);
|
|
23
24
|
const instructionsType = useAppSelector(selectInstructionsType);
|
|
24
25
|
const instructions = useAppSelector(selectInstructions);
|
|
26
|
+
const sharedNotesType = useAppSelector(selectSharedNotesType);
|
|
25
27
|
const hasNonEmptyInstructions = useMemo(() => {
|
|
26
28
|
if (instructionsType === "none" || !instructions) {
|
|
27
29
|
return false;
|
|
@@ -71,6 +73,7 @@ export const usePedagoOptions = () => {
|
|
|
71
73
|
return false;
|
|
72
74
|
}, [instructionsType, instructions]);
|
|
73
75
|
|
|
76
|
+
const hasSharedNotes = sharedNotesType !== "none";
|
|
74
77
|
const hasPedago =
|
|
75
78
|
mode === "review"
|
|
76
79
|
? true
|
|
@@ -78,12 +81,13 @@ export const usePedagoOptions = () => {
|
|
|
78
81
|
? false
|
|
79
82
|
: mode === "create"
|
|
80
83
|
? true
|
|
81
|
-
: hasNonEmptyInstructions || hasGradingOrComments;
|
|
84
|
+
: hasNonEmptyInstructions || hasSharedNotes || hasGradingOrComments;
|
|
82
85
|
|
|
83
86
|
const showPedago =
|
|
84
87
|
isPedagoVisible ?? (mode === "create" ? showPedagoByDefault : hasPedago);
|
|
85
88
|
|
|
86
|
-
const showInstructions =
|
|
89
|
+
const showInstructions =
|
|
90
|
+
mode === "create" ? true : hasNonEmptyInstructions || hasSharedNotes;
|
|
87
91
|
const hasGrading = mode === "review" || hasGradingOrComments;
|
|
88
92
|
const showGrading = hasGrading && isGradingVisible;
|
|
89
93
|
|
|
@@ -92,6 +96,7 @@ export const usePedagoOptions = () => {
|
|
|
92
96
|
showPedago,
|
|
93
97
|
isHorizontal,
|
|
94
98
|
hasNonEmptyInstructions,
|
|
99
|
+
hasSharedNotes,
|
|
95
100
|
showInstructions,
|
|
96
101
|
hasGrading,
|
|
97
102
|
showGrading,
|