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: {
|
||||
creditCriteria: `
|
||||
Here you can change visibility of degree courses as and set course and credits criteria, for each year their
|
||||
own. Credits criteria is computed as follows: for the first academic year the credits are taken into account
|
||||
if they are completed during the first 12 months. For the second year, we take into account the completions
|
||||
during the first 24 months, for the third year the first 36 months.
|
||||
|
||||
The progress of the students by these criteria will be shown in class statistics view.
|
||||
creditCriteria: {
|
||||
en: `The criteria set here will affect the Progress tab within Class Statistics → Students tab.
|
||||
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, completions
|
||||
within the first 24 months, and so on.
|
||||
`,
|
||||
},
|
||||
},
|
||||
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
|
||||
notCompleted: `
|
||||
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 (
|
||||
<>
|
||||
<Button onClick={() => setModalOpen(true)} startIcon={<VisibilityIcon />} variant="outlined">
|
||||
Manage Courses Shown
|
||||
Manage shown courses
|
||||
</Button>
|
||||
<Dialog maxWidth="md" onClose={() => setModalOpen(false)} open={modalOpen}>
|
||||
<DialogTitle>Degree programme settings</DialogTitle>
|
||||
|
||||
+3
-1
@@ -14,6 +14,7 @@ import { useAddProgressCriteriaCreditsMutation } from '@/redux/progressCriteria'
|
||||
import { SaveIcon } from '@/theme'
|
||||
import { isMedicalProgramme } from '@/util/studyProgramme'
|
||||
import { ProgressCriteria } from '@oodikone/shared/types'
|
||||
import { useLanguage } from '@/components/LanguagePicker/useLanguage'
|
||||
|
||||
const emptyCredits = {
|
||||
year1: null,
|
||||
@@ -32,6 +33,7 @@ export const CreditCriteriaSection = ({
|
||||
degreeProgramme: string
|
||||
}) => {
|
||||
const [creditLimits, setCreditLimits] = useState<Record<string, null | number>>(emptyCredits)
|
||||
const { getTextIn } = useLanguage()
|
||||
|
||||
const [addProgressCriteriaCredits, { isError, isSuccess }] = useAddProgressCriteriaCreditsMutation()
|
||||
const { setStatusNotification } = useStatusNotification()
|
||||
@@ -109,7 +111,7 @@ export const CreditCriteriaSection = ({
|
||||
return (
|
||||
<Section
|
||||
cypress="credit-criteria"
|
||||
infoBoxContent={studyProgrammeToolTips.degreeCoursesTab.creditCriteria}
|
||||
infoBoxContent={getTextIn(studyProgrammeToolTips.degreeCoursesTab.creditCriteria) ?? ''}
|
||||
title="Credit criteria"
|
||||
>
|
||||
<Stack gap={2}>
|
||||
|
||||
@@ -10,6 +10,9 @@ import { DegreeCourseTable } from '@/pages/StudyProgramme/DegreeCoursesTab/Degre
|
||||
import { useGetProgressCriteriaQuery } from '@/redux/progressCriteria'
|
||||
import { isBachelorOrLicentiateProgramme } from '@/util/studyProgramme'
|
||||
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 = ({
|
||||
combinedProgramme,
|
||||
@@ -22,6 +25,7 @@ export const DegreeCoursesTab = ({
|
||||
const [secondProgrammeModules, setSecondProgrammeModules] = useState<Module[]>([])
|
||||
const [curriculum, curriculumList, setCurriculum] = useCurriculumState(degreeProgramme, new Date().getFullYear())
|
||||
const { data: criteria } = useGetProgressCriteriaQuery({ programmeCode: degreeProgramme })
|
||||
const { getTextIn } = useLanguage()
|
||||
|
||||
const getModules = (courses: ProgrammeCourse[]): Module[] => {
|
||||
const modules: Record<string, ProgrammeCourse[]> = {}
|
||||
@@ -60,24 +64,31 @@ export const DegreeCoursesTab = ({
|
||||
{isBachelorOrLicentiateProgramme(degreeProgramme) && (
|
||||
<CreditCriteriaSection criteria={criteria} degreeProgramme={degreeProgramme} />
|
||||
)}
|
||||
{defaultProgrammeModules.length > 1 && curriculum ? (
|
||||
<DegreeCourseTable
|
||||
combinedProgramme=""
|
||||
criteria={criteria}
|
||||
curriculumVersion={curriculum.periodIds}
|
||||
modules={defaultProgrammeModules}
|
||||
studyProgramme={degreeProgramme}
|
||||
/>
|
||||
) : null}
|
||||
{secondProgrammeModules.length > 0 && curriculum ? (
|
||||
<DegreeCourseTable
|
||||
combinedProgramme={combinedProgramme}
|
||||
criteria={criteria}
|
||||
curriculumVersion={curriculum.periodIds}
|
||||
modules={secondProgrammeModules}
|
||||
studyProgramme={degreeProgramme}
|
||||
/>
|
||||
) : null}
|
||||
{curriculum && (!!defaultProgrammeModules.length || !!secondProgrammeModules.length) && (
|
||||
<Section
|
||||
title="Course & module criterion and visibility"
|
||||
infoBoxContent={getTextIn(studyProgrammeToolTips.degreeCoursesTab.programmeCriteriaAndVisibility) ?? ''}
|
||||
>
|
||||
{!!defaultProgrammeModules.length && (
|
||||
<DegreeCourseTable
|
||||
combinedProgramme=""
|
||||
criteria={criteria}
|
||||
curriculumVersion={curriculum.periodIds}
|
||||
modules={defaultProgrammeModules}
|
||||
studyProgramme={degreeProgramme}
|
||||
/>
|
||||
)}
|
||||
{!!secondProgrammeModules.length && (
|
||||
<DegreeCourseTable
|
||||
combinedProgramme={combinedProgramme}
|
||||
criteria={criteria}
|
||||
curriculumVersion={curriculum.periodIds}
|
||||
modules={secondProgrammeModules}
|
||||
studyProgramme={degreeProgramme}
|
||||
/>
|
||||
)}
|
||||
</Section>
|
||||
)}
|
||||
</Stack>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user