replit.com allows you to code online and you can also set up tests for the Repl, as well as embed the code into a blog or LMS.
I've an example here based on a tutorial here. You'd need an account to "collaborate" but the images are below.
The code runs the main.py file when the "Run" button is activated.
I made a Point class in point.py and this is called from the main in main.
There are other features such as version control, sharing for a collab, database, forking, etc.
Repl introduced classroom some time ago- the demo video shows some of the capabilities for assignments. Last year this was replaced by Teams for Education.
While better, it is not free, but there is a 4-month free trial -- you can see a demo of this "update" here.
Each student "gets their own copy" of an assignment, and the interface is quite pleasant- they can see due dates, status, etc, and you can build in unit tests that they should pass before submitting an assignment.
Github classroom (demo here) is another option but may not be the easiest to start with. Using Repl you could at least share code and have the class make their own Repls and write code to pass tests, or code a class given a class diagram or problem statement.
Hope this helps. Not exactly OOP Codingbat but might give you some ideas.