GithubHelp home page GithubHelp logo

contest-host's People

Contributors

dtowell avatar

Stargazers

 avatar  avatar

Watchers

 avatar

contest-host's Issues

Test Attempt Submit Time Incorrect

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Run the server with the command "php -S 0.0.0.0:8000 -t html html/redirect.php"

  2. Go to "localhost:8000/login.php" and login in as an admin

  3. Go to "localhost:8000/test_attempt.php?id=1" (id number changes based on the attempt id, change accordingly) or click the "accepted" or "rejected" links next to each problem

  4. Notice the submit time for each attempt is the same

Expected behavior
I expected the submit time to reflect the time found in the attempts table.

Screenshots

VirtualBox_Linux_18_04_2020_18_07_15

VirtualBox_Linux_18_04_2020_17_52_05

Desktop (please complete the following information):

  • OS: macOS Mojave on Ubuntu VM
  • Browser: Chrome

Documentation Links

Describe the bug
The links are giving an invalid argument within the ubuntu terminal and they do not go to desired location.

To Reproduce
Steps to reproduce the behavior:

  1. Go to index page.
  2. Click on any docs link.
  3. See error

Expected behavior
It should go to specified documentation page.

Screenshots
Capture
Capture1

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome

The contest site won't run on my machine

I go through all of the steps to get the site running, but when I go to localhost:8000, I get an error that says "This page isn't working" and "localhost is unable to handle this request"

To Reproduce
Steps to reproduce the behavior:

  1. cd into contest-host
  2. Ensure that the database is created
  3. run the php command from the README file to start the server
  4. Navigate to localhost:8000
  5. Error appears

Expected behavior
We expect to see the contest page

Contestant can be added without filling in name and password fields

Describe the bug
A contestant can be added to the database without typing anything into the name and password fields.

To Reproduce
Steps to reproduce the behavior:

  1. Login as a judge
  2. Go to edit contestants
  3. If contestant information is in the name and password fields, click on "new"
  4. Click Submit

Expected behavior
An error appears that tells the user to enter information.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • PHP Version: 7.2.24

Additional context
This may not necessarily be a bug, but I think that it is unintended behavior. Also, if a contestant with blank fields is added, then someone can successfully log in using blank login fields.

Adding blank notes in various ways

Describe the bug
You can add a note as an admin with no content, one with a problem number and no message, and one with a message and without a problem. I am unsure if any of these are bugs, but put here just in case.

To Reproduce
Steps to reproduce the behavior:

  1. Go to localhost:8000/edit_notes.php?id=
  2. Click on Submit
  3. Shows empty note at new note link.
  4. To get other errors, add problem number but no message and vice versa.

Expected behavior
A empty note should not be allowed.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome
  • Version: PHP 7.2.24

Updating Notes

Describe the bug
An update cannot be made to an existing note.

To Reproduce
Steps to reproduce the behavior:

  1. Go to localhost:8000/edit_notes.php?id=1 **you must have one note
  2. Click on message input and change it.
  3. Click submit.
  4. See error of update not working

Expected behavior
Expected message to change to new message.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome
  • Version: PHP 7.2.24

Judge Functionality works for Teams.

When logged into an account which is not marked as a judge, judge menu and judge specific pages are still accessible.

To Reproduce
Steps to reproduce the behavior:

  1. Go to edit contestants, create a new team without clicking the judge option
  2. delete cookies, the click on view problems to access the login page
  3. log in to the account you created
  4. view and access the judge menu and pages

Expected behavior
When logged in as a User/Team which is NOT marked as a Judge, the Judge menu and websites associated with it, such as edit problems, should NOT be accessible.

Desktop:

  • OS: Ubuntu 19.0.4
  • Browser: chrome
  • Version newest

There is a typo in login.php

in Login.php
you have
if (!isset($_POST['user']))
$error .= "Contestant name blank.
";
if (!isset($_POST['user']))
$error .= "Contestant password blank.
";

which Clearly is intended to read:
if (!isset($_POST['user']))
$error .= "Contestant name blank.
";
if (!isset($_POST['password']))
$error .= "Contestant password blank.
";

Notes Deletion

Description
Once a note has been added to the database, it cannot be deleted with button functionality on the edit_notes.php page.

Reproduction Steps

  1. Go to localhost:8000/edit_notes.php
  2. Fill out information for adding a note in the new link and click the submit button.
  3. Refresh page and then attempt to delete the note.
  4. The note remains on page.

Expected Behavior
The expected behavior would be that the note would be deleted from the database and not be on the edit_notes.php or the announcements section on view_problems.php.

Desktop

  • OS: Windows 10
  • Browser: Chrome

Adding blank problem

Describe the bug
You are able to add a blank problem with no title or description.

To Reproduce
Steps to reproduce the behavior:

  1. Go to "localhost:8000/edit_problems.php
  2. Click the submit button
  3. See error by clicking on sample with no number.

Expected behavior
Expected behavior would be to send back an error message or not allow the blank title or description.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome

Delete button doesn't work in edit_notes.php

Description

Attempting to delete a note via the "Delete" button on /edit_notes.php does not delete the note. The note remains on the page even in future visits, and the total number of notes shown at the top of the page remains the same. The note is also still visible on /view_problems.php.

No errors are reported in the server logs when attempting to delete a note.

To Reproduce

  1. Visit edit_notes.php and create a note.
  2. Click on the id of the note you created, then click the button labeled "Delete".

Expected behavior

The note should no longer be displayed on the page once it reloads from the "Delete" button being clicked. It should also no longer be visible on /view_problems.php.

Context

  • OS: Ubuntu 19.10
  • Browser: Google Chrome 79.0.3945.130
  • PHP: 7.3.11
  • SQLite3: 3.28.0

Editing a contestant that has already been created does not work.

Describe the bug
When you go to edit_contestants.php and edit a contestant that is already present, the edit does not get saved.

To Reproduce
Steps to reproduce the behavior:

  1. Start the server using the command in the readme.
  2. Log in as a judge.
  3. Go to edit contestants in the footer.
  4. Select a contestant that is already present (just 1, by default) and edit their fields.
  5. Click Submit. When the page reloads, your changes will not be applied.

Expected behavior
The fields changed during the edit will be saved in the database and shown when the page reloads.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: Chrome
  • PHP Version: 7.2.24
  • SQLite 3 Version: 3.22.0

Cannot add a contest

Describe the bug
A "query failed" page appears when attempting to add a valid contest.

To Reproduce
Steps to reproduce the behavior:

  1. Go to edit_contests.php
  2. Fill in valid contest data
  3. Click on Submit
  4. See error

Expected behavior
A new contest gets added to the database and appears as a new entry in edit_contests.php

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows (running the contest site through WSL)
  • Browser: Chrome
  • Version: PHP 7.2.24

Additional context
I remember this bug being mentioned in class before we began working on the test suite, but I do not remember if someone came up with a solution to it or not.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.