original_string: public static function get_adhoc_tasks($classname) {
          global $DB;
  
          $classname = self::get_canonical_class_name($classname);
          // We are just reading - so no locks required.
          $records = $DB->get_records('task_adhoc', array('classname' => $classname));
  
          return array_map(function($record) {
              return self::adhoc_task_from_record($record);
          }, $records);
      }
code: public static function get_adhoc_tasks($classname) {
          global $DB;
  
          $classname = self::get_canonical_class_name($classname);
          // We are just reading - so no locks required.
          $records = $DB->get_records('task_adhoc', array('classname' => $classname));
  
          return array_map(function($record) {
              return self::adhoc_task_from_record($record);
          }, $records);
      }
code_tokens: public static function get_adhoc_tasks ( $ classname ) { global $ DB ; $ classname = self :: get_canonical_class_name ( $ classname ) ; // We are just reading - so no locks required. $ records = $ DB -> get_records ( 'task_adhoc' , array ( 'classname' => $ classname ) ) ; return array_map ( function ( $ record ) { return self :: adhoc_task_from_record ( $ record ) ; } , $ records ) ; }
docstring: This function load the adhoc tasks for a given classname.
  
  @param string $classname
  @return \core\task\adhoc_task[]
docstring_tokens: This function load the adhoc tasks for a given classname .