mirror of
https://github.com/UniversityOfHelsinkiCS/oodikone.git
synced 2026-10-12 19:03:39 +03:00
replace studytrack status 'inactive' to 'passive'
This commit is contained in:
@@ -319,7 +319,7 @@ describe('Degree programme overview', () => {
|
||||
|
||||
it('Students of the degree programme are shown correctly', () => {
|
||||
const tableContents = [
|
||||
// [Year, All, Started studying, Present, Absent, Inactive, Graduated, Men, Women, Other/Unknown, Finland, Other]
|
||||
// [Year, All, Started studying, Present, Absent, Passive, Graduated, Men, Women, Other/Unknown, Finland, Other]
|
||||
['2023 - 2024', 8, 8, 0, 0, 8, 0, 5, 3, 0, 8, 1],
|
||||
['2022 - 2023', 26, 25, 0, 0, 24, 2, 19, 7, 0, 25, 1],
|
||||
['2021 - 2022', 38, 29, 0, 0, 33, 5, 29, 9, 0, 36, 4],
|
||||
@@ -465,7 +465,7 @@ describe('Degree programme overview', () => {
|
||||
it('Students of the study track are shown correctly', () => {
|
||||
cy.cs('study-track-overview-section').contains('Students of the study track MAT-MAT by starting year')
|
||||
const tableContents = [
|
||||
// [Year, All, Started studying, Present, Absent, Inactive, Graduated, Men, Women, Other/Unknown, Finland, Other]
|
||||
// [Year, All, Started studying, Present, Absent, Passive, Graduated, Men, Women, Other/Unknown, Finland, Other]
|
||||
['2022 - 2023', 3, 3, 0, 0, 1, 2, 2, 1, 0, 3, 0],
|
||||
['2021 - 2022', 5, 1, 0, 0, 1, 4, 3, 2, 0, 5, 0],
|
||||
['2020 - 2021', 13, 10, 0, 0, 1, 12, 7, 6, 0, 12, 3],
|
||||
|
||||
@@ -273,12 +273,12 @@ describe('Population Statistics with Bachelor + Master', { testIsolation: false
|
||||
checkFilteredStudentCount(0)
|
||||
|
||||
// Non-Bachelor
|
||||
cy.get('input[name="studyRightStatusFilter"][value="Inactive Bachelor study right"]').click()
|
||||
cy.get('input[name="studyRightStatusFilter"][value="Inactive Bachelor study right"]').should('be.checked')
|
||||
cy.get('input[name="studyRightStatusFilter"][value="Passive Bachelor study right"]').click()
|
||||
cy.get('input[name="studyRightStatusFilter"][value="Passive Bachelor study right"]').should('be.checked')
|
||||
checkFilteredStudentCount(5)
|
||||
// Non-Master (combined)
|
||||
cy.get('input[name="studyRightStatusFilter"][value="Inactive Master study right"]').click()
|
||||
cy.get('input[name="studyRightStatusFilter"][value="Inactive Master study right"]').should('be.checked')
|
||||
cy.get('input[name="studyRightStatusFilter"][value="Passive Master study right"]').click()
|
||||
cy.get('input[name="studyRightStatusFilter"][value="Passive Master study right"]').should('be.checked')
|
||||
checkFilteredStudentCount(24)
|
||||
|
||||
cy.cs('studyRightStatusFilter-clear').click()
|
||||
|
||||
@@ -36,7 +36,7 @@ All things listed below should work automatically, if new combinations are done.
|
||||
|
||||
- _Students of the studyprogramme by starting year_
|
||||
- Graduated field separated for both programmes
|
||||
- All = currently enrolled + absent + inactive + graduated licentiate
|
||||
- All = currently enrolled + absent + passive + graduated licentiate
|
||||
- _Progress of students of the studyprogramme by starting year_
|
||||
- computed for whole bachelor + master/licentiate studyright period
|
||||
- _Average graduation times_
|
||||
@@ -85,7 +85,7 @@ All things listed below should work automatically, if new combinations are done.
|
||||
|
||||
- **Graduated from programme** - possibility to filter out students based on graduation either in bachelor's or master's.
|
||||
|
||||
- **Studyright status** - active or inactive based on the chosen degree
|
||||
- **Studyright status** - active or passive based on the chosen degree
|
||||
|
||||
- **Studytrack filter** (needs programme code) is not touched at the moment, thus **may need future manual work**.
|
||||
|
||||
|
||||
@@ -55,11 +55,11 @@ The `semester_enrollments` column is an array of JSON objects. Each object conta
|
||||
|
||||
The `type` field represents one of the following enrollment types. The `semester` field refers to a semester code, defined as `semestercode` in the model Semester.
|
||||
|
||||
| value | meaning | notes |
|
||||
| ----: | :------- | :------------------------------- |
|
||||
| 1 | Present | |
|
||||
| 2 | Absent | |
|
||||
| 3 | Inactive | neither 1 or 2 has been declared |
|
||||
| value | meaning | notes |
|
||||
| ----: | :------ | :------------------------------- |
|
||||
| 1 | Present | |
|
||||
| 2 | Absent | |
|
||||
| 3 | Passive | neither 1 or 2 has been declared |
|
||||
|
||||
## Credit type code
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ export const tableTitles = {
|
||||
'Transferred credits',
|
||||
],
|
||||
},
|
||||
studytracksStart: ['', 'All', 'Started\nstudying', 'Present', 'Absent', 'Inactive'],
|
||||
studytracksStart: ['', 'All', 'Started\nstudying', 'Present', 'Absent', 'Passive'],
|
||||
studytracksBasic: ['Graduated'],
|
||||
studytracksCombined: {
|
||||
licentiate: ['Graduated bachelor', 'Graduated licentiate'],
|
||||
|
||||
@@ -82,7 +82,7 @@ const getEmptyYear = () => ({
|
||||
started: 0,
|
||||
present: 0,
|
||||
absent: 0,
|
||||
inactive: 0,
|
||||
passive: 0,
|
||||
graduated: 0,
|
||||
graduatedCombinedProgramme: 0,
|
||||
male: 0,
|
||||
@@ -128,8 +128,8 @@ const combineStats = (
|
||||
getPercentage(yearStats.present, yearStats.all),
|
||||
yearStats.absent,
|
||||
getPercentage(yearStats.absent, yearStats.all),
|
||||
yearStats.inactive,
|
||||
getPercentage(yearStats.inactive, yearStats.all),
|
||||
yearStats.passive,
|
||||
getPercentage(yearStats.passive, yearStats.all),
|
||||
yearStats.graduated,
|
||||
getPercentage(yearStats.graduated, yearStats.all),
|
||||
yearStats.male,
|
||||
@@ -244,7 +244,7 @@ const getMainStatsByTrackAndYear = async (
|
||||
} else if (currentSemesterStatus === EnrollmentType.ABSENT) {
|
||||
yearlyStats[year][programmeOrStudyTrack].absent += 1
|
||||
} else {
|
||||
yearlyStats[year][programmeOrStudyTrack].inactive += 1
|
||||
yearlyStats[year][programmeOrStudyTrack].passive += 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ export const filterToolTips = {
|
||||
studyRightStatus: `
|
||||
Opiskeluoikeus on **aktiivinen** (active), jos opiskelija on ilmoittautunut läsnä- tai poissaolevaksi käynnissä olevalle lukukaudelle.
|
||||
|
||||
Opiskeluoikeus on **passiivinen** (inactive), jos opiskelija ei ole ilmoittautunut läsnä- eikä poissaolevaksi käynnissä olevalle lukukaudelle.
|
||||
Opiskeluoikeus on **passiivinen** (passive), jos opiskelija ei ole ilmoittautunut läsnä- eikä poissaolevaksi käynnissä olevalle lukukaudelle.
|
||||
|
||||
Lukukausi-ilmoittautumisissa huomioidaan vain se opiskeluoikeus, joka liittyy tarkasteltavaan koulutusohjelmaan. Valmistuneet opiskelijat on **suodatettu pois** molemmista kategorioista.
|
||||
`,
|
||||
|
||||
@@ -4,7 +4,7 @@ export const studentToolTips = {
|
||||
|
||||
**Active:** Student has a semester enrollment to the corresponding programme as present.
|
||||
**Absent:** Student has a semester enrollment to the corresponding programme as absent.
|
||||
**Inactive:** Student has not enrolled to the corresponding programme this semester.
|
||||
**Passive:** Student has not enrolled to the corresponding programme this semester.
|
||||
**Cancelled:** Study right for the corresponding programme is cancelled.
|
||||
**Graduated:** Student has graduated from the corresponding programme.
|
||||
`,
|
||||
|
||||
@@ -113,9 +113,9 @@ export const studyProgrammeToolTips: Record<string, string> = {
|
||||
- **Present**: Käynnissä olevalle lukukaudelle **läsnäolevaksi** ilmoittautuneet opiskelijat, jotka eivät ole valmistuneet koulutusohjelmasta
|
||||
- **Absent**: Käynnissä olevalle lukukaudelle **poissaolevaksi** ilmoittautuneet opiskelijat, jotka eivät ole valmistuneet koulutusohjelmasta
|
||||
- **Graduated**: Koulutusohjelmasta valmistuneet opiskelijat
|
||||
- **Inactive**: Opiskelijat, jotka eivät ole valmistuneet koulutusohjelmasta eivätkä ilmoittautuneet läsnä- tai poissaolevaksi käynnissä olevalle lukukaudelle
|
||||
- **Passive**: Opiskelijat, jotka eivät ole valmistuneet koulutusohjelmasta eivätkä ilmoittautuneet läsnä- tai poissaolevaksi käynnissä olevalle lukukaudelle
|
||||
|
||||
Lukukausi-ilmoittautumisissa huomioidaan vain se opiskeluoikeus, joka liittyy tarkasteltavaan koulutusohjelmaan. Vaikka opiskelija olisi ilmoittautunut toiseen opiskeluoikeuteen läsnäolevaksi, mutta hän on laiminlyönyt ilmoittautumisen tarkasteltavaan koulutusohjelmaan liittyvään opiskeluoikeuteen, hänet lasketaan ryhmään ”Inactive”.
|
||||
Lukukausi-ilmoittautumisissa huomioidaan vain se opiskeluoikeus, joka liittyy tarkasteltavaan koulutusohjelmaan. Vaikka opiskelija olisi ilmoittautunut toiseen opiskeluoikeuteen läsnäolevaksi, mutta hän on laiminlyönyt ilmoittautumisen tarkasteltavaan koulutusohjelmaan liittyvään opiskeluoikeuteen, hänet lasketaan ryhmään ”Passive”.
|
||||
|
||||
Paksummilla pystyviivoilla eroteltujen kategorioiden (**Current status**, **Gender**) sarakkeet tuottavat yhteenlaskettuna kentän **All** arvon. **Citizenships**-kategoriat (**Finland** ja **Other**) voivat tuottaa yhteenlaskettuna suuremman tuloksen, koska opiskelijoilla voi olla useampi kuin yksi kansalaisuus.
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ export const getStudyRightStatusText = (
|
||||
if (programme.cancelled) return 'Cancelled'
|
||||
if (semesterEnrollmentAbsence(semestercode ?? NaN, studyRight?.semesterEnrollments)) return 'Absent'
|
||||
if (programme.active) return 'Active'
|
||||
return 'Inactive'
|
||||
return 'Passive'
|
||||
}
|
||||
|
||||
export const getStudentTotalCredits = (
|
||||
@@ -173,19 +173,19 @@ export const getAllProgrammesOfStudent = (studyRights: FormattedStudent['studyRi
|
||||
|
||||
/**
|
||||
* @param targetSemester used for checking if study right was active at the time
|
||||
* @param filterInactive filters out programmes associated with inactive study rights
|
||||
* @param filterPassive filters out programmes associated with passive study rights
|
||||
* @param date only consider programmes that the student had started in prior to the date
|
||||
*/
|
||||
export const getNewestProgrammeOfStudentAt = (
|
||||
studyRights: FormattedStudent['studyRights'],
|
||||
targetSemester: number | undefined,
|
||||
filterInactive?: boolean,
|
||||
filterPassive?: boolean,
|
||||
date?: string
|
||||
) => {
|
||||
if (!targetSemester) return null
|
||||
|
||||
const allProgrammes = getAllProgrammesOfStudent(studyRights, targetSemester)
|
||||
const programmes = filterInactive ? allProgrammes.filter(prog => prog.active) : allProgrammes
|
||||
const programmes = filterPassive ? allProgrammes.filter(prog => prog.active) : allProgrammes
|
||||
|
||||
if (!date) return programmes.at(0) ?? null
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import { createFilter } from './createFilter'
|
||||
const STATUS_OPTIONS = [
|
||||
{ key: 'enrl-status-present', text: 'Present', value: 1 },
|
||||
{ key: 'enrl-status-absent', text: 'Absent', value: 2 },
|
||||
{ key: 'enrl-status-inactive', text: 'Passive', value: 3 },
|
||||
{ key: 'enrl-status-passive', text: 'Passive', value: 3 },
|
||||
]
|
||||
|
||||
const EnrollmentStatusFilterCard = ({ args, options, onOptionsChange }: FilterTrayProps) => {
|
||||
|
||||
@@ -27,14 +27,14 @@ const StudyRightStatusFilterCard = ({ args, options, onOptionsChange }: FilterTr
|
||||
? {
|
||||
All: () => toggle(null, false),
|
||||
[`Active ${restOfTitle}`]: () => toggle(true, false),
|
||||
[`Inactive ${restOfTitle}`]: () => toggle(false, false),
|
||||
[`Passive ${restOfTitle}`]: () => toggle(false, false),
|
||||
[`Active ${typeOfCombined} study right`]: () => toggle(true, true),
|
||||
[`Inactive ${typeOfCombined} study right`]: () => toggle(false, true),
|
||||
[`Passive ${typeOfCombined} study right`]: () => toggle(false, true),
|
||||
}
|
||||
: {
|
||||
All: () => toggle(null, false),
|
||||
[`Active ${restOfTitle}`]: () => toggle(true, false),
|
||||
[`Inactive ${restOfTitle}`]: () => toggle(false, false),
|
||||
[`Passive ${restOfTitle}`]: () => toggle(false, false),
|
||||
}
|
||||
|
||||
const modeOptions = Object.keys(modeObject).map(key => ({
|
||||
@@ -81,7 +81,7 @@ export const studyRightStatusFilter = createFilter({
|
||||
const currentSemesterCode = currentSemester.semestercode
|
||||
const enrollment = studyRight.semesterEnrollments?.find(enrollment => enrollment.semester === currentSemesterCode)
|
||||
const isActiveStudyRight = [EnrollmentType.PRESENT, EnrollmentType.ABSENT].includes(
|
||||
enrollment?.type ?? EnrollmentType.INACTIVE
|
||||
enrollment?.type ?? EnrollmentType.PASSIVE
|
||||
)
|
||||
|
||||
if (!showBachelorAndMaster) {
|
||||
|
||||
+3
-3
@@ -58,7 +58,7 @@ export const getSemestersPresentFunctions = ({
|
||||
return 'Enrolled as present'
|
||||
case EnrollmentType.ABSENT:
|
||||
return statutoryAbsence ? 'Enrolled as absent (statutory)' : 'Enrolled as absent'
|
||||
case EnrollmentType.INACTIVE:
|
||||
case EnrollmentType.PASSIVE:
|
||||
return 'Not enrolled'
|
||||
default:
|
||||
return 'No study right'
|
||||
@@ -71,7 +71,7 @@ export const getSemestersPresentFunctions = ({
|
||||
return 'present'
|
||||
case EnrollmentType.ABSENT:
|
||||
return statutoryAbsence ? 'absent-statutory' : 'absent'
|
||||
case EnrollmentType.INACTIVE:
|
||||
case EnrollmentType.PASSIVE:
|
||||
return 'passive'
|
||||
default:
|
||||
return 'none'
|
||||
@@ -118,7 +118,7 @@ export const getSemestersPresentFunctions = ({
|
||||
const getSemesterEnrollmentsVal = (studyright: CloseToGraduationData['studyright']) => {
|
||||
const enrollmentsToCount = studyright?.semesterEnrollments ?? []
|
||||
|
||||
/* Enrolled as present or non-statutory absence will add to the count (should inactive count too?) */
|
||||
/* Enrolled as present or non-statutory absence will add to the count (should passive count too?) */
|
||||
return enrollmentsToCount.reduce(
|
||||
(acc, cur) =>
|
||||
acc +
|
||||
|
||||
+2
-2
@@ -115,7 +115,7 @@ export const getSemesterEnrollmentsContent =
|
||||
return 'Enrolled as present'
|
||||
case EnrollmentType.ABSENT:
|
||||
return statutoryAbsence ? 'Enrolled as absent (statutory)' : 'Enrolled as absent'
|
||||
case EnrollmentType.INACTIVE:
|
||||
case EnrollmentType.PASSIVE:
|
||||
return 'Not enrolled'
|
||||
default:
|
||||
return 'No study right'
|
||||
@@ -128,7 +128,7 @@ export const getSemesterEnrollmentsContent =
|
||||
return 'present'
|
||||
case EnrollmentType.ABSENT:
|
||||
return statutoryAbsence ? 'absent-statutory' : 'absent'
|
||||
case EnrollmentType.INACTIVE:
|
||||
case EnrollmentType.PASSIVE:
|
||||
return 'passive'
|
||||
default:
|
||||
return 'none'
|
||||
|
||||
@@ -21,7 +21,7 @@ export const joinProgrammes = (
|
||||
const name = getTextIn(programme.name)
|
||||
if (includeMeta) {
|
||||
if (programme.graduated) return `${name} (graduated)`
|
||||
if (!programme.active) return `${name} (inactive)`
|
||||
if (!programme.active) return `${name} (passive)`
|
||||
}
|
||||
return name
|
||||
})
|
||||
|
||||
+1
-1
@@ -201,7 +201,7 @@ export const ProgressTable = ({ curriculum, students, months, programme, studyGu
|
||||
0: 'No information',
|
||||
1: 'Active',
|
||||
2: 'Absent',
|
||||
3: 'Inactive',
|
||||
3: 'Passive',
|
||||
}
|
||||
|
||||
const getSemesterEnrollmentVal = (student, semesters) => {
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ export const TableInfo = () => (
|
||||
<span className="enrollment-label label-absent" style={{ margin: 'auto 0' }} />: Student has enrolled as absent.
|
||||
</Typography>
|
||||
<Typography sx={{ display: 'flex' }}>
|
||||
<span className="enrollment-label label-passive" style={{ margin: 'auto 0' }} />: Inactive: Student did not enroll
|
||||
<span className="enrollment-label label-passive" style={{ margin: 'auto 0' }} />: Passive: Student did not enroll
|
||||
at all.
|
||||
</Typography>
|
||||
<Typography sx={{ display: 'flex' }}>
|
||||
|
||||
@@ -113,7 +113,7 @@ export const StudyrightsTable = ({
|
||||
if (studyRightRows.length === 0) return null
|
||||
|
||||
const RenderStatus = ({ studyRight }: { studyRight: (typeof studyRightRows)[number] }) => {
|
||||
let text = <span style={{ color: 'red', fontWeight: 'bolder' }}>INACTIVE</span>
|
||||
let text = <span style={{ color: 'red', fontWeight: 'bolder' }}>PASSIVE</span>
|
||||
|
||||
if (studyRight.graduated) {
|
||||
text = (
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export enum EnrollmentType {
|
||||
PRESENT = 1,
|
||||
ABSENT = 2,
|
||||
INACTIVE = 3,
|
||||
PASSIVE = 3,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user