@instructure/quiz-core 20.11.4-rc.0 → 20.11.4-rc.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.
@@ -56,7 +56,11 @@ export var Banks = (_dec = withStyle(generateStyle, generateComponentTheme), _de
56
56
  _this = _super.apply(this, arguments);
57
57
 
58
58
  _this.hideAccountSearch = function () {
59
- return _this.props.scopeType === 'account' && _this.props.scope.type === 'account' && _this.props.scope.launch_context_uuid && _this.props.rootAccountUuid && _this.props.scope.launch_context_uuid !== _this.props.rootAccountUuid;
59
+ return _this.props.scopeType === 'courses' || _this.props.scopeType === 'course' || _this.props.scopeType === 'account' && _this.displayThisAccount();
60
+ };
61
+
62
+ _this.displayThisAccount = function () {
63
+ return _this.props.scope.type === 'account' && _this.props.scope.launch_context_uuid && _this.props.rootAccountUuid && _this.props.scope.launch_context_uuid !== _this.props.rootAccountUuid;
60
64
  };
61
65
 
62
66
  _this.onCreateBank = function () {
@@ -217,7 +221,7 @@ export var Banks = (_dec = withStyle(generateStyle, generateComponentTheme), _de
217
221
  if (_this.props.scopeType === 'course') {
218
222
  message = t("Your filter is set to \"Courses\" which will narrow what you can search for.\n Try adjusting the filter to \"Institution\" or \"All My Banks\"");
219
223
  } else if (_this.props.scopeType === 'account') {
220
- if (_this.props.subAccountBankSharingEnabled && _this.hideAccountSearch()) {
224
+ if (_this.props.subAccountBankSharingEnabled && _this.displayThisAccount()) {
221
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\"");
222
226
  } else {
223
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\"");
@@ -252,8 +256,7 @@ export var Banks = (_dec = withStyle(generateStyle, generateComponentTheme), _de
252
256
  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)) {
253
257
  this.props.clear(BANKS_BANK_PAGINATION);
254
258
  }
255
- } // When the launch is from a subaccount, we want to silently add the subaccount to the account search
256
- // if the user is on the "This Account" filter
259
+ } // Only display the account search for the account and all banks filters
257
260
 
258
261
  }, {
259
262
  key: "renderFilters",
@@ -263,7 +266,7 @@ export var Banks = (_dec = withStyle(generateStyle, generateComponentTheme), _de
263
266
  translation: this.props.newItemBankFilterNamesEnabled ? t('All Banks') : t('All My Banks')
264
267
  }, {
265
268
  slug: 'account',
266
- translation: this.props.subAccountBankSharingEnabled && this.hideAccountSearch() ? t('This Account') : t('Institution Banks')
269
+ translation: this.props.subAccountBankSharingEnabled && this.displayThisAccount() ? t('This Account') : t('Institution Banks')
267
270
  }, {
268
271
  slug: 'courses',
269
272
  translation: this.props.newItemBankFilterNamesEnabled ? t('Banks Shared to Course') : t('All My Course Banks')
@@ -96,7 +96,11 @@ 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
- return _this.props.scopeType === 'account' && _this.props.scope.type === 'account' && _this.props.scope.launch_context_uuid && _this.props.rootAccountUuid && _this.props.scope.launch_context_uuid !== _this.props.rootAccountUuid;
99
+ return _this.props.scopeType === 'courses' || _this.props.scopeType === 'course' || _this.props.scopeType === 'account' && _this.displayThisAccount();
100
+ };
101
+
102
+ _this.displayThisAccount = function () {
103
+ return _this.props.scope.type === 'account' && _this.props.scope.launch_context_uuid && _this.props.rootAccountUuid && _this.props.scope.launch_context_uuid !== _this.props.rootAccountUuid;
100
104
  };
101
105
 
102
106
  _this.onCreateBank = function () {
@@ -257,7 +261,7 @@ var Banks = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _d
257
261
  if (_this.props.scopeType === 'course') {
258
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 \"Institution\" or \"All My Banks\"");
259
263
  } else if (_this.props.scopeType === 'account') {
260
- if (_this.props.subAccountBankSharingEnabled && _this.hideAccountSearch()) {
264
+ if (_this.props.subAccountBankSharingEnabled && _this.displayThisAccount()) {
261
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\"");
262
266
  } else {
263
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\"");
@@ -292,8 +296,7 @@ var Banks = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _d
292
296
  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)) {
293
297
  this.props.clear(_quizCommon.BANKS_BANK_PAGINATION);
294
298
  }
295
- } // When the launch is from a subaccount, we want to silently add the subaccount to the account search
296
- // if the user is on the "This Account" filter
299
+ } // Only display the account search for the account and all banks filters
297
300
 
298
301
  }, {
299
302
  key: "renderFilters",
@@ -303,7 +306,7 @@ var Banks = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _d
303
306
  translation: this.props.newItemBankFilterNamesEnabled ? (0, _formatMessage.default)('All Banks') : (0, _formatMessage.default)('All My Banks')
304
307
  }, {
305
308
  slug: 'account',
306
- translation: this.props.subAccountBankSharingEnabled && this.hideAccountSearch() ? (0, _formatMessage.default)('This Account') : (0, _formatMessage.default)('Institution Banks')
309
+ translation: this.props.subAccountBankSharingEnabled && this.displayThisAccount() ? (0, _formatMessage.default)('This Account') : (0, _formatMessage.default)('Institution Banks')
307
310
  }, {
308
311
  slug: 'courses',
309
312
  translation: this.props.newItemBankFilterNamesEnabled ? (0, _formatMessage.default)('Banks Shared to Course') : (0, _formatMessage.default)('All My Course Banks')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "20.11.4-rc.0+4dda23638",
3
+ "version": "20.11.4-rc.2+551dd5b47",
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.0+4dda23638",
48
- "@instructure/quiz-i18n": "20.11.4-rc.0+4dda23638",
49
- "@instructure/quiz-interactions": "20.11.4-rc.0+4dda23638",
50
- "@instructure/quiz-number-input": "20.11.4-rc.0+4dda23638",
51
- "@instructure/quiz-rce": "20.11.4-rc.0+4dda23638",
47
+ "@instructure/quiz-common": "20.11.4-rc.2+551dd5b47",
48
+ "@instructure/quiz-i18n": "20.11.4-rc.2+551dd5b47",
49
+ "@instructure/quiz-interactions": "20.11.4-rc.2+551dd5b47",
50
+ "@instructure/quiz-number-input": "20.11.4-rc.2+551dd5b47",
51
+ "@instructure/quiz-rce": "20.11.4-rc.2+551dd5b47",
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.0+4dda23638",
115
+ "instructure-validations": "20.11.4-rc.2+551dd5b47",
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.0+4dda23638",
166
+ "quiz-presets": "20.11.4-rc.2+551dd5b47",
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": "4dda2363876be59480e71c6d35c73cf703797e9d"
182
+ "gitHead": "551dd5b477a4d76280ae3c35fb5321decc34a49c"
183
183
  }