original_string: public static function get_all_question_types_in_categories($categories) {
          global $DB;
  
          list($categorysql, $params) = $DB->get_in_or_equal($categories);
          $sql = "SELECT DISTINCT q.qtype
                  FROM {question} q
                  WHERE q.category $categorysql";
  
          $qtypes = $DB->get_fieldset_sql($sql, $params);
          return $qtypes;
      }
code: public static function get_all_question_types_in_categories($categories) {
          global $DB;
  
          list($categorysql, $params) = $DB->get_in_or_equal($categories);
          $sql = "SELECT DISTINCT q.qtype
                  FROM {question} q
                  WHERE q.category $categorysql";
  
          $qtypes = $DB->get_fieldset_sql($sql, $params);
          return $qtypes;
      }
code_tokens: public static function get_all_question_types_in_categories ( $ categories ) { global $ DB ; list ( $ categorysql , $ params ) = $ DB -> get_in_or_equal ( $ categories ) ; $ sql = "SELECT DISTINCT q.qtype
                  FROM {question} q
                  WHERE q.category $categorysql" ; $ qtypes = $ DB -> get_fieldset_sql ( $ sql , $ params ) ; return $ qtypes ; }
docstring: Return a list of the different question types present in the given categories.
  
  @param  array $categories a list of category ids
  @return array the list of question types in the categories
  @since  Moodle 3.1
docstring_tokens: Return a list of the different question types present in the given categories .