code: public static function isAssessmentSectionAdaptive(AssessmentSection $section, $namespace = '')
      {
          if ($namespace === '') {
              $namespace = CatService::QTI_2X_ADAPTIVE_XML_NAMESPACE;
          }
          
          $isAdaptive = false;
          
          if (($selection = $section->getSelection()) !== null && (($xmlExtension = $selection->getXml())) !== null)
          {
              $xpath = new \DOMXPath($xmlExtension);
              $xpath->registerNamespace('ais', $namespace);
              
              if ($xpath->query('.//ais:adaptiveItemSelection', $xmlExtension)->length > 0) {
                  $isAdaptive = true;
              }
          }
          
          return $isAdaptive;
      }
docs: Is a Given Section Adaptive
  
  This method checks whether or not a given AssessmentSection object $section is adaptive.
  
  @param \qtism\data\AssessmentSection $section
  @param string $namespace (optional) The namespace where to search the "adaptivity" information in the $test definition. If not given, a default namespace will be traversed.
  
  @return boolean