If you want to customize how points are calculated, you’ll need to either override the Football_Pool_Pool::calc_score() method or hook into the calculation process using the available actions in the Football_Pool_Admin_Score_Calculation class. Depending on your goal, you might also need a helper function or a way to define/store your custom points setup.
There’s an example on the forum showing how to assign different points based on match types. Instead of using match type IDs, you could also apply similar logic based on user IDs.
I don’t currently have an example for awarding points to users who didn’t submit a prediction. I’m also curious why you’d want that. Are there perhaps alternative approaches that could achieve the same goal?
Hi, My group of friends and I make predictions every week for Serie A. Sometimes someone forgets to make their predictions for the Serie A matchday, so I have to ask the secret question to assign 100 points (because we established that those who didn’t make a prediction would be awarded 100 points by default). The secret question process is cumbersome. Couldn’t we assign them like the secret question, but without the user having to do anything? Or could we just directly change the base score for those who don’t make a prediction?
For example: This is my website, regarding matchday 37 “https://www.trentello.it/pronostici-giornata-37/” there is the user Capanneontop F.C. (I. Simone) who hasn’t submitted any predictions. To assign her a score of 100 points, I had to create a questionnaire. However, I would like 100 points to be awarded if someone doesn’t submit any predictions.
I don’t see any other options than to create a customization for the plugin if you really want this scoring system and don’t want to manually add it every time.