Giter Site home page Giter Site logo

placoto's Introduction

#Free and open source Placement coordination tool

#About PlaCoTo includes a database of students, you can register with multiple groups. Users can enroll into placements and unselect deployments they don`t need and Timeframes in which they are unavailable. They can also see how many students applied for placements when choosing their preferences. Depending on their group they can use Jokers to have a date + placement preferment or priorities and location priorities, that are used to create an optimal outcome whole group. Admins can create a placement list and add placements, that can overlap or happen at different times and in different deployments. Each placement has a name (multiple placements can share the same name if they hapen on different timeframes) and a location (used as a preferrence if the program is unable to allocate your priorities in the first place). Placement lists have two statuses (activated and not activated). Enrollment and changing prefereneces is only able with active placements. An email reminder is sent upon activating a placement list.

#Placement calculation The program uses karma points to determine which students get placements if more than the available amount of students compete for a placement in every round. The algorithm for the generation of a (partly luck based) point system calculating the winners is in a group of students eligable (applies to the placement by Joker, current Priority or location) : x = smallest karma point in group (can be negative); y= student karma RANDOM Number between (squareroot(median(for each student in group: abs(x)+y))) and median(for each student in group: abs(x)+y))) * y

Succesful students get a deduction of their karma points. Students which select unavailable timeframes (coustum or calculated from the timeframes) get an initial deduction on karma points.

