Classes do help writers get words on the page. If you don’t submit your work on time, you would likely lose a valuable opportunity for feedback and, if the class is for credit, your grade may take a hit. Still, the public shame of not meeting a deadline can often burn the worst. The expectation and accountability that comes from having to submit work to others is a great motivating factor. Many writers stay in classes for this very structure. The act of showing your writing to others can also help you toward your strongest work. Knowing that a group will read and discuss what you’ve created certainly heightens the stakes.
You want to step away from classes, though, and leaving that comfort zone is a great way to continue to learn and grow. But without deadlines, the more pressing obligations that do exist in your life—projects at work, family dinners, the gym class you signed up and paid for—can overshadow your best intentions. By not taking a class, you're not losing time; you're losing the outside expectation to write. You have to create that expectation for yourself. One way to do that is to make appointments to write. If you schedule and commit to them, your writing time can become as routine as your Wednesday morning subcommittee meeting.
Start by scheduling an appointment during the time you normally attend class. Remove yourself from other distracting obligations. Go to the library or find a quiet corner in a diner. With home a car ride away, you won't give in as easily to that little voice that tells you a sink full of dishes is more important than getting words on the page. Find other bits of time in your schedule and add in more appointments. You wrote while you were taking classes. When did you do that? Write those times on your calendar as appointments and keep them.
Create your own deadlines for projects. If you don't have the willpower right now to stick to deadlines you manufacture, then work toward more specific date-oriented goals. You might use contest deadlines. If you know a story needs to be ready to submit to a contest in a month, you have something specific to work toward. And you have a very clear sense of whether you've achieved that goal: either the submission is signed, sealed, and mailed or it's not.
Some writers find it helpful to enlist a friend to help. You might set up a swap schedule with another writer to recreate the expectation that exists in the classroom. Even having a non-writing friend hold you accountable to "turn in" pages can be motivating.
The ultimate goal is for this momentum to become habit. Use whatever crutch you need to make that transition.