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);
    }
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);
    }
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 ) ; }
Flag the provided file as used for training or prediction.

@param \stored_file $file
@param string $action
@return void
Flag the provided file as used for training or prediction .