A system consists of different forms of energy like thermal energy, mechanical energy, chemical energy, nuclear energy etc. If these energies are to be transferred to another system (call it system 2), it can either be done as heat or work (or mass but here I take system approach) and again at the other system (system 2) it will be held as (change the) one of the forms of energy (thermal, mechanical chemical etc).
So when the second law implies that heat cannot be completely converted to work is it actually implying that thermal energy of a system cannot be completely transferred as work to another system? or does it mean energy that is transferring as heat cannot be changed to transfer-of-energy-as-work mid transfer?
It cannot be about the quality of energy because heat and work are not energy they just imply transfer of energy.