How to detect cheating when students take online quizzes or exams from home? I am currently teaching a basic R programming course with about 80 students.
Under normal circumstances,
a core course assessment component is a programming exam,
which is done in the computer lab using the lab computers.
I will arrange for the Internet to be cut off,
and we will have exam invigilators who are patrolling the exam venue
to detect or dissuade students from cheating.
At the end of the exam, the Internet is restored,
and students submit an R script (basically programming code)
using the course learning management system.

This semester, due to the novel coronavirus disease (COVID-19),
the university where I work has replaced all on-campus teaching activities with online teaching for the entire semester!


With regards to teaching,
the faculty have been asked to teach our classes online using Zoom,
which gives students the freedom to take classes wherever they like.
With regards to exams,
the faculty have been asked to administer their course exams online,
with students completing the exams online from home. (What??!!)


I am very concerned about students taking exams online from home,
because I am worried that some or many of the students may use this as an opportunity to cheat on the exam —
whether it is collaborating with their classmates,
or even asking another student to take the exam in their place.

My questions:


Is there any way to detect if students are cheating (e.g., sharing answers),
when students are doing an online quiz or exam at home?
Is there a way to dissuade students from cheating?


Response to comments:


How much help do you have for these 80 students?

I do have one PhD student who is a grader.
She is supposed to spend about 6 hours a week to help with the course.
I also teach a data and programming course, though I mainly use Python.

Is it possible for you to shift grading away from an exam and toward something else?  A project, for example?  Before going back to academia I spent years working as a policy researcher, and exam conditions simply aren't a realistic test of real-life coding abilities.  For that matter, coding with the internet turned off is also not remotely what real work looks like either.

In my class I like to give a larger project and let them have a few weeks to work on it, but I could also imagine a more simple project that they only have a few days, or even hours, to do.  Real data work often comes with time constraints, but it does not come with a lack of internet access in exam-like conditions.  Just scale the scope of the project based on how long you want them to have to work on it.

There is still a huge advantage to knowing the material, rather than having to look it up.  You can also grade on the quality of code and correctness of results, and allow for creativity with open-ended questions like "summarize this data with two plots".  This way each student is not only tested their knowledge of R, they're tested on their actual ability to use R in a realistic environment.

If you, unfortunately, are required to give an exam, I know there is software available for proctoring online tests.  The sort of thing that utilizes their webcams to make sure they don't leave during the test, or consult other devices, or open other web pages.  I've not used them though, so I couldn't make a recommendation.  I imagine they all require university subscriptions.