本文整理汇总了PHP中AMA_DataHandler::add_ex_history方法的典型用法代码示例。如果您正苦于以下问题:PHP AMA_DataHandler::add_ex_history方法的具体用法?PHP AMA_DataHandler::add_ex_history怎么用?PHP AMA_DataHandler::add_ex_history使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AMA_DataHandler
的用法示例。
在下文中一共展示了AMA_DataHandler::add_ex_history方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: add_ex_history
/**
* Add an item to table history_esercizi
* Useful during the navigation. The date of the visit is computed automatically.
*
* @access public
*
* @param $student_id the id of the student
* @param $course_id the id of the instance of course the student is navigating
* @param $node_id the node to be registered in the history
* @param $answer NOT USED IN MODULES_TEST, kept for compatibility reasons.
* @param $remark NOT USED IN MODULES_TEST, kept for compatibility reasons.
* @param $points NOT USED IN MODULES_TEST, kept for compatibility reasons.
* @param $correction NOT USED IN MODULES_TEST, kept for compatibility reasons.
* @param $ripetibile NOT USED IN MODULES_TEST, kept for compatibility reasons.
* @param $attach NOT USED IN MODULES_TEST, kept for compatibility reasons.
*
* @return number|AMA_Error inserted row id or AMA_Error object
*
* (non-PHPdoc)
* @see AMA_Tester_DataHandler::add_ex_history()
*/
public function add_ex_history($student_id, $course_instance_id, $node_id, $answer = '', $remark = '', $points = 0, $correction = '', $ripetibile = 0, $attach = '')
{
$result = parent::add_ex_history($student_id, $course_instance_id, $node_id);
if (!AMA_DB::isError($result)) {
return $this->getConnection()->lastInsertId();
} else {
return $result;
}
}