What if one travels India having an In-Class registered subject during summer?

I have registered a subject in Summer-2 which is an In-class course. But due to emergency I need to go to India during this period and dont want to drop the course. What if I had a permit by professor for submitting all my assignments through online (even if no permission …?) what would be the case at immigration…? Will the officer know that I have registered an In-class course during this duration and ask me several questions on it while return or what are the other obligations…?

Immigration has no access to your course catalog or mode of delivery, it is up to the school. What immigration cares is that are you in legal status and maintaining your status. Typically summer is an optional term and as long as you work with your DSO and professor and get suitable permissions, you should be fine. I suggest you speak to DSO and understand the immigration requirements, before you even speak to your professor.