original_string: 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);
      }
code: 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);
      }
code_tokens: 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 ) ; }
docstring: Update a question_usages row to refect any changes in a usage (but not
  any of its question_attempts.
  
  You should not call this method directly. You should use
  @link question_engine::save_questions_usage_by_activity()}.
  
  @param question_usage_by_activity $quba the usage that has changed.
docstring_tokens: Update a question_usages row to refect any changes in a usage ( but not any of its question_attempts .