Greenland was granted self-government in 1979 by the Danish parliament ; the law went into effect the following year .