diff --git a/checkin_notes b/checkin_notes
index 4c4127c697..6bc58ea40c 100644
--- a/checkin_notes
+++ b/checkin_notes
@@ -88,3 +88,22 @@ David Jan 3 2008
boinc_api.C
stripchart/
stripchart
+
+David Jan 4 2008
+ - web: add RSS feed for notifications
+ - make_project: disable community-related periodic tasks
+ for newly-created projects
+
+ html/
+ inc/
+ forum.inc
+ friend.inc
+ notify.inc (new)
+ pm.inc
+ user.inc
+ user/
+ img/
+ rss_icon.gif
+ sample_index.php
+ tools/
+ make_project
diff --git a/db/bolt_constraints.sql b/db/bolt_constraints.sql
index 56db94c362..d2ec6144b8 100644
--- a/db/bolt_constraints.sql
+++ b/db/bolt_constraints.sql
@@ -6,3 +6,6 @@ alter table bolt_enrollment
alter table bolt_view
add index bv_cs(course_id, start_time);
+
+alter table bolt_refresh
+ add unique br_u(user_id, course_id);
diff --git a/db/bolt_schema.sql b/db/bolt_schema.sql
index be1f30704b..cc165e00fd 100644
--- a/db/bolt_schema.sql
+++ b/db/bolt_schema.sql
@@ -57,10 +57,13 @@ create table bolt_view (
primary key (id)
);
--- represents the result of an exercise
+-- represents the result of a single exercise
--
-create table bolt_exercise_result (
+create table bolt_result (
id integer not null auto_increment,
+ create_time integer not null,
+ user_id integer not null,
+ course_id integer not null,
view_id integer not null,
-- the original display of exercise
score double not null,
diff --git a/html/inc/forum.inc b/html/inc/forum.inc
index b350c691c3..81c0696b87 100644
--- a/html/inc/forum.inc
+++ b/html/inc/forum.inc
@@ -1077,5 +1077,11 @@ function subscribed_post_web_line($notify) {
return "New posts in the thread id>$thread->title";
}
+function subscribe_rss($notify, &$title, &$msg, &$url) {
+ $thread = BoincThread::lookup_id($notify->opaque);
+ $title = "New posts in subscribed thread";
+ $msg = "There are new posts in the thread '$thread->title'";
+ $url = URL_BASE."forum_thread.php?id=$thread->id";
+}
?>
diff --git a/html/inc/friend.inc b/html/inc/friend.inc
index cb86772d38..e04a10c39d 100644
--- a/html/inc/friend.inc
+++ b/html/inc/friend.inc
@@ -75,4 +75,18 @@ Do not reply to this message.
send_email($src_user, "[".PROJECT."] friend confirmed", $message);
}
+function friend_req_rss($notify, &$title, &$msg, &$url) {
+ $src_user = BoincUser::lookup_id($notify->opaque);
+ $title = "Friend request";
+ $msg = "$src_user->name has added you as a friend; please confirm or decline";
+ $url = URL_BASE."friend.php?action=query&userid=$notify->opaque";
+}
+
+function friend_accept_rss($notify, &$title, &$msg, &$url) {
+ $src_user = BoincUser::lookup_id($notify->opaque);
+ $title = "Friendship confirmation";
+ $msg = "$src_user->name has confirmed you as a friend";
+ $url = URL_BASE."home.php";
+}
+
?>
diff --git a/html/inc/notify.inc b/html/inc/notify.inc
new file mode 100644
index 0000000000..fd43f1e4a9
--- /dev/null
+++ b/html/inc/notify.inc
@@ -0,0 +1,13 @@
+authenticator.$user->passwd_hash."notify_rss");
+}
+
+function notify_rss_url($user) {
+ return URL_BASE."notify_rss.php?userid=$user->id&auth=".notify_rss_auth($user);
+}
+
+?>
diff --git a/html/inc/pm.inc b/html/inc/pm.inc
index 82c944192c..12d9e918d3 100644
--- a/html/inc/pm.inc
+++ b/html/inc/pm.inc
@@ -172,5 +172,13 @@ function pm_email_remind($user) {
return "";
}
+function pm_rss($notify, &$title, &$msg, &$url) {
+ $pm = BoincPrivateMessage::lookup_id($notify->opaque);
+ $from_user = BoincUser::lookup_id($pm->senderid);
+ $title = "New private message";
+ $msg = "$from_user->name sent you a private message; subject: $pm->subject";
+ $url = URL_BASE."pm.php";
+}
+
$cvs_version_tracker[]="\$Id: pm.inc 14019 2007-11-01 23:04:39Z davea $";
?>
diff --git a/html/inc/user.inc b/html/inc/user.inc
index 51d97ec43b..bbf94fce0d 100644
--- a/html/inc/user.inc
+++ b/html/inc/user.inc
@@ -6,6 +6,7 @@ require_once("../inc/util.inc");
require_once("../inc/team.inc");
require_once("../inc/friend.inc");
require_once("../inc/forum_db.inc");
+require_once("../inc/notify.inc");
function parse_project($f) {
$p->total_credit = 0.0;
@@ -220,8 +221,9 @@ function show_community_private($user) {
if (count($notifies)) {
$x = "";
foreach ($notifies as $notify) {
- $x .= notify_description($notify)."
";
+ $x .= "• ".notify_description($notify)."
";
}
+ $x .= "";
row2("Notifications", $x);
}
diff --git a/html/user/img/rss_icon.gif b/html/user/img/rss_icon.gif
new file mode 100644
index 0000000000..2b31987cc8
Binary files /dev/null and b/html/user/img/rss_icon.gif differ
diff --git a/html/user/sample_index.php b/html/user/sample_index.php
index f2a3cdb155..d17106bc5b 100644
--- a/html/user/sample_index.php
+++ b/html/user/sample_index.php
@@ -127,7 +127,7 @@ if (count($project_news) > 5) {
echo "
News is available as an - RSS feed .
+ RSS feed . "; diff --git a/tools/make_project b/tools/make_project index 76c8ee063f..26d4a146d3 100755 --- a/tools/make_project +++ b/tools/make_project @@ -232,36 +232,43 @@ t = project.config.tasks.make_node_and_append("task") t.period = '24 hours' t.output = 'db_dump.out' t.cmd = 'db_dump -d 2 -dump_spec ../db_dump_spec.xml' +t.disabled = 1 t = project.config.tasks.make_node_and_append("task") t.period = '1 days' t.output = 'update_uotd.out' t.cmd = 'run_in_ops ./update_uotd.php' +t.disabled = 1 t = project.config.tasks.make_node_and_append("task") t.period = '1 hour' t.output = 'update_forum_activities.out' t.cmd = 'run_in_ops ./update_forum_activities.php' +t.disabled = 1 t = project.config.tasks.make_node_and_append("task") t.period = '7 days' t.output = 'update_stats.out' t.cmd = 'update_stats -update_users -update_teams -update_hosts' +t.disabled = 1 t = project.config.tasks.make_node_and_append("task") t.period = '24 hours' t.output = 'update_profile_pages.out' t.cmd = 'run_in_ops ./update_profile_pages.php' +t.disabled = 1 t = project.config.tasks.make_node_and_append("task") t.period = '24 hours' t.output = 'team_import.out' t.cmd = 'run_in_ops ./team_import.php' +t.disabled = 1 t = project.config.tasks.make_node_and_append("task") t.period = '24 hours' t.output = 'notify.out' t.cmd = 'run_in_ops ./notify.php' +t.disabled = 1 project.config.write()