Not the previous poster. I taught an introduction to programming unit for a few semesters. The unit was almost entirely portfolio based ie all done in class or at home.
The unit had two litmus tests under exam like conditions, on paper in class. We’re talking the week 10 test had complexity equal to week 5 or 6. Approximately 15-20% of the cohort failed this test, which if they were up to date with class work effectively proved they cheated. They’d be submitting course work of little 2d games then on paper be unable to “with a loop, print all the odd numbers from 1 to 20”