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:
mchurch
2005-04-25 00:56:19 +00:00
parent 5b34cd2828
commit fe0a76782f
2 changed files with 17 additions and 0 deletions
+11
View File
@@ -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>
+6
View File
@@ -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) {