Align contest data between CMS and RWS (i.e. make CMS team-aware) #65

Closed
lerks opened this Issue Oct 25, 2012 · 7 comments

Projects

None yet

4 participants

@lerks
Member
lerks commented Oct 25, 2012

At the moment CMS doesn't support teams, because they're not needed to run the contest. RWS is the only piece of CMS that supports them, because the ranking is the only part where they make sense.

That means that SS isn't able to send team data to RWS (even if it sends everything else) and contest administrators need to insert it manually, by creating some JSON files for the teams and editing JSON files for the users.

We may want to align the contest data that these two "instances" have, and the only way I see to achieve that is to make CMS team-aware, i.e. add a Team class to the DB model.

@lerks lerks referenced this issue Oct 25, 2012
Closed

Team json files #64

@giomasce
Member

Il 25/10/2012 17:30, Luca Wehrstedt ha scritto:

At the moment CMS doesn't support teams, because they're not needed
to run the contest. RWS is the only piece of CMS that supports them,
because the ranking is the only part where they make sense.

That means that SS isn't able to send team data to RWS (even if it
sends everything else) and contest administrators need to insert it
manually, by creating some JSON files for the teams and editing JSON
files for the users.

We may want to align the contest data that these two "instances"
have, and the only way I see would be to make CMS team-aware, i.e.
add a Team class to the DB model.

No strong objection, although I don't see it for 1.0 or before.

Gio.

Giovanni Mascellani mascellani@poisson.phc.unipi.it
Pisa, Italy

Web: http://poisson.phc.unipi.it/~mascellani
Jabber: g.mascellani@jabber.org / giovanni@elabor.homelinux.org

@giomasce
Member
giomasce commented Nov 7, 2012

I see that this issue was assigned to CMS 1.0. I'm not convinced it is a good idea, it seems to me a rather large change. Who did the assignement? Is there any particular reason?

(en passant, why doesn't GitHub keeps track of who changes what in an issue? Each bug tracker in this world does it, even Debian BTS...)

@lerks
Member
lerks commented Nov 8, 2012

Maybe I targeted it for 1.0... can't remember. Anyway, it's ok for me to reschedule it for 1.x.

@giomasce
Member
giomasce commented Nov 8, 2012

Done.

@ashikoff
ashikoff commented Oct 1, 2014

Is there a way to avoid Proxy service overwriting users json files. Problem is - I'm setting team info for every contestant, but when I start all services the data is retrieved from the database and files are created as new (without the teams in them of course). Any ideas to solve that situation?

@stefano-maggiolo
Member

Sadly, afaik at the moment there is no way apart from using a home made script. Note that the team JSONs are not deleted, so you just need to change the association in the user files. For example, if you have a directory "teams" where you have a file for each team, named with the team name, and containing the usernames one per line, you can use this script:

cd teams/
for TEAM in *; do
  for USER in `cat $TEAM`; do
    sed -i 's/"team": null/"team": "'$TEAM'"/' /path/to/rws/files/users/$USER
  done
done
@stefano-maggiolo
Member

Fixed by wil93 PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment