Sort links in grades