Вместо "sort" => "modResource.id", "dir" => "rand" нужно написать "sort" => "RAND()"