@instructure/quiz-core 20.11.4-rc.4 → 20.11.4-rc.5
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.
|
@@ -56,10 +56,14 @@ export var Banks = (_dec = withStyle(generateStyle, generateComponentTheme), _de
|
|
|
56
56
|
_this = _super.apply(this, arguments);
|
|
57
57
|
|
|
58
58
|
_this.hideAccountSearch = function () {
|
|
59
|
-
|
|
59
|
+
if (_this.props.scopeType === 'course' || _this.props.scopeType === 'courses' || _this.props.scopeType === 'this_account') {
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return false;
|
|
60
64
|
};
|
|
61
65
|
|
|
62
|
-
_this.
|
|
66
|
+
_this.isSubAccountLaunch = function () {
|
|
63
67
|
return _this.props.scope.type === 'account' && _this.props.scope.launch_context_uuid && _this.props.rootAccountUuid && _this.props.scope.launch_context_uuid !== _this.props.rootAccountUuid;
|
|
64
68
|
};
|
|
65
69
|
|
|
@@ -102,8 +106,9 @@ export var Banks = (_dec = withStyle(generateStyle, generateComponentTheme), _de
|
|
|
102
106
|
params['search'] = _this.props.searchTerms;
|
|
103
107
|
}
|
|
104
108
|
|
|
105
|
-
if (_this.props.
|
|
109
|
+
if (_this.props.scopeType === 'this_account') {
|
|
106
110
|
params['account_uuids'] = [_this.props.scope.launch_context_uuid];
|
|
111
|
+
params['scope'] = 'account';
|
|
107
112
|
} else if (_this.props.searchSelection.length > 0) {
|
|
108
113
|
params['account_uuids'] = _this.props.searchSelection.map(function (account) {
|
|
109
114
|
return account.uuid;
|
|
@@ -219,13 +224,11 @@ export var Banks = (_dec = withStyle(generateStyle, generateComponentTheme), _de
|
|
|
219
224
|
var message;
|
|
220
225
|
|
|
221
226
|
if (_this.props.scopeType === 'course') {
|
|
222
|
-
message = t("Your filter is set to \"Courses\" which will narrow what you can search for.\n Try adjusting the filter to \"
|
|
227
|
+
message = t("Your filter is set to \"Courses\" which will narrow what you can search for.\n Try adjusting the filter to \"All My Banks\"");
|
|
228
|
+
} else if (_this.props.scopeType === 'this_account') {
|
|
229
|
+
message = t("Your filter is set to \"This Account\" which will narrow what you can search for.\n Try adjusting the filter to \"All My Banks\"");
|
|
223
230
|
} else if (_this.props.scopeType === 'account') {
|
|
224
|
-
|
|
225
|
-
message = t("Your filter is set to \"This Account\" which will narrow what you can search for.\n Try adjusting the filter to \"All My Banks\"");
|
|
226
|
-
} else {
|
|
227
|
-
message = t("Your filter is set to \"Institution\" which will narrow what you can search for.\n Try adjusting the filter to \"All My Banks\"");
|
|
228
|
-
}
|
|
231
|
+
message = t("Your filter is set to \"Institution\" which will narrow what you can search for.\n Try adjusting the filter to \"All My Banks\"");
|
|
229
232
|
}
|
|
230
233
|
|
|
231
234
|
return jsx(Billboard, {
|
|
@@ -256,7 +259,7 @@ export var Banks = (_dec = withStyle(generateStyle, generateComponentTheme), _de
|
|
|
256
259
|
if (prevProps.sortBy !== this.props.sortBy || prevProps.sortOrder !== this.props.sortOrder || prevProps.searchTerms !== this.props.searchTerms || prevProps.scopeType !== this.props.scopeType || !isEqual(prevProps.searchSelection, this.props.searchSelection)) {
|
|
257
260
|
this.props.clear(BANKS_BANK_PAGINATION);
|
|
258
261
|
}
|
|
259
|
-
} //
|
|
262
|
+
} // We only care about displaying the account search for the Institution Banks and All Banks filters
|
|
260
263
|
|
|
261
264
|
}, {
|
|
262
265
|
key: "renderFilters",
|
|
@@ -266,7 +269,7 @@ export var Banks = (_dec = withStyle(generateStyle, generateComponentTheme), _de
|
|
|
266
269
|
translation: this.props.newItemBankFilterNamesEnabled ? t('All Banks') : t('All My Banks')
|
|
267
270
|
}, {
|
|
268
271
|
slug: 'account',
|
|
269
|
-
translation:
|
|
272
|
+
translation: t('Institution Banks')
|
|
270
273
|
}, {
|
|
271
274
|
slug: 'courses',
|
|
272
275
|
translation: this.props.newItemBankFilterNamesEnabled ? t('Banks Shared to Course') : t('All My Course Banks')
|
|
@@ -277,6 +280,14 @@ export var Banks = (_dec = withStyle(generateStyle, generateComponentTheme), _de
|
|
|
277
280
|
slug: 'course',
|
|
278
281
|
translation: this.props.newItemBankFilterNamesEnabled ? t('This Course') : t('Course Banks')
|
|
279
282
|
});
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
if (this.props.subAccountBankSharingEnabled && this.isSubAccountLaunch()) {
|
|
286
|
+
// Put this option below "Insitution Banks"
|
|
287
|
+
scopeOptions.splice(2, 0, {
|
|
288
|
+
slug: 'this_account',
|
|
289
|
+
translation: t('This Account')
|
|
290
|
+
});
|
|
280
291
|
} // display options are displayed when using banks list
|
|
281
292
|
// non-display options are used for sorting of banks table
|
|
282
293
|
|
|
@@ -96,10 +96,14 @@ var Banks = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _d
|
|
|
96
96
|
_this = _super.apply(this, arguments);
|
|
97
97
|
|
|
98
98
|
_this.hideAccountSearch = function () {
|
|
99
|
-
|
|
99
|
+
if (_this.props.scopeType === 'course' || _this.props.scopeType === 'courses' || _this.props.scopeType === 'this_account') {
|
|
100
|
+
return true;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return false;
|
|
100
104
|
};
|
|
101
105
|
|
|
102
|
-
_this.
|
|
106
|
+
_this.isSubAccountLaunch = function () {
|
|
103
107
|
return _this.props.scope.type === 'account' && _this.props.scope.launch_context_uuid && _this.props.rootAccountUuid && _this.props.scope.launch_context_uuid !== _this.props.rootAccountUuid;
|
|
104
108
|
};
|
|
105
109
|
|
|
@@ -142,8 +146,9 @@ var Banks = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _d
|
|
|
142
146
|
params['search'] = _this.props.searchTerms;
|
|
143
147
|
}
|
|
144
148
|
|
|
145
|
-
if (_this.props.
|
|
149
|
+
if (_this.props.scopeType === 'this_account') {
|
|
146
150
|
params['account_uuids'] = [_this.props.scope.launch_context_uuid];
|
|
151
|
+
params['scope'] = 'account';
|
|
147
152
|
} else if (_this.props.searchSelection.length > 0) {
|
|
148
153
|
params['account_uuids'] = _this.props.searchSelection.map(function (account) {
|
|
149
154
|
return account.uuid;
|
|
@@ -259,13 +264,11 @@ var Banks = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _d
|
|
|
259
264
|
var message;
|
|
260
265
|
|
|
261
266
|
if (_this.props.scopeType === 'course') {
|
|
262
|
-
message = (0, _formatMessage.default)("Your filter is set to \"Courses\" which will narrow what you can search for.\n Try adjusting the filter to \"
|
|
267
|
+
message = (0, _formatMessage.default)("Your filter is set to \"Courses\" which will narrow what you can search for.\n Try adjusting the filter to \"All My Banks\"");
|
|
268
|
+
} else if (_this.props.scopeType === 'this_account') {
|
|
269
|
+
message = (0, _formatMessage.default)("Your filter is set to \"This Account\" which will narrow what you can search for.\n Try adjusting the filter to \"All My Banks\"");
|
|
263
270
|
} else if (_this.props.scopeType === 'account') {
|
|
264
|
-
|
|
265
|
-
message = (0, _formatMessage.default)("Your filter is set to \"This Account\" which will narrow what you can search for.\n Try adjusting the filter to \"All My Banks\"");
|
|
266
|
-
} else {
|
|
267
|
-
message = (0, _formatMessage.default)("Your filter is set to \"Institution\" which will narrow what you can search for.\n Try adjusting the filter to \"All My Banks\"");
|
|
268
|
-
}
|
|
271
|
+
message = (0, _formatMessage.default)("Your filter is set to \"Institution\" which will narrow what you can search for.\n Try adjusting the filter to \"All My Banks\"");
|
|
269
272
|
}
|
|
270
273
|
|
|
271
274
|
return (0, _emotion.jsx)(_uiBillboard.Billboard, {
|
|
@@ -296,7 +299,7 @@ var Banks = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _d
|
|
|
296
299
|
if (prevProps.sortBy !== this.props.sortBy || prevProps.sortOrder !== this.props.sortOrder || prevProps.searchTerms !== this.props.searchTerms || prevProps.scopeType !== this.props.scopeType || !(0, _isEqual.default)(prevProps.searchSelection, this.props.searchSelection)) {
|
|
297
300
|
this.props.clear(_quizCommon.BANKS_BANK_PAGINATION);
|
|
298
301
|
}
|
|
299
|
-
} //
|
|
302
|
+
} // We only care about displaying the account search for the Institution Banks and All Banks filters
|
|
300
303
|
|
|
301
304
|
}, {
|
|
302
305
|
key: "renderFilters",
|
|
@@ -306,7 +309,7 @@ var Banks = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _d
|
|
|
306
309
|
translation: this.props.newItemBankFilterNamesEnabled ? (0, _formatMessage.default)('All Banks') : (0, _formatMessage.default)('All My Banks')
|
|
307
310
|
}, {
|
|
308
311
|
slug: 'account',
|
|
309
|
-
translation:
|
|
312
|
+
translation: (0, _formatMessage.default)('Institution Banks')
|
|
310
313
|
}, {
|
|
311
314
|
slug: 'courses',
|
|
312
315
|
translation: this.props.newItemBankFilterNamesEnabled ? (0, _formatMessage.default)('Banks Shared to Course') : (0, _formatMessage.default)('All My Course Banks')
|
|
@@ -317,6 +320,14 @@ var Banks = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _d
|
|
|
317
320
|
slug: 'course',
|
|
318
321
|
translation: this.props.newItemBankFilterNamesEnabled ? (0, _formatMessage.default)('This Course') : (0, _formatMessage.default)('Course Banks')
|
|
319
322
|
});
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
if (this.props.subAccountBankSharingEnabled && this.isSubAccountLaunch()) {
|
|
326
|
+
// Put this option below "Insitution Banks"
|
|
327
|
+
scopeOptions.splice(2, 0, {
|
|
328
|
+
slug: 'this_account',
|
|
329
|
+
translation: (0, _formatMessage.default)('This Account')
|
|
330
|
+
});
|
|
320
331
|
} // display options are displayed when using banks list
|
|
321
332
|
// non-display options are used for sorting of banks table
|
|
322
333
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "20.11.4-rc.
|
|
3
|
+
"version": "20.11.4-rc.5+db897bfdd",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The Quiz React SDK by Instructure Inc.",
|
|
6
6
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
"@instructure/emotion": "^8.51.0",
|
|
45
45
|
"@instructure/grading-utils": "^1.0.0",
|
|
46
46
|
"@instructure/outcomes-ui": "^3.2.1",
|
|
47
|
-
"@instructure/quiz-common": "20.11.4-rc.
|
|
48
|
-
"@instructure/quiz-i18n": "20.11.4-rc.
|
|
49
|
-
"@instructure/quiz-interactions": "20.11.4-rc.
|
|
50
|
-
"@instructure/quiz-number-input": "20.11.4-rc.
|
|
51
|
-
"@instructure/quiz-rce": "20.11.4-rc.
|
|
47
|
+
"@instructure/quiz-common": "20.11.4-rc.5+db897bfdd",
|
|
48
|
+
"@instructure/quiz-i18n": "20.11.4-rc.5+db897bfdd",
|
|
49
|
+
"@instructure/quiz-interactions": "20.11.4-rc.5+db897bfdd",
|
|
50
|
+
"@instructure/quiz-number-input": "20.11.4-rc.5+db897bfdd",
|
|
51
|
+
"@instructure/quiz-rce": "20.11.4-rc.5+db897bfdd",
|
|
52
52
|
"@instructure/ui-a11y-content": "^8.51.0",
|
|
53
53
|
"@instructure/ui-alerts": "^8.51.0",
|
|
54
54
|
"@instructure/ui-avatar": "^8.51.0",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"file-saver": "~2.0.5",
|
|
113
113
|
"humps": "^2.0.0",
|
|
114
114
|
"immutable": "^3.8.1",
|
|
115
|
-
"instructure-validations": "20.11.4-rc.
|
|
115
|
+
"instructure-validations": "20.11.4-rc.5+db897bfdd",
|
|
116
116
|
"ipaddr.js": "^1.5.4",
|
|
117
117
|
"isomorphic-fetch": "^2.2.0",
|
|
118
118
|
"isuuid": "^0.1.0",
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
"intl": "^1.2.4",
|
|
164
164
|
"jquery": "^2.2.3",
|
|
165
165
|
"most-subject": "^5.3.0",
|
|
166
|
-
"quiz-presets": "20.11.4-rc.
|
|
166
|
+
"quiz-presets": "20.11.4-rc.5+db897bfdd",
|
|
167
167
|
"react": "^16.8.6",
|
|
168
168
|
"react-addons-test-utils": "^15.6.2",
|
|
169
169
|
"react-dom": "^16.8.6",
|
|
@@ -179,5 +179,5 @@
|
|
|
179
179
|
"publishConfig": {
|
|
180
180
|
"access": "public"
|
|
181
181
|
},
|
|
182
|
-
"gitHead": "
|
|
182
|
+
"gitHead": "db897bfdd083fc10e872d4a619962ef2fdcb435c"
|
|
183
183
|
}
|