From cf3fcdf5c767fd404e7f075b2af7d5b9b2df1536 Mon Sep 17 00:00:00 2001 From: Marco Villegas Date: Sat, 16 Nov 2013 00:09:08 -0500 Subject: [PATCH] Fix envelope unwrapping to create the right transaction object types. --- src/ChamiloLMS/Transaction/Envelope.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChamiloLMS/Transaction/Envelope.php b/src/ChamiloLMS/Transaction/Envelope.php index d834f38076..658e53b0a8 100644 --- a/src/ChamiloLMS/Transaction/Envelope.php +++ b/src/ChamiloLMS/Transaction/Envelope.php @@ -218,7 +218,11 @@ class Envelope if ($blob === FALSE) { throw new UnwrapException('Invalid blob format passed: Empty content.'); } - $this->transactions = $this->wrapperPlugin->unwrap($blob, $blob_metadata); + $transactions = $this->wrapperPlugin->unwrap($blob, $blob_metadata); + foreach ($transactions as $transaction) { + // @fixme Decouple! + $this->transactions[] = TransactionLogController::createTransaction($transaction->action, (array)$transaction); + } $this->state |= self::STATE_OPEN; } catch (Exception $exception) {