How do you self-motivate to excel, rather than be mediocre, in an online learning environment when..

How do you self-motivate to excel, rather than be mediocre, in an online learning environment when performance is all on you? Do you think it is different when in a traditional classroom setting?