public static function getFeedbacks(tao_models_classes_service_StorageDirectory $directory, AssessmentItemSession $itemSession) {
        
        $returnValue = array();
        
        $feedbackClasses = array('modalFeedback', 'feedbackInline', 'feedbackBlock');
        $elements = self::getContentVariableElements($directory);
        
        $outcomes = array();
        foreach ($elements as $data) {
            if (empty($data['qtiClass']) === false && in_array($data['qtiClass'], $feedbackClasses)) {
        
                $feedbackIdentifier = $data['attributes']['identifier'];
                $outcomeIdentifier = $data['attributes']['outcomeIdentifier'];
        
                if (!isset($outcomes[$outcomeIdentifier])) {
                    $outcomes[$outcomeIdentifier] = array();
                }
        
                $outcomes[$outcomeIdentifier][$feedbackIdentifier] = $data;
            }
        }
        
        foreach ($itemSession->getAllVariables() as $var) {
        
            $identifier = $var->getIdentifier();
        
            if (isset($outcomes[$identifier])) {
        
                $feedbacks = $outcomes[$identifier];
                $feedbackIds = QtiRunner::getVariableValues($var);
        
                foreach($feedbackIds as $feedbackId) {
        
                    if (isset($feedbacks[$feedbackId])) {
                        $data = $feedbacks[$feedbackId];
                        $returnValue[$data['serial']] = $data;
                    }
                }
        
            }
        }
        
        return $returnValue;
    }