/** * Update a question_usages row to refect any changes in a usage (but not * any of its question_attempts. * @param question_usage_by_activity $quba the usage that has changed. */ public function update_questions_usage_by_activity(question_usage_by_activity $quba) { $record = new stdClass(); $record->id = $quba->get_id(); $record->contextid = $quba->get_owning_context()->id; $record->component = $quba->get_owning_component(); $record->preferredbehaviour = $quba->get_preferred_behaviour(); $this->db->update_record('question_usages', $record); }