If a user sets their 'Track read/unread posts' personal profile setting to
'No', delete all of their read records.
This commit is contained in:
@@ -148,6 +148,17 @@ if (isadmin()) {
|
||||
choose_from_menu ($choices, "autosubscribe", $user->autosubscribe, "") ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($CFG->forum_trackreadposts) { ?>
|
||||
<tr>
|
||||
<th><?php print_string("trackforums") ?>:</th>
|
||||
<td><?php
|
||||
unset($choices);
|
||||
$choices["1"] = get_string("yes");
|
||||
$choices["0"] = get_string("no");
|
||||
choose_from_menu ($choices, "trackforums", $user->trackforums, "") ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<?php if ($CFG->htmleditor) { ?>
|
||||
<tr>
|
||||
<th><?php print_string("textediting") ?>:</th>
|
||||
|
||||
@@ -191,6 +191,12 @@
|
||||
set_send_count($usernew,true);
|
||||
}
|
||||
|
||||
/// Update forum track preference.
|
||||
if (($usernew->trackforums != $USER->trackforums) && !$usernew->trackforums) {
|
||||
require_once($CFG->dirroot.'/mod/forum/lib.php');
|
||||
forum_tp_delete_read_records($USER->id);
|
||||
}
|
||||
|
||||
add_to_log($course->id, "user", "update", "view.php?id=$user->id&course=$course->id", "");
|
||||
|
||||
if ($user->id == $USER->id) {
|
||||
|
||||
Reference in New Issue
Block a user