gfrenoy / TabT-API

Programming interface for TabT, the free table tennis manager software
http://tabt.frenoy.net
GNU Affero General Public License v3.0
9 stars 5 forks source link

Why can't a player register itself to a tournament? #7

Open Fllorent0D opened 5 years ago

Fllorent0D commented 5 years ago

Is there a reason why only person with admin rights can register players to tournaments. Could be interesting for our applications to register users with there credentials to a tournament.

Doesn't sound difficult to implement. What do you think?

gfrenoy commented 5 years ago

Reason ? Nobody ever needed anything else. Difficult ? Well, nothing is difficult if you know how to do and have time to spend on this.

See https://github.com/gfrenoy/TabT-API/blob/master/tabtapi.php#L1949 to start with this.

The rules that must be implemented (I mean : this is how it works on the website):

You can actually use the function "tournament_can_register($tournament_id);" so it is straightforward for the first part. For the last rule, I don't see any obvious code that could be reused.

Fllorent0D commented 5 years ago

Ok thanks for the response, I will make a PR to implement this. Where is the tournament_can_register function? I can't find it

gfrenoy commented 5 years ago

Not yet there but it exists.

There are still a lot of dependencies that I could not yet isolated into the API. I will eventually, stay tuned :)

Fllorent0D commented 3 years ago

3 years later, I'm (re)starting implementing tournament registration into BePing. Any plan to implement this rule?

I'm facing another issue. I'm not able to tell if I have to register 1 or 2 players (double or not)