/**
  * Short description of method takeOverFrom
  *
  * @access public
  * @author Joel Bout, <*****@*****.**>
  * @param  ResponseProcessing responseProcessing
  * @param  Item item
  * @return oat\taoQtiItem\model\qti\response\Composite
  */
 public static function takeOverFrom(ResponseProcessing $responseProcessing, Item $item)
 {
     $returnValue = null;
     if ($responseProcessing instanceof static) {
         // already good
         $returnValue = $responseProcessing;
     } elseif ($responseProcessing instanceof Template) {
         // IMS Template
         $rp = new Summation($item, 'SCORE');
         foreach ($item->getInteractions() as $interaction) {
             $response = $interaction->getResponse();
             try {
                 $irp = Template::createByTemplate($responseProcessing->getUri(), $response, $item);
             } catch (Exception $e) {
                 throw new TakeoverFailedException();
             }
             $rp->add($irp, $item);
         }
         $returnValue = $rp;
     } elseif ($responseProcessing instanceof TemplatesDriven) {
         // TemplateDriven
         $rp = new Summation($item, 'SCORE');
         foreach ($item->getInteractions() as $interaction) {
             $response = $interaction->getResponse();
             try {
                 $irp = Template::createByTemplate($responseProcessing->getTemplate($response), $response, $item);
             } catch (Exception $e) {
                 throw new TakeoverFailedException();
             }
             $rp->add($irp, $item);
         }
         $returnValue = $rp;
     } else {
         common_Logger::d('Composite ResponseProcessing can not takeover from ' . get_class($responseProcessing) . ' yet');
         throw new TakeoverFailedException();
     }
     common_Logger::i('Converted to Composite', array('TAOITEMS', 'QTI'));
     return $returnValue;
 }