original_string: public static function get_category_courses_visibility($categoryid) {
          global $DB;
          $sql = "SELECT c.id, c.visible
                    FROM {course} c
                   WHERE c.category = :category";
          $params = array('category' => (int)$categoryid);
          return $DB->get_records_sql($sql, $params);
      }
code: public static function get_category_courses_visibility($categoryid) {
          global $DB;
          $sql = "SELECT c.id, c.visible
                    FROM {course} c
                   WHERE c.category = :category";
          $params = array('category' => (int)$categoryid);
          return $DB->get_records_sql($sql, $params);
      }
code_tokens: public static function get_category_courses_visibility ( $ categoryid ) { global $ DB ; $ sql = "SELECT c.id, c.visible
                    FROM {course} c
                   WHERE c.category = :category" ; $ params = array ( 'category' => ( int ) $ categoryid ) ; return $ DB -> get_records_sql ( $ sql , $ params ) ; }
docstring: Returns an array of courseids and visiblity for all courses within the given category.
  @param int $categoryid
  @return array
docstring_tokens: Returns an array of courseids and visiblity for all courses within the given category .