@instructure/quiz-core 17.25.2-rc.0 → 17.25.2-rc.4
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/es/banks/components/Banks/index.js +1 -0
- package/es/banks/components/Banks/presenter.js +6 -4
- package/es/common/selectors/interactionTypes.js +4 -1
- package/es/common/util/interactionTypeMetadata.js +1 -0
- package/lib/banks/components/Banks/index.js +1 -0
- package/lib/banks/components/Banks/presenter.js +6 -4
- package/lib/common/selectors/interactionTypes.js +5 -1
- package/lib/common/util/interactionTypeMetadata.js +1 -0
- package/package.json +10 -10
|
@@ -17,6 +17,7 @@ function mapStateToProps(state, props) {
|
|
|
17
17
|
var searchTerms = pageData.get('searchTerms', null);
|
|
18
18
|
return {
|
|
19
19
|
filtersEnabled: featureOn('improved_bank_sharing'),
|
|
20
|
+
newItemBankFilterNamesEnabled: featureOn('new_item_bank_filter_names'),
|
|
20
21
|
scopeType: scopeType,
|
|
21
22
|
sortBy: sortBy,
|
|
22
23
|
sortOrder: sortOrder,
|
|
@@ -223,13 +223,13 @@ export var Banks = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cla
|
|
|
223
223
|
value: function renderFilters() {
|
|
224
224
|
var scopeOptions = [{
|
|
225
225
|
slug: 'user',
|
|
226
|
-
translation: t('All My Banks')
|
|
226
|
+
translation: this.props.newItemBankFilterNamesEnabled ? t('All Banks') : t('All My Banks')
|
|
227
227
|
}, {
|
|
228
228
|
slug: 'account',
|
|
229
229
|
translation: t('Institution Banks')
|
|
230
230
|
}, {
|
|
231
231
|
slug: 'courses',
|
|
232
|
-
translation: t('All My Course Banks')
|
|
232
|
+
translation: this.props.newItemBankFilterNamesEnabled ? t('Banks Shared to Course') : t('All My Course Banks')
|
|
233
233
|
}];
|
|
234
234
|
|
|
235
235
|
if (this.props.scopeType == 'course') {
|
|
@@ -414,7 +414,8 @@ export var Banks = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cla
|
|
|
414
414
|
scopeType: PropTypes.string,
|
|
415
415
|
sortBy: PropTypes.string,
|
|
416
416
|
sortOrder: PropTypes.string,
|
|
417
|
-
searchTerms: PropTypes.string
|
|
417
|
+
searchTerms: PropTypes.string,
|
|
418
|
+
newItemBankFilterNamesEnabled: PropTypes.bool
|
|
418
419
|
}, _class2.defaultProps = {
|
|
419
420
|
currentUser: null,
|
|
420
421
|
getCourseInfo: null,
|
|
@@ -433,7 +434,8 @@ export var Banks = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cla
|
|
|
433
434
|
scopeType: 'user',
|
|
434
435
|
sortBy: 'name',
|
|
435
436
|
sortOrder: 'ASC',
|
|
436
|
-
searchTerms: null
|
|
437
|
+
searchTerms: null,
|
|
438
|
+
newItemBankFilterNamesEnabled: false
|
|
437
439
|
}, _class2.contextTypes = {
|
|
438
440
|
locale: PropTypes.string
|
|
439
441
|
}, _temp)) || _class);
|
|
@@ -8,6 +8,7 @@ import { Map } from 'immutable';
|
|
|
8
8
|
import interactionTypeRecordForItem from "../util/interactionTypeRecordForItem.js";
|
|
9
9
|
import withStateCache from "../util/withStateCache.js";
|
|
10
10
|
import reduxStore from "../../reduxStore.js";
|
|
11
|
+
import { featureOn } from "../util/featureCheck.js";
|
|
11
12
|
export var getInteractionType = function getInteractionType(state, id) {
|
|
12
13
|
var interactionTypeData = state.getIn(['interactionTypes', id]) || Map();
|
|
13
14
|
var slug = interactionTypeData.get('slug');
|
|
@@ -22,7 +23,9 @@ var cacheHelper = (_dec = withStateCache(function () {
|
|
|
22
23
|
return reduxStore.getAppState();
|
|
23
24
|
},
|
|
24
25
|
interactionTypes: function interactionTypes(state) {
|
|
25
|
-
return state.get('interactionTypes', Map()).
|
|
26
|
+
return state.get('interactionTypes', Map()).filter(function (intTypeData) {
|
|
27
|
+
return featureOn('interaction_type_rich_fill_blank') ? intTypeData.get('slug') !== 'fill-blank' : intTypeData.get('slug') !== 'rich-fill-blank';
|
|
28
|
+
}).map(function (intTypeData) {
|
|
26
29
|
return getInteractionType(state, intTypeData.get('id'));
|
|
27
30
|
}).valueSeq().toList();
|
|
28
31
|
}
|
|
@@ -34,6 +34,7 @@ export var interactionTypesNameDictionary = function interactionTypesNameDiction
|
|
|
34
34
|
'multi-answer': t('Multiple Answer'),
|
|
35
35
|
numeric: t('Numeric'),
|
|
36
36
|
ordering: t('Ordering'),
|
|
37
|
+
'rich-fill-blank': t('Fill in the Blank'),
|
|
37
38
|
'true-false': t('True or False')
|
|
38
39
|
}[intType.slug] || intType.name;
|
|
39
40
|
};
|
|
@@ -35,6 +35,7 @@ function mapStateToProps(state, props) {
|
|
|
35
35
|
var searchTerms = pageData.get('searchTerms', null);
|
|
36
36
|
return {
|
|
37
37
|
filtersEnabled: (0, _featureCheck.featureOn)('improved_bank_sharing'),
|
|
38
|
+
newItemBankFilterNamesEnabled: (0, _featureCheck.featureOn)('new_item_bank_filter_names'),
|
|
38
39
|
scopeType: scopeType,
|
|
39
40
|
sortBy: sortBy,
|
|
40
41
|
sortOrder: sortOrder,
|
|
@@ -259,13 +259,13 @@ var Banks = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_c
|
|
|
259
259
|
value: function renderFilters() {
|
|
260
260
|
var scopeOptions = [{
|
|
261
261
|
slug: 'user',
|
|
262
|
-
translation: (0, _formatMessage.default)('All My Banks')
|
|
262
|
+
translation: this.props.newItemBankFilterNamesEnabled ? (0, _formatMessage.default)('All Banks') : (0, _formatMessage.default)('All My Banks')
|
|
263
263
|
}, {
|
|
264
264
|
slug: 'account',
|
|
265
265
|
translation: (0, _formatMessage.default)('Institution Banks')
|
|
266
266
|
}, {
|
|
267
267
|
slug: 'courses',
|
|
268
|
-
translation: (0, _formatMessage.default)('All My Course Banks')
|
|
268
|
+
translation: this.props.newItemBankFilterNamesEnabled ? (0, _formatMessage.default)('Banks Shared to Course') : (0, _formatMessage.default)('All My Course Banks')
|
|
269
269
|
}];
|
|
270
270
|
|
|
271
271
|
if (this.props.scopeType == 'course') {
|
|
@@ -452,7 +452,8 @@ var Banks = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_c
|
|
|
452
452
|
scopeType: _propTypes.default.string,
|
|
453
453
|
sortBy: _propTypes.default.string,
|
|
454
454
|
sortOrder: _propTypes.default.string,
|
|
455
|
-
searchTerms: _propTypes.default.string
|
|
455
|
+
searchTerms: _propTypes.default.string,
|
|
456
|
+
newItemBankFilterNamesEnabled: _propTypes.default.bool
|
|
456
457
|
}, _class2.defaultProps = {
|
|
457
458
|
currentUser: null,
|
|
458
459
|
getCourseInfo: null,
|
|
@@ -471,7 +472,8 @@ var Banks = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_c
|
|
|
471
472
|
scopeType: 'user',
|
|
472
473
|
sortBy: 'name',
|
|
473
474
|
sortOrder: 'ASC',
|
|
474
|
-
searchTerms: null
|
|
475
|
+
searchTerms: null,
|
|
476
|
+
newItemBankFilterNamesEnabled: false
|
|
475
477
|
}, _class2.contextTypes = {
|
|
476
478
|
locale: _propTypes.default.string
|
|
477
479
|
}, _temp)) || _class);
|
|
@@ -17,6 +17,8 @@ var _withStateCache = _interopRequireDefault(require("../util/withStateCache.js"
|
|
|
17
17
|
|
|
18
18
|
var _reduxStore = _interopRequireDefault(require("../../reduxStore.js"));
|
|
19
19
|
|
|
20
|
+
var _featureCheck = require("../util/featureCheck.js");
|
|
21
|
+
|
|
20
22
|
var _dec, _obj;
|
|
21
23
|
|
|
22
24
|
var getInteractionType = function getInteractionType(state, id) {
|
|
@@ -35,7 +37,9 @@ var cacheHelper = (_dec = (0, _withStateCache.default)(function () {
|
|
|
35
37
|
return _reduxStore.default.getAppState();
|
|
36
38
|
},
|
|
37
39
|
interactionTypes: function interactionTypes(state) {
|
|
38
|
-
return state.get('interactionTypes', (0, _immutable.Map)()).
|
|
40
|
+
return state.get('interactionTypes', (0, _immutable.Map)()).filter(function (intTypeData) {
|
|
41
|
+
return (0, _featureCheck.featureOn)('interaction_type_rich_fill_blank') ? intTypeData.get('slug') !== 'fill-blank' : intTypeData.get('slug') !== 'rich-fill-blank';
|
|
42
|
+
}).map(function (intTypeData) {
|
|
39
43
|
return getInteractionType(state, intTypeData.get('id'));
|
|
40
44
|
}).valueSeq().toList();
|
|
41
45
|
}
|
|
@@ -44,6 +44,7 @@ var interactionTypesNameDictionary = function interactionTypesNameDictionary(int
|
|
|
44
44
|
'multi-answer': (0, _formatMessage.default)('Multiple Answer'),
|
|
45
45
|
numeric: (0, _formatMessage.default)('Numeric'),
|
|
46
46
|
ordering: (0, _formatMessage.default)('Ordering'),
|
|
47
|
+
'rich-fill-blank': (0, _formatMessage.default)('Fill in the Blank'),
|
|
47
48
|
'true-false': (0, _formatMessage.default)('True or False')
|
|
48
49
|
}[intType.slug] || intType.name;
|
|
49
50
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "17.25.2-rc.
|
|
3
|
+
"version": "17.25.2-rc.4+774962ad4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The Quiz React SDK by Instructure Inc.",
|
|
6
6
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@instructure/outcomes-ui": "^2.1.2",
|
|
44
|
-
"@instructure/quiz-common": "17.25.2-rc.
|
|
45
|
-
"@instructure/quiz-i18n": "17.25.2-rc.
|
|
46
|
-
"@instructure/quiz-interactions": "17.25.2-rc.
|
|
47
|
-
"@instructure/quiz-number-input": "17.25.2-rc.
|
|
48
|
-
"@instructure/quiz-rce": "17.25.2-rc.
|
|
44
|
+
"@instructure/quiz-common": "17.25.2-rc.4+774962ad4",
|
|
45
|
+
"@instructure/quiz-i18n": "17.25.2-rc.4+774962ad4",
|
|
46
|
+
"@instructure/quiz-interactions": "17.25.2-rc.4+774962ad4",
|
|
47
|
+
"@instructure/quiz-number-input": "17.25.2-rc.4+774962ad4",
|
|
48
|
+
"@instructure/quiz-rce": "17.25.2-rc.4+774962ad4",
|
|
49
49
|
"@instructure/ui-a11y-content": "^7.11.0",
|
|
50
50
|
"@instructure/ui-alerts": "^7.11.0",
|
|
51
51
|
"@instructure/ui-avatar": "^7.11.0",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"eventemitter3": "^3.1.0",
|
|
107
107
|
"humps": "^2.0.0",
|
|
108
108
|
"immutable": "^3.8.1",
|
|
109
|
-
"instructure-validations": "17.25.2-rc.
|
|
109
|
+
"instructure-validations": "17.25.2-rc.4+774962ad4",
|
|
110
110
|
"ipaddr.js": "^1.5.4",
|
|
111
111
|
"isomorphic-fetch": "^2.2.0",
|
|
112
112
|
"isuuid": "^0.1.0",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"uuid": "^3.2.1"
|
|
138
138
|
},
|
|
139
139
|
"devDependencies": {
|
|
140
|
-
"@instructure/quiz-scripts": "17.25.2-rc.
|
|
140
|
+
"@instructure/quiz-scripts": "17.25.2-rc.4+774962ad4",
|
|
141
141
|
"@instructure/ui-axe-check": "^7.11.0",
|
|
142
142
|
"@instructure/ui-babel-preset": "^7.11.0",
|
|
143
143
|
"@instructure/ui-karma-config": "^7.11.0",
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
"intl": "^1.2.4",
|
|
157
157
|
"jquery": "^2.2.3",
|
|
158
158
|
"most-subject": "^5.3.0",
|
|
159
|
-
"quiz-presets": "17.25.2-rc.
|
|
159
|
+
"quiz-presets": "17.25.2-rc.4+774962ad4",
|
|
160
160
|
"react": "^16.8.6",
|
|
161
161
|
"react-addons-test-utils": "^15.6.2",
|
|
162
162
|
"react-dom": "^16.8.6",
|
|
@@ -172,5 +172,5 @@
|
|
|
172
172
|
"publishConfig": {
|
|
173
173
|
"access": "public"
|
|
174
174
|
},
|
|
175
|
-
"gitHead": "
|
|
175
|
+
"gitHead": "774962ad4ad71c98347d503f24e677409984f394"
|
|
176
176
|
}
|