deckar01 / CTFd

CTFs as you need them
https://ctfd.io
Apache License 2.0
1 stars 2 forks source link

Enhancement: The ability to "pause" the CTF #8

Closed ShyftXero closed 6 years ago

ShyftXero commented 6 years ago

someone mentioned this as a feature request in the upstream issues.

This would be useful for our event because we have an 8 hour period where the challenges are going to be off-line. At least the scoreboard and the ability to submit flags will be.

Rather than shuffling around the ctf end times, could we implement a "pause" and "unpause" button. under config-> CTF time

I believe this would be easy enough to implement via javascript. we could manipulate the start time to be 100 years in the future for Pause and yesterday (whatever that is ) for Unpause.

Is it worth messing with?

deckar01 commented 6 years ago

This was implemented in https://github.com/deckar01/CTFd/commit/9229eec9b65c1ddc1bfecb27f5c0fcdc4442e633.

I added a "paused" config variable and made a button in the admin config that toggles it. I added logic for this flag to the "ctftime" check and added custom messaging where it was needed.

Admin View:

screen shot 2017-10-13 at 9 15 41 pm screen shot 2017-10-13 at 9 15 20 pm

If you try to load the challenges page:

screen shot 2017-10-13 at 9 31 01 pm

When the challenges page refreshes (automatically):

screen shot 2017-10-13 at 9 14 50 pm