original_string: public static function get_all_scheduled_tasks() {
          global $DB;
  
          $records = $DB->get_records('task_scheduled', null, 'component, classname', '*', IGNORE_MISSING);
          $tasks = array();
  
          foreach ($records as $record) {
              $task = self::scheduled_task_from_record($record);
              // Safety check in case the task in the DB does not match a real class (maybe something was uninstalled).
              if ($task) {
                  $tasks[] = $task;
              }
          }
  
          return $tasks;
      }
code: public static function get_all_scheduled_tasks() {
          global $DB;
  
          $records = $DB->get_records('task_scheduled', null, 'component, classname', '*', IGNORE_MISSING);
          $tasks = array();
  
          foreach ($records as $record) {
              $task = self::scheduled_task_from_record($record);
              // Safety check in case the task in the DB does not match a real class (maybe something was uninstalled).
              if ($task) {
                  $tasks[] = $task;
              }
          }
  
          return $tasks;
      }
code_tokens: public static function get_all_scheduled_tasks ( ) { global $ DB ; $ records = $ DB -> get_records ( 'task_scheduled' , null , 'component, classname' , '*' , IGNORE_MISSING ) ; $ tasks = array ( ) ; foreach ( $ records as $ record ) { $ task = self :: scheduled_task_from_record ( $ record ) ; // Safety check in case the task in the DB does not match a real class (maybe something was uninstalled). if ( $ task ) { $ tasks [ ] = $ task ; } } return $ tasks ; }
docstring: This function will return a list of all the scheduled tasks that exist in the database.
  
  @return \core\task\scheduled_task[]
docstring_tokens: This function will return a list of all the scheduled tasks that exist in the database .