MDL-31969 grades: Added additional check to export active/all users