Skip to content

Commit 6d1daa1

Browse files
mooc is back
1 parent 1e8faa3 commit 6d1daa1

File tree

3 files changed

+18
-22
lines changed

3 files changed

+18
-22
lines changed

src/client/V2/filterContext.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,12 @@ export const filterConfigMap = (filters: any) => new Map([
158158
['mooc', {
159159
state: filters.mooc,
160160
setState: filters.setMooc,
161-
superToggle: true
161+
superToggle: false
162162
}],
163163
['collaboration', {
164164
state: filters.collaboration,
165165
setState: filters.setCollaboration,
166-
superToggle: true
166+
superToggle: false
167167
}],
168168
])
169169

@@ -260,7 +260,7 @@ export const FilterContextProvider = ({ children }: { children: ReactNode }) =>
260260
const [independent, setIndependent] = useState('')
261261
const [mooc, setMooc] = useState('')
262262
const [collaboration, setCollaboration] = useState('')
263-
const [strictFilters, setStrictFilters] = useState<string[]>([])
263+
const [strictFilters, setStrictFilters] = useState<string[]>(['collaboration'])
264264

265265

266266
const [uiVariant, setUiVariant] = useState([

src/client/hooks/useQuestions.tsx

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -518,24 +518,20 @@ const useQuestions = () => {
518518
// },
519519
// ],
520520
// },
521-
// {
522-
// number: '13',
523-
// mandatory: false,
524-
// id: 'mooc',
525-
// effects: 'mooc',
526-
// type: 'multi',
527-
// variants: [
528-
// {
529-
// name: 'default',
530-
// question: t('form:moocQuestion'),
531-
// options: [
532-
// {id: 'neutral', name: neutralText},
533-
// { id: '0', name: noText },
534-
// { id: '1', name: yesText },
535-
// ],
536-
// },
537-
// ],
538-
// },
521+
{
522+
number: '',
523+
mandatory: false,
524+
id: 'mooc',
525+
effects: 'mooc',
526+
type: 'multi',
527+
variants: [
528+
{
529+
name: 'default',
530+
question: t('form:moocQuestion'),
531+
options: generateGeneralYesNoOptions(),
532+
},
533+
],
534+
},
539535
{
540536
number: '',
541537
mandatory: false,

src/server/util/pointRecommendCourses.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ function pointRecommendedCourses(courses: CourseRecommendation[], userCoordinate
7676
},
7777
{
7878
field: 'collaboration',
79-
filterOnFail: true, //always true
79+
filterOnFail: strictFields.includes('collaboration'),
8080
},
8181
{
8282
field: 'spesificOrg',

0 commit comments

Comments
 (0)