Hmmm...tricky. Not all electrical pain is caused by impingement of a nerve, but I do think that all electrical pain is significant. This could well be sciatica as the sciatic nerve does pass right under the bicep femoris, and is still quite thick in that area (could be half of an inch thick there.)
In Swan there is pressure on the front, outside hip so the sciatic nerve could be impinged there by the pose (the piriformis being right above the nerve at that position), and the sensation referred down the thigh to where your student is feeling this. However, there is another possibility: This could be the result of a "trigger point" or a myofascial problem.
Here are two links to articles in which the author proposes that rarely are electrical pains caused by sciatica, but rather by these trigger points (which is "a small patch of contracted, stagnant, swampy muscle tissue").
The way you describe the symptoms, I do wonder if it isn't sciatica but rather a myofascial pain syndrome event. You may want to read the two articles and then have a discussion with her.
In any case, whatever is causing the pain, she should be modifying the pose until there is no pain. I wonder if she gets this feeling in other hip openers like winged Dragon or Shoelace or Square pose. If not, she may want to do just those and skip Swan until she resolves her problem. Alternatively, can she bring her front foot right underneath her in Swan with no pain? Maybe she can start at that gentle beginning point.
And of course, we are not doctors so it is always a good idea to suggest to her to see a professional.
Hope this helps.