/** * Are there any pending regrades in the table we are going to show? * @param string $from tables used by the main query. * @param string $where where clause used by the main query. * @param array $params required by the SQL. * @return bool whether there are pending regrades. */ protected function has_regraded_questions($from, $where, $params) { global $DB; $qubaids = new qubaid_join($from, 'uniqueid', $where, $params); return $DB->record_exists_select('quiz_overview_regrades', 'questionusageid ' . $qubaids->usage_id_in(), $qubaids->usage_id_in_params()); }