If someone has an upset stomache to the point where they can’t wear tefillin, is he allowed to listen to shiurim online? It would be very hard if I can’t, but I understand that if that is what H-Shem wants, we have to follow His will even if it means what we can’t learn torah.
A person is allowed to think in learning or to listen to a shiur even if he feels the need to go to the bathroom, and even if the feeling has reached “baal tishaktzu”, (meaning that the person has a string urge and he has to “hold it in”.) Speaking in learning though would not be permitted in such a situation.
You should have aa refuah shleima quickly
Shevet Hakehosi 6-80, in the name of Mekor Chayim, PIskei Teshuvos 92-4.