@pie-element/ebsr 14.2.7 → 14.2.9
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/CHANGELOG.md +8 -0
- package/configure/CHANGELOG.md +8 -0
- package/configure/package.json +3 -3
- package/controller/CHANGELOG.md +4 -0
- package/controller/package.json +1 -1
- package/module/configure.js +1 -1
- package/module/controller.js +15 -4
- package/module/demo.js +2 -2
- package/module/element.js +1 -1
- package/module/index.html +1 -1
- package/module/manifest.json +3 -3
- package/module/print-demo.js +2 -2
- package/module/print.html +1 -1
- package/module/print.js +1 -1
- package/package.json +3 -3
package/module/controller.js
CHANGED
|
@@ -2710,10 +2710,6 @@ const getShuffledChoices = (choices, session, updateSession, choiceKey) =>
|
|
|
2710
2710
|
* - true - that means that the order of the choices will be ordinal (as is created in the configure item)
|
|
2711
2711
|
* - false - that means the getShuffledChoices above will be called and that in turn means that we either
|
|
2712
2712
|
* return the shuffled values on the session (if any exists) or we shuffle the choices
|
|
2713
|
-
*
|
|
2714
|
-
* Note: the role (student/instructor) is intentionally not considered here — instructor mode
|
|
2715
|
-
* will respect the same `lockChoiceOrder` value as students, instead of forcing the order to be locked.
|
|
2716
|
-
*
|
|
2717
2713
|
* @param model - model to check if we should lock order
|
|
2718
2714
|
* @param session - session to check if we should lock order
|
|
2719
2715
|
* @param env - env to check if we should lock order
|
|
@@ -2730,6 +2726,21 @@ const lockChoices = (model, session, env) => {
|
|
|
2730
2726
|
return true;
|
|
2731
2727
|
}
|
|
2732
2728
|
|
|
2729
|
+
const role = get$1(env, 'role', 'student');
|
|
2730
|
+
|
|
2731
|
+
if (role === 'instructor') {
|
|
2732
|
+
// TODO: .. in the future the instructor can toggle between ordinal and shuffled here, so keeping this code until then
|
|
2733
|
+
/*const alreadyShuffled = hasShuffledValues(session);
|
|
2734
|
+
|
|
2735
|
+
if (alreadyShuffled) {
|
|
2736
|
+
return false;
|
|
2737
|
+
}
|
|
2738
|
+
|
|
2739
|
+
return true;*/
|
|
2740
|
+
return true;
|
|
2741
|
+
}
|
|
2742
|
+
|
|
2743
|
+
// here it's a student, so don't lock and it will shuffle if needs be
|
|
2733
2744
|
return false;
|
|
2734
2745
|
};
|
|
2735
2746
|
|
package/module/demo.js
CHANGED
|
@@ -8,7 +8,7 @@ generate.model = (id, element) => ({
|
|
|
8
8
|
id,
|
|
9
9
|
element,
|
|
10
10
|
partA: {
|
|
11
|
-
choiceMode: '
|
|
11
|
+
choiceMode: 'checkbox',
|
|
12
12
|
choices: [
|
|
13
13
|
{
|
|
14
14
|
value: 'yellow',
|
|
@@ -30,7 +30,7 @@ generate.model = (id, element) => ({
|
|
|
30
30
|
promptEnabled: true,
|
|
31
31
|
},
|
|
32
32
|
partB: {
|
|
33
|
-
choiceMode: '
|
|
33
|
+
choiceMode: 'checkbox',
|
|
34
34
|
choices: [
|
|
35
35
|
{
|
|
36
36
|
value: 'orange',
|