original_string: protected function show_hide_tour($tourid, $visibility) {
          global $DB;
  
          require_sesskey();
  
          $tour = $DB->get_record('tool_usertours_tours', array('id' => $tourid));
          $tour->enabled = $visibility;
          $DB->update_record('tool_usertours_tours', $tour);
  
          redirect(helper::get_list_tour_link());
      }
code: protected function show_hide_tour($tourid, $visibility) {
          global $DB;
  
          require_sesskey();
  
          $tour = $DB->get_record('tool_usertours_tours', array('id' => $tourid));
          $tour->enabled = $visibility;
          $DB->update_record('tool_usertours_tours', $tour);
  
          redirect(helper::get_list_tour_link());
      }
code_tokens: protected function show_hide_tour ( $ tourid , $ visibility ) { global $ DB ; require_sesskey ( ) ; $ tour = $ DB -> get_record ( 'tool_usertours_tours' , array ( 'id' => $ tourid ) ) ; $ tour -> enabled = $ visibility ; $ DB -> update_record ( 'tool_usertours_tours' , $ tour ) ; redirect ( helper :: get_list_tour_link ( ) ) ; }
docstring: Show or Hide the tour.
  
  @param   int         $tourid     The ID of the tour to display.
  @param   int         $visibility The intended visibility.
docstring_tokens: Show or Hide the tour .