@instructure/quiz-core 22.7.1-rc.9 → 22.8.0

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.
@@ -1,15 +1,12 @@
1
1
  import { QUIZ_SUBMISSION_EVENT, RESPONSE, SESSION_STARTED_OR_RESUMED_EVENT, RCE_EVENT, PAGE_BLURRED_EVENT, PAGE_FOCUSED_EVENT } from '@instructure/quiz-common';
2
2
  import { getBrowserSessionId, getIpAddress } from '../selectors/taking';
3
3
  import { getActiveQuizSession } from '../selectors/quizSessions';
4
- import { LocalStoreService } from './localStoreService';
5
- import { featureOn } from './featureCheck';
6
4
  var whitelist = [QUIZ_SUBMISSION_EVENT, RESPONSE, SESSION_STARTED_OR_RESUMED_EVENT, RCE_EVENT, PAGE_BLURRED_EVENT, PAGE_FOCUSED_EVENT];
7
5
  export function serializeEvent(action, store) {
8
6
  var type = action.type;
9
7
  if (!whitelist.includes(type)) {
10
8
  return false;
11
9
  }
12
- var localStore = new LocalStoreService();
13
10
  var state = store.getState();
14
11
  var quizSession = getActiveQuizSession(state);
15
12
  var defaultEventData = {
@@ -18,9 +15,6 @@ export function serializeEvent(action, store) {
18
15
  clientTimestamp: new Date(),
19
16
  ipAddress: getIpAddress(state)
20
17
  };
21
- if (featureOn('detect_multiple_sessions')) {
22
- defaultEventData.sessionLock = localStore.get('sessionLock') || null;
23
- }
24
18
  var authoritativeData = {
25
19
  accountUuid: quizSession.accountUuid,
26
20
  eventCreationToken: quizSession.eventCreationToken,
@@ -8,15 +8,12 @@ exports.serializeEvent = serializeEvent;
8
8
  var _quizCommon = require("@instructure/quiz-common");
9
9
  var _taking = require("../selectors/taking");
10
10
  var _quizSessions = require("../selectors/quizSessions");
11
- var _localStoreService = require("./localStoreService");
12
- var _featureCheck = require("./featureCheck");
13
11
  var whitelist = [_quizCommon.QUIZ_SUBMISSION_EVENT, _quizCommon.RESPONSE, _quizCommon.SESSION_STARTED_OR_RESUMED_EVENT, _quizCommon.RCE_EVENT, _quizCommon.PAGE_BLURRED_EVENT, _quizCommon.PAGE_FOCUSED_EVENT];
14
12
  function serializeEvent(action, store) {
15
13
  var type = action.type;
16
14
  if (!whitelist.includes(type)) {
17
15
  return false;
18
16
  }
19
- var localStore = new _localStoreService.LocalStoreService();
20
17
  var state = store.getState();
21
18
  var quizSession = (0, _quizSessions.getActiveQuizSession)(state);
22
19
  var defaultEventData = {
@@ -25,9 +22,6 @@ function serializeEvent(action, store) {
25
22
  clientTimestamp: new Date(),
26
23
  ipAddress: (0, _taking.getIpAddress)(state)
27
24
  };
28
- if ((0, _featureCheck.featureOn)('detect_multiple_sessions')) {
29
- defaultEventData.sessionLock = localStore.get('sessionLock') || null;
30
- }
31
25
  var authoritativeData = {
32
26
  accountUuid: quizSession.accountUuid,
33
27
  eventCreationToken: quizSession.eventCreationToken,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "22.7.1-rc.9+1bf880ec3",
3
+ "version": "22.8.0",
4
4
  "license": "MIT",
5
5
  "description": "The Quiz React SDK by Instructure Inc.",
6
6
  "author": "Instructure, Inc. Engineering and Product Design",
@@ -10,27 +10,6 @@
10
10
  "type": "git",
11
11
  "url": "https://gerrit.instructure.com/quizzes-ui.git"
12
12
  },
13
- "scripts": {
14
- "clean": "ui-build --clean",
15
- "build": "build-if-changed",
16
- "build:all": "ui-build --modules es,cjs",
17
- "build:watch": "ui-build --watch",
18
- "extract": "extract-translations",
19
- "lint": "ui-test --lint",
20
- "lint:fix": "ui-test --lint --fix",
21
- "eslint:fix": "eslint --fix .",
22
- "prelint": "pnpm build",
23
- "pretest": "pnpm build",
24
- "test": "pnpm test:karma",
25
- "test:karma": "ui-test",
26
- "test:watch": "ui-test --watch",
27
- "snyk:monitor": "snyk monitor",
28
- "postbuild": "cp src/banks/components/noResults.svg lib/banks/components/; cp src/banks/components/noResults.svg es/banks/components/; pnpm postbuild:errorImage",
29
- "postbuild:all": "pnpm postbuild",
30
- "postbuild:errorImage": "cp src/reporting/components/resources/NewQuizAndItemAnalysis/downForRepair.svg es/reporting/components/resources/NewQuizAndItemAnalysis/; cp src/reporting/components/resources/NewQuizAndItemAnalysis/downForRepair.svg lib/reporting/components/resources/NewQuizAndItemAnalysis/",
31
- "format": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
32
- "typecheck": "tsc --noEmit"
33
- },
34
13
  "keywords": [
35
14
  "react",
36
15
  "react-component",
@@ -46,11 +25,6 @@
46
25
  "@instructure/emotion": "10.14.0",
47
26
  "@instructure/grading-utils": "^1.0.0",
48
27
  "@instructure/outcomes-ui": "3.2.3",
49
- "@instructure/quiz-common": "22.7.1-rc.9+1bf880ec3",
50
- "@instructure/quiz-i18n": "22.7.1-rc.9+1bf880ec3",
51
- "@instructure/quiz-interactions": "22.7.1-rc.9+1bf880ec3",
52
- "@instructure/quiz-number-input": "22.7.1-rc.9+1bf880ec3",
53
- "@instructure/quiz-rce": "22.7.1-rc.9+1bf880ec3",
54
28
  "@instructure/ui-a11y-content": "10.14.0",
55
29
  "@instructure/ui-alerts": "10.14.0",
56
30
  "@instructure/ui-avatar": "10.14.0",
@@ -109,7 +83,6 @@
109
83
  "file-saver": "~2.0.5",
110
84
  "humps": "^2.0.0",
111
85
  "immutable": "^3.8.1",
112
- "instructure-validations": "22.7.1-rc.9+1bf880ec3",
113
86
  "ipaddr.js": "^1.5.4",
114
87
  "isomorphic-fetch": "^2.2.0",
115
88
  "isuuid": "^0.1.0",
@@ -137,10 +110,15 @@
137
110
  "scriptjs": "^2.5.8",
138
111
  "store": "^1.3.20",
139
112
  "striptags": "^2.0.0",
140
- "uuid": "^3.2.1"
113
+ "uuid": "^3.2.1",
114
+ "@instructure/quiz-common": "22.8.0",
115
+ "@instructure/quiz-i18n": "22.8.0",
116
+ "@instructure/quiz-interactions": "22.8.0",
117
+ "@instructure/quiz-number-input": "22.8.0",
118
+ "instructure-validations": "22.8.0",
119
+ "@instructure/quiz-rce": "22.8.0"
141
120
  },
142
121
  "devDependencies": {
143
- "@instructure/quiz-scripts": "21.0.0",
144
122
  "@instructure/ui-axe-check": "10.14.0",
145
123
  "@instructure/ui-test-utils": "^7.22.1",
146
124
  "@testing-library/react": "^12.1.5",
@@ -158,7 +136,6 @@
158
136
  "jquery": "^2.2.3",
159
137
  "karma-junit-reporter": "^2.0.1",
160
138
  "most-subject": "^5.3.0",
161
- "quiz-presets": "22.7.1-rc.9+1bf880ec3",
162
139
  "react": "^16.8.6",
163
140
  "react-addons-test-utils": "^15.6.2",
164
141
  "react-dom": "^16.8.6",
@@ -166,7 +143,9 @@
166
143
  "redux-mock-store": "^1.3.0",
167
144
  "request": "^2.74.0",
168
145
  "sinon": "^6.1.3",
169
- "sinon-chai": "^3.3.0"
146
+ "sinon-chai": "^3.3.0",
147
+ "@instructure/quiz-scripts": "21.0.0",
148
+ "quiz-presets": "22.8.0"
170
149
  },
171
150
  "peerDependencies": {
172
151
  "react": "^15 || ^16"
@@ -174,5 +153,25 @@
174
153
  "publishConfig": {
175
154
  "access": "public"
176
155
  },
177
- "gitHead": "1bf880ec3da4e8b796b1e8cbd4dc77232c3f9e30"
178
- }
156
+ "scripts": {
157
+ "clean": "ui-build --clean",
158
+ "build": "build-if-changed",
159
+ "build:all": "ui-build --modules es,cjs",
160
+ "build:watch": "ui-build --watch",
161
+ "extract": "extract-translations",
162
+ "lint": "ui-test --lint",
163
+ "lint:fix": "ui-test --lint --fix",
164
+ "eslint:fix": "eslint --fix .",
165
+ "prelint": "pnpm build",
166
+ "pretest": "pnpm build",
167
+ "test": "pnpm test:karma",
168
+ "test:karma": "ui-test",
169
+ "test:watch": "ui-test --watch",
170
+ "snyk:monitor": "snyk monitor",
171
+ "postbuild": "cp src/banks/components/noResults.svg lib/banks/components/; cp src/banks/components/noResults.svg es/banks/components/; pnpm postbuild:errorImage",
172
+ "postbuild:all": "pnpm postbuild",
173
+ "postbuild:errorImage": "cp src/reporting/components/resources/NewQuizAndItemAnalysis/downForRepair.svg es/reporting/components/resources/NewQuizAndItemAnalysis/; cp src/reporting/components/resources/NewQuizAndItemAnalysis/downForRepair.svg lib/reporting/components/resources/NewQuizAndItemAnalysis/",
174
+ "format": "prettier --write \"src/**/*.{js,jsx,ts,tsx}\"",
175
+ "typecheck": "tsc --noEmit"
176
+ }
177
+ }