Preventing Student Cheating

Free and Pro tools and strategies to prevent student cheating on CodeHS

Zach Galant avatar
Written by Zach Galant
Updated over a week ago

CodeHS Honor Code

First and foremost, we highly encourage your students to sign the CodeHS Honor Code. This will help set the tone for the rest of the year around what is acceptable and what is not. Creating a class culture of good digital citizenship and establishing ground rules can go a long way in preventing student cheating.

Code History

The Code History tab is a way for teachers and students to see all of the changes and revisions that have been made to a certain program. It is accessible on any code editor page under the More > History tab in the top right corner. You can use arrows to quickly move back and forth between timestamps of code.

Gif showing code history in the code editor

Code History is a great tool to aid in cheat detection, as teachers can assume that exercises (particularly more complex exercises) which are completed quickly with very few code runs/saves are often attributable to borrowed or copied code. Teachers can also see the total time spent on an assignment from the Grade tab, located on the right side of the IDE. Check out Grading a Single Assignment to learn more!

Actions that cause an entry to be created in the History tab:

  1. Student runs code

  2. Student clicks save

  3. Student pastes text in the editor

  4. It's been a minute and none of things have happened but the code has changed

  5. Teacher edits code and Pushes changes to student program

Alternate Exercises

Alternate exercises are different versions of existing assignments in CodeHS courses. These assignments are changed in subtle ways so that the core concept and difficulty are not altered, but a different autograded solution is required. You can switch out specific assignments in your course to help deter cheating. See Using Alternate Exercises to learn more!

This is a Pro Feature

Academic Integrity Center

The Academic Integrity Center is a hub for resources and tools which support academic integrity in the classroom. Free teachers can access helpful links and resources.

scrolls through integrity page

Pro teachers can use our full suite of Academic Integrity Center tools to monitor and assess student work:

  • Plagiarism Report: One-page view for a specific assignment which details potential plagiarism

  • Code Timeline: How much time students have spent on an assignment as well as when they worked on it

  • Code History: View all the saved snapshots for a specific assignment

  • Code Replay: Watch a log of the student’s code

  • Time Tracking: Visualize how long students are spending on assignments using a table, box plot, or bar chart

  • Focus Mode: Students are forced to view only a single assignment page and do not have access to past assignments or sandbox programs

Advanced Settings

On the Section Settings page, Pro teachers have access to these features which can help prevent student cheating:

Click the gear icon in the top-right corner of your roster page to access the Section Settings page:

Screenshot showing settings button in upper-right corner of teacher page

Then, scroll to the bottom to find Advanced Settings:

Shuffle Quiz Questions

Allows teachers to configure quiz questions so they will be ordered randomly for each student. The ordering will change each time the quiz is viewed. This is a feature that can help with cheating prevention on tests. As a teacher, the quiz questions will not be shuffled when you view them. Learn more about Changing Quiz Settings.

Copy/Paste Prevention

When Copy/Paste Prevention is enabled, students enrolled in this section can no longer Copy, Paste, or Cut to and from the Editor or their Sandbox. Learn more about Enabling Copy / Paste Prevention.

Hide Docs Tab

Hides the language documentation from students so they can't access it through the Code Editor. Learn more about the Docs Tab.

Time Tracking

This tool displays how long students have spent on an assignment. You can find the Time Tracking tool under the Progress view.

url_upload_65bbd2462c64f.gif [crop output image]

Calculating Time on CodeHS

As soon as the Code Editor loads, time tracking begins for students. The tracker records every increment of 5 seconds that the student is active. Students become idle after 30 seconds of not moving their mouse or typing.

Want more info on these tools? Watch our CodeHS Cheat Detection Teacher Meetup!

Time Tracking and Advanced Settings are available on CodeHS Pro. To get Pro for your school, contact our team at

Did this answer your question?