function _update_schema_regrade_flags(Conf $conf) { $result = $conf->ql("select rgr.*, u.cid from RepositoryGradeRequest rgr\n left join (select link, pset, min(cid) cid\n from ContactLink where type=" . LINK_REPO . " group by link, pset) u on (u.link=rgr.repoid)"); while ($row = edb_orow($result)) { if ($row->cid && ($u = $conf->user_by_id($row->cid)) && ($pset = $conf->pset_by_id($row->pset))) { $info = new PsetView($pset, $u, $u); $info->force_set_commit($row->hash); $update = ["flags" => ["t" . $row->requested_at => ["uid" => $u->contactId]]]; $info->update_current_info($update); } } Dbl::free($result); return true; }