I do not think I will be of much help but I will try and answer your question as best as I can.
This sounds to me like it could be bruised and maybe swollen which could be what is stopping you from bending forward and straightening your leg out fully. This bruising and swelling will also cause pain.
I'd advise perhaps taking anti-inflammatories and talking to your doctor if it does not go better.
I hope you get better soon and good luck with it.