original_string: protected function flag_file_as_used(\stored_file $file, $action) {
          global $DB;
  
          $usedfile = new \stdClass();
          $usedfile->modelid = $this->model->id;
          $usedfile->fileid = $file->get_id();
          $usedfile->action = $action;
          $usedfile->time = time();
          $DB->insert_record('analytics_used_files', $usedfile);
      }
code: protected function flag_file_as_used(\stored_file $file, $action) {
          global $DB;
  
          $usedfile = new \stdClass();
          $usedfile->modelid = $this->model->id;
          $usedfile->fileid = $file->get_id();
          $usedfile->action = $action;
          $usedfile->time = time();
          $DB->insert_record('analytics_used_files', $usedfile);
      }
code_tokens: protected function flag_file_as_used ( \ stored_file $ file , $ action ) { global $ DB ; $ usedfile = new \ stdClass ( ) ; $ usedfile -> modelid = $ this -> model -> id ; $ usedfile -> fileid = $ file -> get_id ( ) ; $ usedfile -> action = $ action ; $ usedfile -> time = time ( ) ; $ DB -> insert_record ( 'analytics_used_files' , $ usedfile ) ; }
docstring: Flag the provided file as used for training or prediction.
  
  @param \stored_file $file
  @param string $action
  @return void
docstring_tokens: Flag the provided file as used for training or prediction .