GEWIS / gewisweb

The website for GEmeenschap van Wiskunde en Informatica Studenten.

Home Page:https://gewis.nl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ATHENA Function ordering on their fraternity page is wrong

Yaneriaf opened this issue · comments

Current behaviour

The current ordering is
Chair
Treasurer
Vice-Chair
Secretary

Desired behaviour

Preferably, this ordering would be
Chair
Secretary
Treasurer
Vice-Chair

This would be in line with the other fraternities (and organs for that matter) (except I.V.V, but that is due to people having double functions.)

Steps to reproduce

Open the website
Open the fraternity page of ATHENA
It is there.

Website version

v4.1

What operating are you seeing the problem on?

Windows

What browsers are you seeing the problem on?

Firefox

Other information

Would be a nice first issue :)

Sorting of the functions happens here:

// Sort members by function
usort($activeMembers, static function ($a, $b) {
if ($a['functions'] === $b['functions']) {
return 0;
}
if (count($a['functions']) > count($b['functions'])) {
return -1;
}
return in_array('Voorzitter', $a['functions']) ? -1 : 1;
});

It only tries to put the chair first (or people with more functions).