-
-
-
-
@@ -195,11 +196,18 @@
import get from 'lodash/get';
import uniqWith from 'lodash/uniqWith';
import isEqual from 'lodash/isEqual';
- import { displaySectionTitle, enhancedQuizManagementStrings } from 'kolibri-common/strings/enhancedQuizManagementStrings';
+ import {
+ displaySectionTitle,
+ enhancedQuizManagementStrings,
+ } from 'kolibri-common/strings/enhancedQuizManagementStrings';
import { computed, ref, getCurrentInstance, watch } from 'kolibri.lib.vueCompositionApi';
import commonCoreStrings from 'kolibri.coreVue.mixins.commonCoreStrings';
import { ContentNodeResource, ChannelResource } from 'kolibri.resources';
- import { ContentNodeKinds, MAX_QUESTIONS_PER_QUIZ_SECTION, MAX_QUESTION_OPTIONS_PER_QUIZ_SECTION } from 'kolibri.coreVue.vuex.constants';
+ import {
+ ContentNodeKinds,
+ MAX_QUESTIONS_PER_QUIZ_SECTION,
+ MAX_QUESTION_OPTIONS_PER_QUIZ_SECTION,
+ } from 'kolibri.coreVue.vuex.constants';
import useKResponsiveWindow from 'kolibri-design-system/lib/composables/useKResponsiveWindow';
import { exerciseToQuestionArray } from '../../../utils/selectQuestions';
import { PageNames, ViewMoreButtonStates } from '../../../constants/index';
@@ -263,7 +271,7 @@
questionsUnusedInSection$,
numberOfQuestionsSelected$,
numberOfQuestionsToAdd$,
- tooManyQuestions$,
+ tooManyQuestions$,
selectQuiz$,
selectPracticeQuizLabel$,
numberOfQuestionsLabel$,
@@ -310,9 +318,10 @@
*/
function selectableContentList() {
return contentList.value.reduce((newList, content) => {
- if (content.kind === ContentNodeKinds.TOPIC
- && folderDoesNotHaveTooManyQuestions(content))
- {
+ if (
+ content.kind === ContentNodeKinds.TOPIC &&
+ folderDoesNotHaveTooManyQuestions(content)
+ ) {
newList = [...newList, ...content.children.results];
} else {
newList.push(content);
@@ -598,7 +607,7 @@
return (
!workingPoolHasChanged.value ||
workingPoolUnusedQuestions.value < questionCount.value ||
- questionCount.value < 1 ||
+ questionCount.value < 1 ||
workingPoolUnusedQuestions.value > maxSectionQuestionOptions.value
);
});
@@ -741,10 +750,7 @@
}
},
showNumberOfQuestionsWarningCard(content) {
- return (
- !this.selectPracticeQuiz &&
- content.num_assessments > 500
- );
+ return !this.selectPracticeQuiz && content.num_assessments > 500;
},
/** @public */
focusFirstEl() {
diff --git a/packages/kolibri-common/strings/enhancedQuizManagementStrings.js b/packages/kolibri-common/strings/enhancedQuizManagementStrings.js
index adf01af0ae..45c479ea29 100644
--- a/packages/kolibri-common/strings/enhancedQuizManagementStrings.js
+++ b/packages/kolibri-common/strings/enhancedQuizManagementStrings.js
@@ -88,7 +88,7 @@ export const enhancedQuizManagementStrings = createTranslator('EnhancedQuizManag
message: '{count, number} {count, plural, one {question selected} other {questions selected}}',
},
maxNumberOfQuestions: {
- message: 'Max number of questions is { count, number }'
+ message: 'Max number of questions is { count, number }',
},
maxNumberOfQuestionsPerSection: {
message:
@@ -183,7 +183,8 @@ export const enhancedQuizManagementStrings = createTranslator('EnhancedQuizManag
'{ count, number } of { total, number } {total, plural, one {replacement selected} other {replacements selected}}',
},
numberOfReplacementsAvailable: {
- message: '{count, number, integer} {count, plural, one {replacement question available} other {replacement questions available}}',
+ message:
+ '{count, number, integer} {count, plural, one {replacement question available} other {replacement questions available}}',
},
numberOfQuestionsReplaced: {
message:
@@ -197,8 +198,7 @@ export const enhancedQuizManagementStrings = createTranslator('EnhancedQuizManag
'{count, number, integer} of {total, number, integer} {total, plural, one {question selected} other {questions selected}}',
},
selectQuestionsToContinue: {
- message:
- 'Select { count } { count, plural , one { question } other { questions }} to continue',
+ message: 'Select { count } { count, plural , one { question } other { questions }} to continue',
},
selectQuiz: {
message: 'Select quiz',