/**
  * @param ImsQtiReader $item
  * @return QuestionBuilder
  */
 public static function factory(QtiImportSettings $settings)
 {
     if ($result = EssayBuilder::factory($settings)) {
         return $result;
     } else {
         if ($result = TruefalseBuilder::factory($settings)) {
             return $result;
         } else {
             if ($result = MatchingBuilder::factory($settings)) {
                 return $result;
             } else {
                 if ($result = NumericalBuilder::factory($settings)) {
                     return $result;
                 } else {
                     if ($result = DescriptionBuilder::factory($settings)) {
                         return $result;
                     } else {
                         if ($result = CalculatedSimpleBuilder::factory($settings)) {
                             return $result;
                         } else {
                             if ($result = CalculatedBuilder::factory($settings)) {
                                 return $result;
                             } else {
                                 if ($result = CalculatedMultichoiceBuilder::factory($settings)) {
                                     return $result;
                                 } else {
                                     if ($result = MultichoiceBuilder::factory($settings)) {
                                         return $result;
                                     } else {
                                         if ($result = ShortanswerBuilder::factory($settings)) {
                                             return $result;
                                         } else {
                                             if ($result = ClozeBuilder::factory($settings)) {
                                                 return $result;
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     return null;
 }
 static function factory(QtiImportSettings $settings)
 {
     $item = $settings->get_reader();
     $category = $settings->get_category();
     //if it is a reimport
     if ($data = $settings->get_data()) {
         if ($data->qtype == 'calculatedsimple') {
             return new self($category);
         } else {
             return null;
         }
     }
     $accept = !is_null(CalculatedBuilder::factory($item, $source_root, $target_root)) && $item->toolName == self::get_tool_name() && $item->toolVersion >= Qti::get_tool_version() && $item->label == 'calculatedsimple';
     if ($accept) {
         return new self($category);
     } else {
         return null;
     }
 }