ngsankha / codejudge

host coding competitions anywhere, anytime
http://sankhs.com/codejudge
MIT License
90 stars 53 forks source link

Deleted problems still leave their entry in users database #4

Closed ngsankha closed 12 years ago

ngsankha commented 12 years ago

Replication of the problem:

  1. Add a problem. Let some users submit solutions for it.
  2. Go to the admin panel and delete the problem. Then click on Users on the navigation bar.
  3. Click on any user that submitted the solution for that problem.

Result: The entry is still in the list of his attempted problems. But the name of the problem does not appear.

ngsankha commented 12 years ago

Similar problem also appears in submissions.php.

One should check if the problem exists in the problems table by comparing its id, before displaying it on the web page.