Being unable to straighten your back in a forward bend is often a clear indication of a hamstring problem. There are often other related tight areas in the body. There are a several asanas where straight legs are ideal, but actually the outcome combined with your own flexibility and capabilities means that you must understand the physiological need to make the choice of having either bent or straight legs. Mostly students straighten their legs before they are ready. In reality, most students should have their legs bent.
If you want to get some extra stretches then a great time to surrender into some deep stretches is after class when the body is already very warm and more receptive to stretches. Make them long and slow. Hold them for minutes at a time. Your body will open slowly. But more specifically your body recognizes the safety in the stretch > after the stretch is about 20 seconds long, starts to release and open up.