Skip to content

Commit

Permalink
Merge branch 'main' into devdb
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzocorallo authored Apr 2, 2024
2 parents 8c04002 + 9912552 commit f39109d
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 60 deletions.
5 changes: 5 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# In general, requires PRs to be reviewd by tol-admins
* @PoliNetworkOrg/tol-admins

# The following are exceptions to the above rule
/docs/
72 changes: 34 additions & 38 deletions src/components/pages/About.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
import { links, members } from '../../utils/constants'
import {
MemberRole,
MemberRoleKeys,
links,
members
} from '../../utils/constants'
import { StyleSheet, theme } from '../../utils/style'
import telegramLogo from '../../static/telegram_logo.svg'
import Wrapper from '../Util/Wrapper'
Expand All @@ -25,6 +30,11 @@ const styles = StyleSheet.create({
alignItems: 'flex-start',
height: '100%',
gap: 10,
textAlign: 'left',
flex: 1
},
fullWidth: {
width: '100%',
textAlign: 'left'
},
link: {
Expand Down Expand Up @@ -64,13 +74,23 @@ export default function About() {
</p>
<div style={{ ...styles.grid, flexDirection: mobile ? 'column' : 'row' }}>
<div style={styles.col}>
<ProjectTeam />
<MembersByRole
role={MemberRole.ProjectLeader}
titleKey="about.roles.projectLeader"
/>
<MembersByRole
role={MemberRole.Author}
titleKey="about.roles.author"
/>
</div>
<div style={styles.col}>
<AdHoc />
<TgGroups />
<MembersByRole role={MemberRole.Dev} titleKey="about.roles.dev" />
<MembersByRole role={MemberRole.AdHoc} titleKey="about.roles.adHoc" />
</div>
</div>
<div style={styles.fullWidth}>
<TgGroups />
</div>
</Wrapper>
)
}
Expand All @@ -83,49 +103,25 @@ function TgLogo() {
)
}