The program tries to allocate students first by their Joker priority (they get deducted after succesfully using them), then by their priorities (standard: 3 priorities, although they can be expanded to whatever amount you feel is right. If the program was unable to allocate a student by Joker or Priority it uses the location preferrence to distribute users to matching to their location preference. After this users are distributed to placements with minumum places until they are met and then just randomly.

If no placement was allocated to the student for this deployment or if students didn`t pick a preference for this deployment, students get a karma bonus (set it in the config file).

The program calculates a "happiness factor" for students, that is higher if they are allocated according to their top priorities. It also tries out random iterations for the placement (default setting is 5 can be increased to several thousands. It finally selects a table where all students are allocated and all minimum places are filled )if it can create one). The table with the highest happiness factor gets selected and if all students were allocated and minimum palces are filled emails are sent out to users otherwise, the program administrators get details about placement allocation via email.

#Email and Cronjobs This program juses crobjobs for 1) sending of emails - as the standard php email() function is used, sending mass emails is posted to a new script that handles mass sending of emails (eg after activation of a placement), so the scripts can run flawlessly and no email gets lost. 2) The calculation of a placement is done by a cronjonb task as well, to make it harder for administrators to influence the results of calculation.

#Install Upload the files to your webhost, make sure the database folder is not accessable to users. Set the options in the config.php file in the /site folder according to your preferences (setting up a recaptcha API is recommended to prevent user-spam). You can login (http://yoursite.com/admin.php) with the account "ADMIN" password "ADMIN" after uploading the files and get started. Groups have to be manually set by editing the groups.json file in /database now, but this feature will be released soon.

Set up two cronjobs: 1 linking to your calculate_placements.php (I would recommend setting the cronjob timer to 00:01 every day, as webserver traffic will be low and running this script locks the preferences process). Set another cronjob to run send_email_queue.php a couple of minutes after the calculate_placements.php cronjob was executed. You can also manually execute both cronjobs. They are likned from the admin panel.

Have fun!

placoto's People

Contributors

mad-de avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

flekr

placoto's Issues

create_placement groups left out

Notice: Undefined index: 0::group in /mnt/web3/d3/41/53150641/htdocs/placoto/site/modules/admin_create_placement.php on line 45 Notice: Undefined index: 2::group in /mnt/web3/d3/41/53150641/htdocs/placoto/site/modules/admin_create_placement.php on line 45

karma_deductions for multiple deployments

Report (Start: 10.07.2016-00:41:44)

Participating students:

Student ID: 1; Karma (after initial calculations): -4
Wishes for Test: JOKER: 1; PRIORITY 1: Test;
Wishes for TEST2: PRIORITY 1: TEST2;

Student ID: 21; Karma (after initial calculations): -7
Wishes for Test: JOKER: 1; PRIORITY 1: Test;
Wishes for TEST2: PRIORITY 1: TEST2;

Student ID: 27; Karma (after initial calculations): -4; Jokers: 1;
Wishes for Test: PRIORITY 1: Test;
Wishes for TEST2: PRIORITY 1: TEST2;

Student ID: 34; Karma (after initial calculations): -8
Wishes for Test: PRIORITY 1: Test;
Wishes for TEST2: PRIORITY 1: TEST2;

Student ID: 40; Karma (after initial calculations): -9; Jokers: 1;
Wishes for Test: PRIORITY 1: Test;
Wishes for TEST2: PRIORITY 1: TEST2;

Student ID: 47; Karma (after initial calculations): -4; Jokers: 1;
Wishes for Test: PRIORITY 1: Test;
Wishes for TEST2: PRIORITY 1: TEST2;

Student ID: 50; Karma (after initial calculations): 0; Jokers: 1;
Wishes for Test: PRIORITY 2: Test;
Wishes for TEST2: PRIORITY 2: TEST2;

Available placements:

Test
Name: Test; Location: Test; Maximum places: 2 Time: 01.12.2012-02.12.2012
Name: Test; Location: Test; Maximum places: 2 Time: 03.12.2012-04.12.2012
Name: Test; Location: Test; Maximum places: 3 Time: 05.12.2012-06.12.2012

TEST2
Name: TEST2; Location: Test; Maximum places: 2 Time: 01.12.2012-02.12.2012
Name: TEST2; Location: Test; Maximum places: 2 Time: 03.12.2012-04.12.2012
Name: TEST2; Location: Test; Maximum places: 3 Time: 05.12.2012-06.12.2012

Calculating placement

Iteration 7 (Chunk 1; Iteration 7)

JOKER
TEST2. Time: 01.12.2012-02.12.2012; Available places: 2; with 0 Students eligable:
TEST2. Time: 03.12.2012-04.12.2012; Available places: 2; with 0 Students eligable:
TEST2. Time: 05.12.2012-06.12.2012; Available places: 3; with 0 Students eligable:
Test. Time: 05.12.2012-06.12.2012; Available places: 3; with 0 Students eligable:
Test. Time: 03.12.2012-04.12.2012; Available places: 2; with 0 Students eligable:
Test. Time: 01.12.2012-02.12.2012; Available places: 2; with 0 Students eligable:

PRIORITY 1
TEST2. Time: 01.12.2012-02.12.2012; Available places: 2; with 6 Students eligable: ID:1;ID:21;ID:27;ID:34;ID:40;ID:47;
Not enough places. Begin calculating luck:
ID:27 rolled the dice with a karma of -4. He got lucky with 12144 points. Congratulations; His karma will therefore be reduced by 1; ;
ID:21 rolled the dice with a karma of -7. He got lucky with 5355 points. Congratulations; His karma will therefore be reduced by 1; ;
ID:34 rolled the dice with a karma of -8. He was unsuccesful with 5270 points. Sorry, mate. But he will get a Karma bonus of 1;
ID:1 rolled the dice with a karma of -4. He was unsuccesful with 4782 points. Sorry, mate. But he will get a Karma bonus of 1;
ID:47 rolled the dice with a karma of -4. He was unsuccesful with 3972 points. Sorry, mate. But he will get a Karma bonus of 1;
ID:40 rolled the dice with a karma of -9. He was unsuccesful with 1259 points. Sorry, mate. But he will get a Karma bonus of 1;
The overall happiness has increased by 120 in this round and is now 120
TEST2. Time: 03.12.2012-04.12.2012; Available places: 2; with 4 Students eligable: ID:1;ID:34;ID:40;ID:47;
Not enough places. Begin calculating luck:
ID:47 rolled the dice with a karma of -3. He got lucky with 7068 points. Congratulations; He already got a karma bonus in this round. His karma will therefore be reduced by 2; ;
ID:1 rolled the dice with a karma of -3. He got lucky with 6354 points. Congratulations; He already got a karma bonus in this round. His karma will therefore be reduced by 2; ;
ID:34 rolled the dice with a karma of -7. He was unsuccesful with 2100 points. Sorry, mate.
ID:40 rolled the dice with a karma of -8. He was unsuccesful with 194 points. Sorry, mate.
The overall happiness has increased by 120 in this round and is now 240
TEST2. Time: 05.12.2012-06.12.2012; Available places: 3; with 2 Students eligable: ID:34;ID:40;
Enough places for all eligable students. Students allocated: ID:34; He already got a karma bonus in this round. His karma will therefore be reduced by 2; ID:40; He already got a karma bonus in this round. His karma will therefore be reduced by 2;
The overall happiness has increased by 120 in this round and is now 360
Test. Time: 05.12.2012-06.12.2012; Available places: 3; with 4 Students eligable: ID:1;ID:21;ID:27;ID:47;
Not enough places. Begin calculating luck:
ID:47 rolled the dice with a karma of -5. He got lucky with 5644 points. Congratulations; He already got a karma bonus in this round. His karma will therefore be reduced by 2; ;
ID:21 rolled the dice with a karma of -8. He got lucky with 1685 points. Congratulations; His karma will therefore be reduced by 1; ;
ID:27 rolled the dice with a karma of -5. He got lucky with 1484 points. Congratulations; His karma will therefore be reduced by 1; ;
ID:1 rolled the dice with a karma of -5. He was unsuccesful with 1288 points. Sorry, mate.
The overall happiness has increased by 180 in this round and is now 540
Test. Time: 03.12.2012-04.12.2012; Available places: 2; with 2 Students eligable: ID:34;ID:40;
Enough places for all eligable students. Students allocated: ID:34; He already got a karma bonus in this round. His karma will therefore be reduced by 2; ID:40; He already got a karma bonus in this round. His karma will therefore be reduced by 2;
The overall happiness has increased by 120 in this round and is now 660
Test. Time: 01.12.2012-02.12.2012; Available places: 2; with 1 Students eligable: ID:1;
Enough places for all eligable students. Students allocated: ID:1; He already got a karma bonus in this round. His karma will therefore be reduced by 2;
The overall happiness has increased by 60 in this round and is now 720

PRIORITY 2
TEST2. Time: 01.12.2012-02.12.2012; Available places: 0; with 1 Students eligable: ID:50;
But there are no placements open. Sorry guys!
TEST2. Time: 03.12.2012-04.12.2012; Available places: 0; with 1 Students eligable: ID:50;
But there are no placements open. Sorry guys!
TEST2. Time: 05.12.2012-06.12.2012; Available places: 1; with 1 Students eligable: ID:50;
Enough places for all eligable students. Students allocated: ID:50
The overall happiness has increased by 50 in this round and is now 770
Test. Time: 05.12.2012-06.12.2012; Available places: 0; with 0 Students eligable:
Test. Time: 03.12.2012-04.12.2012; Available places: 0; with 1 Students eligable: ID:50;
But there are no placements open. Sorry guys!
Test. Time: 01.12.2012-02.12.2012; Available places: 1; with 1 Students eligable: ID:50;
Enough places for all eligable students. Students allocated: ID:50
The overall happiness has increased by 50 in this round and is now 820

PRIORITY 3
TEST2. Time: 01.12.2012-02.12.2012; Available places: 0; with 0 Students eligable:
TEST2. Time: 03.12.2012-04.12.2012; Available places: 0; with 0 Students eligable:
TEST2. Time: 05.12.2012-06.12.2012; Available places: 0; with 0 Students eligable:
Test. Time: 05.12.2012-06.12.2012; Available places: 0; with 0 Students eligable:
Test. Time: 03.12.2012-04.12.2012; Available places: 0; with 0 Students eligable:
Test. Time: 01.12.2012-02.12.2012; Available places: 0; with 0 Students eligable:

LOCATION
Test. Time: 01.12.2012-02.12.2012; Available places: 0; with 0 Students eligable:
TEST2. Time: 01.12.2012-02.12.2012; Available places: 0; with 0 Students eligable:
TEST2. Time: 03.12.2012-04.12.2012; Available places: 0; with 0 Students eligable:
Test. Time: 03.12.2012-04.12.2012; Available places: 0; with 0 Students eligable:
TEST2. Time: 05.12.2012-06.12.2012; Available places: 0; with 0 Students eligable:
Test. Time: 05.12.2012-06.12.2012; Available places: 0; with 0 Students eligable:

FILL PLACES_MIN
Test. Time: 01.12.2012-02.12.2012; Available places: 0; with 0 Students eligable:
TEST2. Time: 01.12.2012-02.12.2012; Available places: 0; with 0 Students eligable:
TEST2. Time: 03.12.2012-04.12.2012; Available places: 0; with 0 Students eligable:
Test. Time: 03.12.2012-04.12.2012; Available places: 0; with 0 Students eligable:
TEST2. Time: 05.12.2012-06.12.2012; Available places: 0; with 0 Students eligable:
Test. Time: 05.12.2012-06.12.2012; Available places: 0; with 0 Students eligable:

REMAINING
Test. Time: 01.12.2012-02.12.2012; Available places: 0; with 0 Students eligable:
TEST2. Time: 01.12.2012-02.12.2012; Available places: 0; with 0 Students eligable:
TEST2. Time: 03.12.2012-04.12.2012; Available places: 0; with 0 Students eligable:
Test. Time: 03.12.2012-04.12.2012; Available places: 0; with 0 Students eligable:
TEST2. Time: 05.12.2012-06.12.2012; Available places: 0; with 0 Students eligable:
Test. Time: 05.12.2012-06.12.2012; Available places: 0; with 0 Students eligable:

RESULTS:
Test (05.12.2012-06.12.2012) Students: 1; 50;
TEST2 (05.12.2012-06.12.2012) Students: 27; 21;
TEST2 (05.12.2012-06.12.2012) Students: 47; 1;
Test (05.12.2012-06.12.2012) Students: 34; 40;
TEST2 (05.12.2012-06.12.2012) Students: 34; 40; 50;
Test (05.12.2012-06.12.2012) Students: 47; 21; 27;
The overall happiness is: 820
Chunk Results:

Calculating the best table

Step 1: I'll try to come up with a table, where all students are allocated.
There is at least one calculation where all students are allocated. Removing all tables with students un-allocated: 4; 8;

Step 2: I'll try to come up with a table, where all minimum placements are allocated.
There is at least one calculation where all minimum places are allocated. Removing all tables with minimum placements unset:

Step 3: I'll select the table with the highest happiness factor.
Our winner is: 7 with a happiness factor of 820
Noticeable others:
Number 2 : 9 with a happiness factor of 820
Number 3 : 10 with a happiness factor of 820
Number 4 : 6 with a happiness factor of 820
Number 5 : 5 with a happiness factor of 820
Number 6 : 2 with a happiness factor of 820
Number 7 : 3 with a happiness factor of 820
Number 8 : 1 with a happiness factor of 820

Step 4: Find chunk with highest happiness iteration:
Chunk 1 with 10 iterations. Happiness maximum: 820

Step 5: I will upload the calculated placements file for your convenience: Download xls

Step 6: Replacing the old students table with the new one & Sending emails to students.

RESULTS:
Test (01.12.2012-02.12.2012) Students: Martin; martin6;
TEST2 (01.12.2012-02.12.2012) Students: martin1; martin2;
TEST2 (03.12.2012-04.12.2012) Students: Martin; martin5;
Test (03.12.2012-04.12.2012) Students: martin4; martin3;
TEST2 (05.12.2012-06.12.2012) Students: martin3; martin6; martin4;
Test (05.12.2012-06.12.2012) Students: martin5; martin1; martin2;

A total of 10 iterations have been calculated.
Ok, thats all. Im done for today. Calculation took 0.033357858657837 Seconds

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.