I am in the US as a student. I came on a tourist visa and changed to F1 status. This means that I do not currently have a valid visa in my passport, although I do have a valid I20 and my SEVIS record is fine. According to this website I should be fine for traveling to Puerto Rico, but my school agent says this is risky. She told me that despite the fact that I should be able to go, immigration does spot checks in the Puerto Rico airport and that if an agent stops me, I shouldn't count on them knowing this. They might just look at my passport, see that I have no visa, and I would end up deported. I know that people in my situation sometimes go to Puerto Rico with no problems, but this would be a terrible thing if it happened and I don't want to risk it even in the chance is small. Is she right that there's a small chance this could happen?
You only need a visa (or visa waiver) to enter the United States. Once you are admitted, you can legally remain in the US for as long as you remain "in status".
Since Puerto Rico is part of the United States, it is treated purely as domestic travel. So you do not need a visa to travel between the mainland and Puerto Rico, provided you are still in status.
However, you have heard one thing correctly. CBP officers do sometimes check departing passengers at San Juan Airport, as there are some people who illegally enter PR from neighboring islands, and this is their best chance to catch them before they reach the US mainland. When these checks occur, they are generally at the departure gate or even on the jetway.
Provided your immigration status is OK, though, you will have no problem, as you had not departed the US and are not seeking entry again. But it's a good idea to have your valid I-20 and a printout of your I-94 with you anyway, as it may help speed things up if you are checked.