@capytale/meta-player 0.9.1 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capytale/meta-player",
3
- "version": "0.9.1",
3
+ "version": "0.9.2",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -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 = mode === "create" ? true : hasNonEmptyInstructions;
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,