mirror of
https://github.com/UniversityOfHelsinkiCS/oodikone.git
synced 2026-10-12 19:03:39 +03:00
[Degree programme settings] Clarify modal and more infobox
This commit is contained in:
@@ -190,16 +190,26 @@ However this is optional and you can create a new tag without selecting year.
|
|||||||
},
|
},
|
||||||
|
|
||||||
degreeCoursesTab: {
|
degreeCoursesTab: {
|
||||||
creditCriteria: `
|
creditCriteria: {
|
||||||
Here you can change visibility of degree courses as and set course and credits criteria, for each year their
|
en: `The criteria set here will affect the Progress tab within Class Statistics → Students tab.
|
||||||
own. Credits criteria is computed as follows: for the first academic year the credits are taken into account
|
Credit criteria is computed as follows: for the first academic year, the credits are counted
|
||||||
if they are completed during the first 12 months. For the second year, we take into account the completions
|
if they are completed during the first 12 months. For the second year, completions
|
||||||
during the first 24 months, for the third year the first 36 months.
|
within the first 24 months, and so on.
|
||||||
|
|
||||||
The progress of the students by these criteria will be shown in class statistics view.
|
|
||||||
`,
|
`,
|
||||||
},
|
},
|
||||||
|
programmeCriteriaAndVisibility: {
|
||||||
|
en: `Click the arrow next to the module to view courses belonging to the module in the curriculum. Setting a criterion label for a course will affect which academic year the course is placed under in Class Statistics → Students → Progress tab.
|
||||||
|
|
||||||
|
Courses' visibilities can also be toggled here; hiding a course here will additionally hide it in the Courses of Class view and Students → Courses tab.
|
||||||
|
|
||||||
|
Note: If hiding a module, all courses belonging to the module will also be hidden.`,
|
||||||
|
fi: `Klikkaa nuolta opintokokonaisuuden nimen vieressä näyttääksesi opetussuunitelmassa opintokokonaisuuden alle sijoitetut kurssit. Kursseille voi asettaa "Criterion label":eita, jotka vaikuttavat minkä akateemisen vuoden alla kurssi näytetään Class Statistics → Students → Progress tab näkymässä.
|
||||||
|
|
||||||
|
Kurssien näkyvyyttä voidaan myös muuttaa tällä sivulla. Kurssin piilottaminen piilottaa sen myös Courses of Class ja Students → Courses tab näkymissä.
|
||||||
|
|
||||||
|
Huom: Opintokokonaisuuden piilottaminen piilottaa myös kaikki sen alla olevat kurssit.`,
|
||||||
|
},
|
||||||
|
},
|
||||||
// Not used
|
// Not used
|
||||||
notCompleted: `
|
notCompleted: `
|
||||||
Sisältää opiskelijat, jotka ovat ilmoittautuneet kurssille, mutta eivät ole suorittaneet sitä ja opiskelijat, jotka ovat saaneet hylätyn arvosanan.
|
Sisältää opiskelijat, jotka ovat ilmoittautuneet kurssille, mutta eivät ole suorittaneet sitä ja opiskelijat, jotka ovat saaneet hylätyn arvosanan.
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ export const FilterDegreeCoursesModal = ({ degreeProgramme }: { degreeProgramme:
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Button onClick={() => setModalOpen(true)} startIcon={<VisibilityIcon />} variant="outlined">
|
<Button onClick={() => setModalOpen(true)} startIcon={<VisibilityIcon />} variant="outlined">
|
||||||
Manage Courses Shown
|
Manage shown courses
|
||||||
</Button>
|
</Button>
|
||||||
<Dialog maxWidth="md" onClose={() => setModalOpen(false)} open={modalOpen}>
|
<Dialog maxWidth="md" onClose={() => setModalOpen(false)} open={modalOpen}>
|
||||||
<DialogTitle>Degree programme settings</DialogTitle>
|
<DialogTitle>Degree programme settings</DialogTitle>
|
||||||
|
|||||||
+3
-1
@@ -14,6 +14,7 @@ import { useAddProgressCriteriaCreditsMutation } from '@/redux/progressCriteria'
|
|||||||
import { SaveIcon } from '@/theme'
|
import { SaveIcon } from '@/theme'
|
||||||
import { isMedicalProgramme } from '@/util/studyProgramme'
|
import { isMedicalProgramme } from '@/util/studyProgramme'
|
||||||
import { ProgressCriteria } from '@oodikone/shared/types'
|
import { ProgressCriteria } from '@oodikone/shared/types'
|
||||||
|
import { useLanguage } from '@/components/LanguagePicker/useLanguage'
|
||||||
|
|
||||||
const emptyCredits = {
|
const emptyCredits = {
|
||||||
year1: null,
|
year1: null,
|
||||||
@@ -32,6 +33,7 @@ export const CreditCriteriaSection = ({
|
|||||||
degreeProgramme: string
|
degreeProgramme: string
|
||||||
}) => {
|
}) => {
|
||||||
const [creditLimits, setCreditLimits] = useState<Record<string, null | number>>(emptyCredits)
|
const [creditLimits, setCreditLimits] = useState<Record<string, null | number>>(emptyCredits)
|
||||||
|
const { getTextIn } = useLanguage()
|
||||||
|
|
||||||
const [addProgressCriteriaCredits, { isError, isSuccess }] = useAddProgressCriteriaCreditsMutation()
|
const [addProgressCriteriaCredits, { isError, isSuccess }] = useAddProgressCriteriaCreditsMutation()
|
||||||
const { setStatusNotification } = useStatusNotification()
|
const { setStatusNotification } = useStatusNotification()
|
||||||
@@ -109,7 +111,7 @@ export const CreditCriteriaSection = ({
|
|||||||
return (
|
return (
|
||||||
<Section
|
<Section
|
||||||
cypress="credit-criteria"
|
cypress="credit-criteria"
|
||||||
infoBoxContent={studyProgrammeToolTips.degreeCoursesTab.creditCriteria}
|
infoBoxContent={getTextIn(studyProgrammeToolTips.degreeCoursesTab.creditCriteria) ?? ''}
|
||||||
title="Credit criteria"
|
title="Credit criteria"
|
||||||
>
|
>
|
||||||
<Stack gap={2}>
|
<Stack gap={2}>
|
||||||
|
|||||||
@@ -10,6 +10,9 @@ import { DegreeCourseTable } from '@/pages/StudyProgramme/DegreeCoursesTab/Degre
|
|||||||
import { useGetProgressCriteriaQuery } from '@/redux/progressCriteria'
|
import { useGetProgressCriteriaQuery } from '@/redux/progressCriteria'
|
||||||
import { isBachelorOrLicentiateProgramme } from '@/util/studyProgramme'
|
import { isBachelorOrLicentiateProgramme } from '@/util/studyProgramme'
|
||||||
import { Module, ProgrammeCourse } from '@oodikone/shared/types'
|
import { Module, ProgrammeCourse } from '@oodikone/shared/types'
|
||||||
|
import { Section } from '@/components/Section'
|
||||||
|
import { useLanguage } from '@/components/LanguagePicker/useLanguage'
|
||||||
|
import { studyProgrammeToolTips } from '@/common/InfoToolTips'
|
||||||
|
|
||||||
export const DegreeCoursesTab = ({
|
export const DegreeCoursesTab = ({
|
||||||
combinedProgramme,
|
combinedProgramme,
|
||||||
@@ -22,6 +25,7 @@ export const DegreeCoursesTab = ({
|
|||||||
const [secondProgrammeModules, setSecondProgrammeModules] = useState<Module[]>([])
|
const [secondProgrammeModules, setSecondProgrammeModules] = useState<Module[]>([])
|
||||||
const [curriculum, curriculumList, setCurriculum] = useCurriculumState(degreeProgramme, new Date().getFullYear())
|
const [curriculum, curriculumList, setCurriculum] = useCurriculumState(degreeProgramme, new Date().getFullYear())
|
||||||
const { data: criteria } = useGetProgressCriteriaQuery({ programmeCode: degreeProgramme })
|
const { data: criteria } = useGetProgressCriteriaQuery({ programmeCode: degreeProgramme })
|
||||||
|
const { getTextIn } = useLanguage()
|
||||||
|
|
||||||
const getModules = (courses: ProgrammeCourse[]): Module[] => {
|
const getModules = (courses: ProgrammeCourse[]): Module[] => {
|
||||||
const modules: Record<string, ProgrammeCourse[]> = {}
|
const modules: Record<string, ProgrammeCourse[]> = {}
|
||||||
@@ -60,24 +64,31 @@ export const DegreeCoursesTab = ({
|
|||||||
{isBachelorOrLicentiateProgramme(degreeProgramme) && (
|
{isBachelorOrLicentiateProgramme(degreeProgramme) && (
|
||||||
<CreditCriteriaSection criteria={criteria} degreeProgramme={degreeProgramme} />
|
<CreditCriteriaSection criteria={criteria} degreeProgramme={degreeProgramme} />
|
||||||
)}
|
)}
|
||||||
{defaultProgrammeModules.length > 1 && curriculum ? (
|
{curriculum && (!!defaultProgrammeModules.length || !!secondProgrammeModules.length) && (
|
||||||
<DegreeCourseTable
|
<Section
|
||||||
combinedProgramme=""
|
title="Course & module criterion and visibility"
|
||||||
criteria={criteria}
|
infoBoxContent={getTextIn(studyProgrammeToolTips.degreeCoursesTab.programmeCriteriaAndVisibility) ?? ''}
|
||||||
curriculumVersion={curriculum.periodIds}
|
>
|
||||||
modules={defaultProgrammeModules}
|
{!!defaultProgrammeModules.length && (
|
||||||
studyProgramme={degreeProgramme}
|
<DegreeCourseTable
|
||||||
/>
|
combinedProgramme=""
|
||||||
) : null}
|
criteria={criteria}
|
||||||
{secondProgrammeModules.length > 0 && curriculum ? (
|
curriculumVersion={curriculum.periodIds}
|
||||||
<DegreeCourseTable
|
modules={defaultProgrammeModules}
|
||||||
combinedProgramme={combinedProgramme}
|
studyProgramme={degreeProgramme}
|
||||||
criteria={criteria}
|
/>
|
||||||
curriculumVersion={curriculum.periodIds}
|
)}
|
||||||
modules={secondProgrammeModules}
|
{!!secondProgrammeModules.length && (
|
||||||
studyProgramme={degreeProgramme}
|
<DegreeCourseTable
|
||||||
/>
|
combinedProgramme={combinedProgramme}
|
||||||
) : null}
|
criteria={criteria}
|
||||||
|
curriculumVersion={curriculum.periodIds}
|
||||||
|
modules={secondProgrammeModules}
|
||||||
|
studyProgramme={degreeProgramme}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</Section>
|
||||||
|
)}
|
||||||
</Stack>
|
</Stack>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user