本文整理汇总了PHP中forum_tp_delete_read_records函数的典型用法代码示例。如果您正苦于以下问题:PHP forum_tp_delete_read_records函数的具体用法?PHP forum_tp_delete_read_records怎么用?PHP forum_tp_delete_read_records使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了forum_tp_delete_read_records函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: useredit_update_trackforums
function useredit_update_trackforums($user, $usernew)
{
global $CFG;
if (!isset($usernew->trackforums)) {
//locked field
return;
}
if (!isset($user->trackforums) || $usernew->trackforums != $user->trackforums and !$usernew->trackforums) {
require_once $CFG->dirroot . '/mod/forum/lib.php';
forum_tp_delete_read_records($usernew->id);
}
}
开发者ID:sebastiansanio,项目名称:tallerdeprogramacion2fiuba,代码行数:12,代码来源:editlib.php
示例2: forum_tp_stop_tracking
/**
* @global object
* @global object
* @param int $forumid
* @param int $userid
*/
function forum_tp_stop_tracking($forumid, $userid=false) {
global $USER, $DB;
if ($userid === false) {
$userid = $USER->id;
}
if (!$DB->record_exists('forum_track_prefs', array('userid' => $userid, 'forumid' => $forumid))) {
$track_prefs = new stdClass();
$track_prefs->userid = $userid;
$track_prefs->forumid = $forumid;
$DB->insert_record('forum_track_prefs', $track_prefs);
}
return forum_tp_delete_read_records($userid, -1, -1, $forumid);
}
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:22,代码来源:lib.php
示例3: print_error
} else {
$parent = $discussion->firstpost;
}
if (!($post = forum_get_post_full($parent))) {
print_error("notexists", 'forum', "{$CFG->wwwroot}/mod/forum/view.php?f={$forum->id}");
}
if (!forum_user_can_see_post($forum, $discussion, $post, null, $cm)) {
print_error('noviewdiscussionspermission', 'forum', "{$CFG->wwwroot}/mod/forum/view.php?id={$forum->id}");
}
if ($mark == 'read' or $mark == 'unread') {
if ($CFG->forum_usermarksread && forum_tp_can_track_forums($forum) && forum_tp_is_tracked($forum)) {
if ($mark == 'read') {
forum_tp_add_read_record($USER->id, $postid);
} else {
// unread
forum_tp_delete_read_records($USER->id, $postid);
}
}
}
$searchform = forum_search_form($course);
$forumnode = $PAGE->navigation->find($cm->id, navigation_node::TYPE_ACTIVITY);
if (empty($forumnode)) {
$forumnode = $PAGE->navbar;
} else {
$forumnode->make_active();
}
$node = $forumnode->add(format_string($discussion->name), new moodle_url('/mod/forum/discuss.php', array('d' => $discussion->id)));
$node->display = false;
if ($node && $post->id != $discussion->firstpost) {
$node->add(format_string($post->subject), $PAGE->url);
}
开发者ID:sumitnegi933,项目名称:Moodle_lms_New,代码行数:31,代码来源:discuss.php
示例4: forum_tp_stop_tracking
/**
*
*/
function forum_tp_stop_tracking($forumid, $userid = false)
{
global $USER;
if ($userid === false) {
$userid = $USER->id;
}
if (!record_exists('forum_track_prefs', 'userid', $userid, 'forumid', $forumid)) {
$track_prefs = new object();
$track_prefs->userid = $userid;
$track_prefs->forumid = $forumid;
insert_record('forum_track_prefs', $track_prefs);
}
return forum_tp_delete_read_records($userid, -1, -1, $forumid);
}
开发者ID:r007,项目名称:PMoodle,代码行数:17,代码来源:lib.php
注:本文中的forum_tp_delete_read_records函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论