/**
  * Set the correct response.
  * 
  * @param mixed $correctResponse A QTI Runtime compliant object.
  */
 public function setCorrectResponse($correctResponse)
 {
     if (Utils::isBaseTypeCompliant($this->getBaseType(), $correctResponse) === true) {
         $this->correctResponse = $correctResponse;
         return;
     } else {
         if ($correctResponse instanceof Container) {
             if ($correctResponse->getCardinality() === $this->getCardinality()) {
                 if (get_class($correctResponse) === 'qtism\\runtime\\common\\Container' || $correctResponse->getBaseType() === $this->getBaseType()) {
                     // This is a simple container with no baseType restriction
                     // or a Multiple|Record|Ordered container with a compliant
                     // baseType.
                     $this->correctResponse = $correctResponse;
                     return;
                 } else {
                     $msg = "The baseType of the given container ('" . BaseType::getNameByConstant($correctResponse->getBaseType()) . "') ";
                     $msg .= "is not compliant with ";
                     $msg .= "the baseType of the variable ('" . BaseType::getNameByConstant($this->getBaseType()) . "').";
                     throw new InvalidArgumentException($msg);
                 }
             } else {
                 $msg = "The cardinality of the given container ('" . Cardinality::getNameByConstant($value->getCardinality()) . "') ";
                 $msg .= "is not compliant with ";
                 $msg .= "the cardinality of the variable ('" . Cardinality::getNameByConstant($this->getCardinality()) . "').";
                 throw new InvalidArgumentException($msg);
             }
         }
     }
     $msg = "The provided value is not compliant with the baseType of the ResponseVariable.";
     throw new InvalidArgumentException($msg);
 }