original_string: public static function get_async_backup_progress($backupids, $contextid) {
          global $CFG;
          require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
          require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
  
          // Parameter validation.
          self::validate_parameters(
                  self::get_async_backup_progress_parameters(),
                  array(
                      'backupids' => $backupids,
                      'contextid' => $contextid
                  )
          );
  
          // Context validation.
          list($context, $course, $cm) = get_context_info_array($contextid);
          self::validate_context($context);
  
          if ($cm) {
              require_capability('moodle/backup:backupactivity', $context);
          } else {
              require_capability('moodle/backup:backupcourse', $context);
              $instanceid = $course->id;
          }
  
          $results = array();
          foreach ($backupids as $backupid) {
              $results[] = backup_controller_dbops::get_progress($backupid);
          }
  
          return $results;
      }
code: public static function get_async_backup_progress($backupids, $contextid) {
          global $CFG;
          require_once($CFG->dirroot . '/backup/util/includes/backup_includes.php');
          require_once($CFG->dirroot . '/backup/util/includes/restore_includes.php');
  
          // Parameter validation.
          self::validate_parameters(
                  self::get_async_backup_progress_parameters(),
                  array(
                      'backupids' => $backupids,
                      'contextid' => $contextid
                  )
          );
  
          // Context validation.
          list($context, $course, $cm) = get_context_info_array($contextid);
          self::validate_context($context);
  
          if ($cm) {
              require_capability('moodle/backup:backupactivity', $context);
          } else {
              require_capability('moodle/backup:backupcourse', $context);
              $instanceid = $course->id;
          }
  
          $results = array();
          foreach ($backupids as $backupid) {
              $results[] = backup_controller_dbops::get_progress($backupid);
          }
  
          return $results;
      }
code_tokens: public static function get_async_backup_progress ( $ backupids , $ contextid ) { global $ CFG ; require_once ( $ CFG -> dirroot . '/backup/util/includes/backup_includes.php' ) ; require_once ( $ CFG -> dirroot . '/backup/util/includes/restore_includes.php' ) ; // Parameter validation. self :: validate_parameters ( self :: get_async_backup_progress_parameters ( ) , array ( 'backupids' => $ backupids , 'contextid' => $ contextid ) ) ; // Context validation. list ( $ context , $ course , $ cm ) = get_context_info_array ( $ contextid ) ; self :: validate_context ( $ context ) ; if ( $ cm ) { require_capability ( 'moodle/backup:backupactivity' , $ context ) ; } else { require_capability ( 'moodle/backup:backupcourse' , $ context ) ; $ instanceid = $ course -> id ; } $ results = array ( ) ; foreach ( $ backupids as $ backupid ) { $ results [ ] = backup_controller_dbops :: get_progress ( $ backupid ) ; } return $ results ; }
docstring: Get asynchronous backup progress.
  
  @param string $backupids The ids of the backup to get progress for.
  @param int $contextid The context the backup relates to.
  @return array $results The array of results.
  @since Moodle 3.7
docstring_tokens: Get asynchronous backup progress .