It took me a while to understand what you mean by these two sentences.
I think all the native speakers can understand you without any efforts if you say "我在线授课'. ( I give an online course. )
This is not so tricky as “我在线上课‘ and ”我上在线课“.
For a teacher, she/he would say "我在线授课"or "我在网上教学"
For a student , she/he would say "我在网上学习"