Online teaching has become mandatory across the globe during the COVID-19 pandemic situations. Hence, there is a need to uplift the online teaching technology for data privacy preservation and transparency in the system. Various online teaching schemes have been proposed by various authors, but they lack in handling decentralised governance, transparency, trust and communication issues. Blockchain (BC) Technology has emerged to provide decentralised solution in solving the real-time problems. Motivated by these facts, in this paper, we propose a BC-based decentralised online teaching scheme known as BDoTs. The security and data privacy issues in BDoTs are resolved by developing smart contracts (SCs) over BC. Moreover, the data storage cost issues are handled by the Inter Planetary File System (IPFS) protocol for Off-Chain data storage. Moreover, we present a real-time BC simulation and deployment of SC in Truffle suite. Results show that the proposed scheme performs better in comparison to the state-of-the-art schemes in terms of scalability, data storage cost, and packet loss.