From: <gem...@li...> - 2012-02-15 13:07:35
|
Revision: 477 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=477&view=rev Author: mennodekker Date: 2012-02-15 13:07:26 +0000 (Wed, 15 Feb 2012) Log Message: ----------- Fxing sloppy commit, TrackCompletedEvent should work now Modified Paths: -------------- branches/1.5.x/library/classes/Gems/Event/TrackCompletedEventInterface.php branches/1.5.x/library/classes/Gems/Events.php branches/1.5.x/library/classes/Gems/Tracker/Model/TrackModel.php branches/1.5.x/library/classes/Gems/Tracker/RespondentTrack.php Modified: branches/1.5.x/library/classes/Gems/Event/TrackCompletedEventInterface.php =================================================================== --- branches/1.5.x/library/classes/Gems/Event/TrackCompletedEventInterface.php 2012-02-15 12:42:58 UTC (rev 476) +++ branches/1.5.x/library/classes/Gems/Event/TrackCompletedEventInterface.php 2012-02-15 13:07:26 UTC (rev 477) @@ -43,7 +43,7 @@ * @license New BSD License * @since Class available since version 1.5.1 */ -class Gems_Event_TrackCompletedEventInterface extends Gems_Event_EventInterface +interface Gems_Event_TrackCompletedEventInterface extends Gems_Event_EventInterface { /** * Process the data and return the answers that should be changed. @@ -56,4 +56,4 @@ * @return void */ public function processTrackCompletion(Gems_Tracker_RespondentTrack $track, &$values, $userId); -} +} Modified: branches/1.5.x/library/classes/Gems/Events.php =================================================================== --- branches/1.5.x/library/classes/Gems/Events.php 2012-02-15 12:42:58 UTC (rev 476) +++ branches/1.5.x/library/classes/Gems/Events.php 2012-02-15 13:07:26 UTC (rev 477) @@ -236,7 +236,7 @@ * @param string $eventName * @return Gems_Event_TrackCompletedEventInterface */ - public function loadTrackCompletionEvent($evetName) + public function loadTrackCompletionEvent($eventName) { return $this->_loadEvent($eventName, self::TRACK_COMPLETION_EVENT); } Modified: branches/1.5.x/library/classes/Gems/Tracker/Model/TrackModel.php =================================================================== --- branches/1.5.x/library/classes/Gems/Tracker/Model/TrackModel.php 2012-02-15 12:42:58 UTC (rev 476) +++ branches/1.5.x/library/classes/Gems/Tracker/Model/TrackModel.php 2012-02-15 13:07:26 UTC (rev 477) @@ -187,7 +187,7 @@ if (array_key_exists('gtr_completed_event', $track)) { if (!empty($track['gtr_completed_event'])) { - return $track['gtr_completed_event']; + return $this->loader->getEvents()->loadTrackCompletionEvent($track['gtr_completed_event']); } } } Modified: branches/1.5.x/library/classes/Gems/Tracker/RespondentTrack.php =================================================================== --- branches/1.5.x/library/classes/Gems/Tracker/RespondentTrack.php 2012-02-15 12:42:58 UTC (rev 476) +++ branches/1.5.x/library/classes/Gems/Tracker/RespondentTrack.php 2012-02-15 13:07:26 UTC (rev 477) @@ -633,11 +633,11 @@ */ public function handleTrackCompletion(&$values, $userId) { // Process any events - $trackEngine = $this->getTrackEngine(); + $trackModel = $this->tracker->getTrackModel(); //to be backward compatible, first check if the engine has a - if (is_callable(array($trackEngine, 'getTrackCompletionEvent'))) { - if ($event = $this->tracker->getTrackModel()->getTrackCompletionEvent($this->getTrackId())) { + if (is_callable(array($trackModel, 'getTrackCompletionEvent'))) { + if ($event = $trackModel->getTrackCompletionEvent($this->getTrackId())) { $event->processTrackCompletion($this, $values, $userId); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |