original_string: public static function get_category_children_visibility($categoryid) {
          global $DB;
          $category = \core_course_category::get($categoryid);
          $select = $DB->sql_like('path', ':path');
          $path = $category->path . '/%';
  
          $sql = "SELECT c.id, c.visible
                    FROM {course_categories} c
                   WHERE ".$select;
          $params = array('path' => $path);
          return $DB->get_records_sql($sql, $params);
      }
code: public static function get_category_children_visibility($categoryid) {
          global $DB;
          $category = \core_course_category::get($categoryid);
          $select = $DB->sql_like('path', ':path');
          $path = $category->path . '/%';
  
          $sql = "SELECT c.id, c.visible
                    FROM {course_categories} c
                   WHERE ".$select;
          $params = array('path' => $path);
          return $DB->get_records_sql($sql, $params);
      }
code_tokens: public static function get_category_children_visibility ( $ categoryid ) { global $ DB ; $ category = \ core_course_category :: get ( $ categoryid ) ; $ select = $ DB -> sql_like ( 'path' , ':path' ) ; $ path = $ category -> path . '/%' ; $ sql = "SELECT c.id, c.visible
                    FROM {course_categories} c
                   WHERE " . $ select ; $ params = array ( 'path' => $ path ) ; return $ DB -> get_records_sql ( $ sql , $ params ) ; }
docstring: Returns an array of all categoryids that have the given category as a parent and their visible value.
  @param int $categoryid
  @return array
docstring_tokens: Returns an array of all categoryids that have the given category as a parent and their visible value .