Commit ff79506e authored by Nigel McNie's avatar Nigel McNie
Browse files

No longer can you watch groups

parent d58588c9
......@@ -180,21 +180,6 @@ switch ($type) {
$view = new View($view);
$view->release($id);
json_reply(false, get_string('viewreleasedsuccess'));
break;
case 'watchlist':
if (record_exists('usr_watchlist_group', 'usr', $USER->get('id'), 'group', $group->id)) {
delete_records('usr_watchlist_group', 'usr', $USER->get('id'), 'group', $group->id);
json_reply(false, array('message' => get_string('removedgroupfromwatchlist', 'activity'), 'member' => 0));
}
else {
$gwl = new StdClass;
$gwl->usr = $USER->get('id');
$gwl->group = $group->id;
$gwl->ctime = db_format_timestamp(time());
insert_record('usr_watchlist_group', $gwl);
json_reply(false, array('message' => get_string('addedgrouptowatchlist', 'activity'), 'member' => 1));
}
break;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment