Schools have been warned against “gaming” their league-table ranking by getting pupils to take qualifications that are of low value to them.