/** * Gets the evaluation id for a object id * @access public * @param string $objectID The object id * @return string The evaluation id or nothing */ function getEvalID($objectID) { if (empty($objectID)) { die("FATAL ERROR in getEvalID ;)"); } $type = EvaluationObjectDB::getType($objectID); # echo "Bekomme: $objectID - $type<br>\n"; switch ($type) { case INSTANCEOF_EVALANSWER: $parentID = EvaluationAnswerDB::getParentID($objectID); break; case INSTANCEOF_EVALQUESTION: $parentID = EvaluationQuestionDB::getParentID($objectID); break; case INSTANCEOF_EVALGROUP: $parentID = EvaluationGroupDB::getParentID($objectID); break; default: return $objectID; } $type = EvaluationObjectDB::getType($parentID); # echo "Leite weiter: $parentID - $type<br>\n"; return EvaluationObjectDB::getEvalID($parentID); }