/** * Callback function for the 'new_response_rating' event * @param xhelpRating $rating Rating Information * @param xhelpTicket $ticket Ticket for Rating * @param xhelpResponses $response Response that was rated * @return bool True on success, false on error * @access public */ function new_response_rating($rating, $ticket, $response) { global $xoopsUser; $logMessage =& $this->_hLog->create(); $logMessage->setVar('uid', $xoopsUser->getVar('uid')); $logMessage->setVar('ticketid', $rating->getVar('ticketid')); $logMessage->setVar('action', sprintf(_XHELP_LOG_ADDRATING, $rating->getVar('responseid'))); $logMessage->setVar('lastUpdated', time()); return $this->_hLog->insert($logMessage); }
/** * Callback function for the 'new_response_rating' event * @param xhelpRating $rating Rating * @param xhelpTicket $ticket Ticket that was rated * @param xhelpResponse $response Response that was rated * @return bool True on success, false on error * @access public */ function new_response_rating($rating, $ticket, $response) { global $xoopsUser; $hStaff =& xhelpGetHandler('staff'); return $hStaff->updateRating($rating->getVar('staffid'), $rating->getVar('rating')); }