function ProjectTeam() {
const { t } = useTranslation()
const team = members
.filter((m) => !m.ah)
.sort((a, b) => (a.name.toUpperCase() > b.name.toUpperCase() ? 1 : -1))

return (
<div>
<b>{t('about.projectTeam')}</b>
<ul style={styles.list}>
{team.map((m, i) => (
<li key={i}>
<p style={styles.liP}>
{(m.prefix || '') + ' ' + m.name}{' '}
<a
href={`https://t.me/${m.tg}`}
target="_blank"
rel="noreferrer noopener"
style={styles.telegramLink}
>
<TgLogo />
</a>
</p>
</li>
))}
</ul>
</div>
)
interface MembersByRoleProps {
role: MemberRoleKeys
titleKey: string
}

function AdHoc() {
const ah = members
.filter((m) => !!m.ah)
function MembersByRole({ role, titleKey }: MembersByRoleProps) {
const { t } = useTranslation()
const filteredByRole = members
.filter((m) => m.roles.includes(role))
.sort((a, b) => (a.name.toUpperCase() > b.name.toUpperCase() ? 1 : -1))

return (
<div>
<span>Ad hoc</span>
<b>{t(titleKey)}</b>
<ul style={styles.list}>
{ah.map((m, i) => (
{filteredByRole.map((m, i) => (
<li key={i}>
<p style={styles.liP}>
{m.name}{' '}
{(m.prefix || '') + ' ' + m.name}{' '}
<a
href={`https://t.me/${m.tg}`}
target="_blank"
Expand Down
11 changes: 8 additions & 3 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@
"dsaInfo": "Students with Specific Learning Disorders (SLD) taking the TOL are eligible for an additional 30 percent time, provided they disclose it when registering for the test. A certification stating the SLD diagnosis is also required. Selecting \"Student with SLD\" will apply the bonus time in this simulation as well."
},
"about": {
"main": "In order to be admitted to the Engineering school of Politecnico di Milano (PoliMi), the aspiring freshmen must pass the admission test (TOL). <br /> Among the resources that PoliMi offers for free to prepare, you can find: the Politest, a collection of commented and solved exercises, the DOL, an online demo with a limited number of questions, and two complete self-assessment tests (pdf with questions, xls with exact answers). <br /> <br /> Thus, we did not have a complete, web-based TOL simulation, that is, in the same environment in which the future freshmen will take the admission test. <br /> We have set ourself the goal of creating a complete and free TOL simulation, in order to provide aspiring freshmen with a familiar environment in which to practice, very similar to the one they will encounter at the admission test. <br /> The project is fully managed by students, from developing the web application to creating the TOL questions.",
"projectTeam": "Project team",
"main": "We have developed a comprehensive, open source and free TOL simulator to provide aspiring Engineering freshmen with a familiar environment in which to practice, very similar to what they will encounter on the official admission test of Politecnico di Milano. <br/><br/>It is the only one fully compliant with the TOL training requirements of the Politecnico di Milano and completely managed by students, from the development of the web application to the creation of the TOL questions.",
"roles": {
"projectLeader": "Creator & Project Leader",
"dev": "Developers",
"author": "Authors",
"adHoc": "Ad Hoc"
},
"supportGroups": {
"head": "Support groups",
"1": "Project feedback & info: <tgProject>$t(tg.project) <tgLogo /></tgProject>",
Expand Down Expand Up @@ -49,7 +54,7 @@
"pointsCalc": {
"title": "How the score is calculated",
"body": {
"1": "The <strong>maximum achievable score</strong> <strong>is {{v1}} </strong> and is expressed to the second decimal place. <br /> To gain access to the <strong>standard rankings</strong>, you need to get a score <strong>higher or equal to {{v2}}</strong>. <br /> You can consult the rankings from the previous years on <rankingsLink>$t(externalLinks.rankings)</rankingsLink>. <br /> To gain eligibility for enrollment in the <strong>Early TOL</strong> (while enrolled in the penultimate year of upper secondary school) you need to get a score <strong>higher or equal to {{v3}}</strong>. <br /> The attribution of <strong>OFA TENG</strong> occurs when, considering only the {{v4}} section, the number of correct answers <strong>is less than {{v5}}</strong>. <br />",
"1": "The <strong>maximum achievable score</strong> <strong>is {{v1}} </strong> and is expressed to the second decimal place. <br /> To gain access to the <strong>standard rankings</strong>, you need to get a score <strong>higher or equal to {{v2}}</strong>. <br /> <br />You can consult the rankings from the previous years on <rankingsLink>$t(externalLinks.rankings)</rankingsLink>. <br /> <br />To gain eligibility for enrollment in the <strong>Early TOL</strong> (while enrolled in the penultimate year of upper secondary school) you need to get a score <strong>higher or equal to {{v3}}</strong>. <br /> The attribution of <strong>OFA TENG</strong> occurs when, considering only the {{v4}} section, the number of correct answers <strong>is less than {{v5}}</strong>. <br />",
"2": "The <strong>total score</strong> gets rounded to the nearest integer (e.g., 74,49 gets rounded to 74, while 74,50 to 75)"
},
"ul": {
Expand Down
11 changes: 8 additions & 3 deletions src/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@
"dsaInfo": "Gli studenti con Disturbi Specifici dell'Apprendimento (DSA) che affrontano il TOL possono usufruire di un tempo supplementare pari al 30%, previa segnalazione in fase di iscrizione al test. È inoltre richiesta una certificazione attestante la diagnosi di DSA. Selezionando \"Studente con DSA\" verrà applicato il tempo bonus in questa simulazione."
},
"about": {
"main": "Per poter essere ammessi alla scuola di Ingegneria del Politecnico di Milano (PoliMi), le aspiranti matricole devono superare il test di ammissione (TOL). <br /> Tra le risorse che il PoliMi offre gratuitamente per prepararsi abbiamo: il Politest, una raccolta di esercizi commentati e risolti, la DOL, una demo online con un numero ridotto di domande, e due test di autovalutazione completi (pdf con domande, xls con risposte esatte). <br /> <br /> Non avevamo dunque una simulazione TOL completa e basata sul web, ovvero nello stesso ambiente in cui le future matricole sosterranno il test di ammissione. <br /> Ci siamo posti l'obiettivo di creare una simulazione TOL completa e gratuita, al fine di fornire alle aspiranti matricole un ambiente familiare dove esercitarsi, molto simile a quello che incontreranno al test di ammissione. <br /> Il progetto è completamente gestito dagli studenti, dallo sviluppo dell'applicazione web alla creazione delle domande TOL. ",
"projectTeam": "Team del progetto",
"main": "Abbiamo sviluppato un simulatore TOL completo, open source e gratuito per fornire alle aspiranti matricole di Ingegneria un ambiente familiare in cui esercitarsi, molto simile a quello che incontreranno al test di ammissione ufficiale del Politecnico di Milano. <br /><br /> È l'unico totalmente conforme ai requisiti formativi del TOL del Politecnico di Milano e completamente gestito da studenti, dallo sviluppo dell'applicazione web alla creazione dei quesiti TOL.",
"roles": {
"projectLeader": "Ideatore e Responsabile del Progetto",
"dev": "Sviluppatori",
"author": "Autori",
"adHoc": "Ad Hoc"
},
"supportGroups": {
"head": "Gruppi di supporto",
"1": "Segnalazioni e informazioni sul progetto: <tgProject>$t(tg.project) <tgLogo /></tgProject>",
Expand Down Expand Up @@ -49,7 +54,7 @@
"pointsCalc": {
"title": "Come viene calcolato il punteggio",
"body": {
"1": "Il <strong>punteggio massimo</strong> conseguibile <strong>è di {{v1}} </strong> e viene espresso fino alla seconda cifra decimale. <br /> Per accedere alla <strong>graduatoria standard</strong> bisogna ottenere un punteggio <strong>uguale o superiore a {{v2}}</strong>. <br /> Puoi consultare le graduatorie degli anni precedenti su <rankingsLink>$t(externalLinks.rankings)</rankingsLink>. <br /> Per ottenere il diritto di immatricolazione nel <strong>TOL Anticipato</strong> (se iscritto al penultimo anno di superiori) serve ottenere un punteggio <strong>maggiore o uguale a {{v3}}</strong>. <br /> L'attribuzione di <strong>OFA TENG</strong> avviene quando, considerando la sola sezione di {{v4}}, il numero di risposte corrette <strong>è inferiore a {{v5}}</strong>. <br />",
"1": "Il <strong>punteggio massimo</strong> conseguibile <strong>è di {{v1}} </strong> e viene espresso fino alla seconda cifra decimale. <br /> Per accedere alla <strong>graduatoria standard</strong> bisogna ottenere un punteggio <strong>uguale o superiore a {{v2}}</strong>. <br /> <br />Puoi consultare le graduatorie degli anni precedenti su <rankingsLink>$t(externalLinks.rankings)</rankingsLink>. <br /> <br />Per ottenere il diritto di immatricolazione nel <strong>TOL Anticipato</strong> (se iscritto al penultimo anno di superiori) serve ottenere un punteggio <strong>maggiore o uguale a {{v3}}</strong>. <br /> L'attribuzione di <strong>OFA TENG</strong> avviene quando, considerando la sola sezione di {{v4}}, il numero di risposte corrette <strong>è inferiore a {{v5}}</strong>. <br />",
"2": "Il <strong>punteggio</strong> complessivo viene arrotondato all'intero più vicino (es: il punteggio 74,49 viene arrotondato a 74, il punteggio 74,50 a 75)"
},
"ul": {
Expand Down
61 changes: 45 additions & 16 deletions src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,75 +89,104 @@ export function getNextSection(currentSection: Section): Section | undefined {
return (sortedInfo[i + 1] || [])[0]
}

export const MemberRole = {
ProjectLeader: 'PROJECT_LEADER',
Author: 'AUTHOR',
Dev: 'DEVELOPER',
AdHoc: 'AD_HOC'
} as const

export type MemberRoleKeys = (typeof MemberRole)[keyof typeof MemberRole]

interface Member {
name: string
tg: string
ah?: boolean
roles: MemberRoleKeys[]
prefix?: string
}

export const members: Member[] = [
{
name: 'Gabriele Zanini',
tg: 'zagbc'
tg: 'zagbc',
roles: [MemberRole.ProjectLeader, MemberRole.Author]
},
{
name: 'Federico Grandi',
tg: 'federico_grandi'
tg: 'federico_grandi',
roles: [MemberRole.Author, MemberRole.Dev]
},
{
name: 'Ilaria Corcelli',
tg: 'iilaria01'
tg: 'iilaria01',
roles: [MemberRole.Author]
},
{
name: 'Matteo Salicandro',
tg: 'Mattysal'
tg: 'Mattysal',
roles: [MemberRole.Author]
},
{
name: 'Nicolas Facchin',
tg: 'SuperRollyNoka'
tg: 'Noka_la_Foka',
roles: [MemberRole.Author]
},
{
name: 'Elia Maggioni',
tg: 'EliaMaggioni',
ah: true
tg: 'maggelia',
roles: [MemberRole.AdHoc]
},
{
name: 'Diego Aldarese',
tg: 'diegoaldarese',
ah: true
roles: [MemberRole.AdHoc]
},
{
name: 'Tommaso Morganti',
tg: 'toto04_1'
tg: 'toto04_1',
roles: [MemberRole.Dev]
},
{
name: 'Giovanni Menicucci',
tg: 'giova1211'
tg: 'giova1211',
roles: [MemberRole.Author]
},
{
name: 'Nadia Scappini',
tg: 'nscapp',
prefix: 'Prof.ssa'
prefix: 'Prof.ssa',
roles: [MemberRole.Author]
},
{
name: '@spyarect',
tg: 'spyarect',
ah: true
roles: [MemberRole.AdHoc]
},
{
name: 'Clelia Di Leo',
tg: 'cloelia',
prefix: 'Prof.ssa'
prefix: 'Prof.ssa',
roles: [MemberRole.Author]
},
{
name: 'Raif Muhammad',
tg: 'Raif9',
ah: true
roles: [MemberRole.AdHoc]
},
{
name: 'Lorenzo Corallo',
tg: 'lorenzocorallo'
tg: 'lorenzocorallo',
roles: [MemberRole.Dev]
},
{
name: 'Caleb Koomson',
tg: 'koomson1',
roles: [MemberRole.Author]
},
{
name: 'Lorenzo Matteo Salvatori',
tg: 'Lorenz02003',
roles: [MemberRole.Author]
}
]

Expand Down

0 comments on commit f39109d

Please sign in to comment.