OK well if they've got power, assuming your prices, let's say a KwH is about what an hour class would use.
So USD$0.17/class, one class per day, 20 classes per month, 20 * USD$0.17 = USD$3.4/month.
The teacher won't be the one paying, the community will gather money if required.
A small generator is USD$40 to buy here in China as I stated, not USD$300.
You are making a mountain out of a molehill.
(Edit in response to below: Please, enough personal attacks. I see solutions. You see problems. Fine. Logically, while poverty is real, using your figures USD$3-4/month spread across a community is clearly a non-issue if teachers are on USD$100/month. I don't need to physically visit Ghana to validate that, and if it really is an issue I am sure we can find it amongst those donating hardware to contribute a few dollars annually.)
(Further edit: Maybe you are confusing Uganda's situation for Ghana's. Uganda is way poorer than Ghana. "Ghana's rapid growth accelerated poverty reduction, cutting the poverty rate from 52.6% to 21.4% between 1991 and 2012. In 2012, Ghana's poverty rate was less than half the African average of 43%. Extreme poverty declined even more, dropping from 37.6% in 1991 to 9.6% in 2013." versus "With a per capita income of under US$170, Uganda today is one of the poorest countries in the world")