本文整理汇总了PHP中feedback_create_values函数的典型用法代码示例。如果您正苦于以下问题:PHP feedback_create_values函数的具体用法?PHP feedback_create_values怎么用?PHP feedback_create_values使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了feedback_create_values函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: feedback_save_guest_values
/**
* this saves the values from anonymous user such as guest on the main-site
* @param object $data the data form complete_guest form
* @param string $guestid the unique guestidentifier
* @return mixed false on error or the completeid
*/
function feedback_save_guest_values($data, $guestid)
{
$timemodified = time();
if (!($completed = get_record('feedback_completedtmp', 'id', $data['completedid']))) {
return feedback_create_values($data, 0, $timemodified, true, $guestid);
} else {
$completed->timemodified = $timemodified;
return feedback_update_values($data, $completed, true);
}
}
示例2: feedback_save_guest_values
/**
* this saves the values from anonymous user such as guest on the main-site
*
* @global object
* @param string $guestid the unique guestidentifier
* @return mixed false on error or the completeid
*/
function feedback_save_guest_values($guestid) {
global $DB;
$completedid = optional_param('completedid', false, PARAM_INT);
$timemodified = time();
if (!$completed = $DB->get_record('feedback_completedtmp', array('id'=>$completedid))) {
return feedback_create_values(0, $timemodified, true, $guestid);
} else {
$completed->timemodified = $timemodified;
return feedback_update_values($completed, true);
}
}
示例3: feedback_save_guest_values
/**
* this saves the values from anonymous user such as guest on the main-site
*
* @deprecated since Moodle 3.1
*
* @param string $guestid the unique guestidentifier
* @return mixed false on error or the completeid
*/
function feedback_save_guest_values($guestid)
{
global $DB;
debugging('Function feedback_save_guest_values() was deprecated because it did not have ' . 'enough arguments, was not suitable for non-temporary table and was taking ' . 'data directly from input', DEBUG_DEVELOPER);
$completedid = optional_param('completedid', false, PARAM_INT);
$timemodified = time();
if (!($completed = $DB->get_record('feedback_completedtmp', array('id' => $completedid)))) {
return feedback_create_values(0, $timemodified, true, $guestid);
} else {
$completed->timemodified = $timemodified;
return feedback_update_values($completed, true);
}
}