original_string: public function get_tour_key() {
          global $USER;
  
          $tourtime = $this->get_config('majorupdatetime', null);
  
          if ($tourtime === null) {
              // This tour has no majorupdate time.
              // Set one now to prevent repeated displays to the user.
              $this->set_config('majorupdatetime', time());
              $this->persist();
              $tourtime = $this->get_config('majorupdatetime', null);
          }
  
          if ($userresetdate = get_user_preferences(self::TOUR_REQUESTED_BY_USER . $this->get_id(), null)) {
              $tourtime = max($tourtime, $userresetdate);
          }
  
          return sprintf('tool_usertours_%d_%d_%s', $USER->id, $this->get_id(), $tourtime);
      }
code: public function get_tour_key() {
          global $USER;
  
          $tourtime = $this->get_config('majorupdatetime', null);
  
          if ($tourtime === null) {
              // This tour has no majorupdate time.
              // Set one now to prevent repeated displays to the user.
              $this->set_config('majorupdatetime', time());
              $this->persist();
              $tourtime = $this->get_config('majorupdatetime', null);
          }
  
          if ($userresetdate = get_user_preferences(self::TOUR_REQUESTED_BY_USER . $this->get_id(), null)) {
              $tourtime = max($tourtime, $userresetdate);
          }
  
          return sprintf('tool_usertours_%d_%d_%s', $USER->id, $this->get_id(), $tourtime);
      }
code_tokens: public function get_tour_key ( ) { global $ USER ; $ tourtime = $ this -> get_config ( 'majorupdatetime' , null ) ; if ( $ tourtime === null ) { // This tour has no majorupdate time. // Set one now to prevent repeated displays to the user. $ this -> set_config ( 'majorupdatetime' , time ( ) ) ; $ this -> persist ( ) ; $ tourtime = $ this -> get_config ( 'majorupdatetime' , null ) ; } if ( $ userresetdate = get_user_preferences ( self :: TOUR_REQUESTED_BY_USER . $ this -> get_id ( ) , null ) ) { $ tourtime = max ( $ tourtime , $ userresetdate ) ; } return sprintf ( 'tool_usertours_%d_%d_%s' , $ USER -> id , $ this -> get_id ( ) , $ tourtime ) ; }
docstring: Get the key for this tour.
  This is used in the session cookie to determine whether the user has seen this tour before.
docstring_tokens: Get the key for this tour . This is used in the session cookie to determine whether the user has seen this tour before .