]> git.mjollnir.org Git - moodle.git/commitdiff
Old new.php system is replaced by print_recent_activity() in course/lib.php
authormartin <martin>
Wed, 5 Jun 2002 03:22:12 +0000 (03:22 +0000)
committermartin <martin>
Wed, 5 Jun 2002 03:22:12 +0000 (03:22 +0000)
course/new.php [deleted file]
course/social.php
mod/journal/new.php [deleted file]
user/new.php [deleted file]

diff --git a/course/new.php b/course/new.php
deleted file mode 100644 (file)
index ea9c59f..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<?PHP // $Id$
-
-// This script prints all the new things that have happened since the last login
-// To do this, it calls new.php in each module.  It relies on $USER->lastlogin
-
-    require("../config.php");
-    require("lib.php");
-
-    require_variable($id);    // Course ID
-
-    if (! $course = get_record("course", "id", $id)) {
-        error("Could not find the course!");
-    }
-
-    require_login($course->id);
-
-    add_to_log($course->id, "course", "view new", "new.php?id=$course->id", ""); 
-
-    print_header("$course->shortname: What's new", "$course->fullname",
-                 "<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A> -> What's new");
-
-    print_heading("Recent activity since your last login"); 
-    print_heading(userdate($USER->lastlogin)); 
-    
-    print_simple_box_start("center");
-    $modules = array ("users");
-
-    $mods = get_records_sql("SELECT * FROM modules");
-
-    foreach ($mods as $mod) {
-        $modules[] = "mod/$mod->name";
-    }
-
-    foreach ($modules as $module) {
-        $newfile = "$CFG->dirroot/$module/new.php";
-        if (file_exists($newfile)) {
-            include($newfile);
-        }
-    }
-
-    print_simple_box_end();
-    print_footer($course);
-
-?>
index cd9ea24ac7ec3041cf95127adc095a56bfa24fa4..f23f74d31c2823008e05e691bc61e5d8d9a031fb 100644 (file)
   <TR>
     <TD WIDTH="15%" VALIGN="TOP">
       <? 
-      //print_simple_box("News", $align="CENTER", $width="100%", $color="$THEME->cellheading");
-
-      //print_side_block("<A HREF=\"new.php?id=$course->id\">What's New!</A>", 
-      //                 "", "<FONT SIZE=1>...since your last login</FONT>");
       //if ($news = get_course_news_forum($course->id)) {
           //forum_latest_topics($news->id, 5, "minimal", "DESC", false);
       //}
diff --git a/mod/journal/new.php b/mod/journal/new.php
deleted file mode 100644 (file)
index daf19ad..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<?PHP // $Id$
-
-// Code fragment called by /courses/new.php
-// Prints out a formatted table of all the new things that have happened 
-// with this module (since the user's last login).  Suitable for students.
-
-// Assumes $course and $USER are defined and page has been started.
-
-    if ($journals = get_all_instances_in_course("journal", $course->id)) {
-
-        foreach ($journals as $journal) {
-            if ($entry = get_record_sql("SELECT * FROM journal_entries
-                                          WHERE timemarked > '$USER->lastlogin' 
-                                                AND journal = '$journal->id'
-                                                AND user = $USER->id")) {
-                echo "<P><B>Journal feedback: $journal->name</B></P>";
-                echo "<FONT SIZE=2><UL>";
-                echo "<LI><A HREF=\"/mod/journal/view.php?id=$journal->coursemodule\">Your journal entry</A> has some feedback!";
-                echo ", ".userdate($entry->timemarked);
-                echo "</UL></FONT>";
-            }
-
-            if ($entries = get_records_sql("SELECT j.*, u.id as userid, u.firstname, u.lastname 
-                                            FROM journal_entries j, user u
-                                            WHERE modified > '$USER->lastlogin' 
-                                                  AND journal = '$journal->id'
-                                                  AND j.user = u.id  ORDER by j.modified")) {
-                echo "<P><B>Journal entries: <A HREF=\"/mod/journal/view.php?id=$journal->coursemodule\">$journal->name</A></B></P>";
-                echo "<FONT SIZE=2><UL>";
-                foreach ($entries as $entry) {
-                    echo "<LI>$entry->firstname $entry->lastname edited their journal";
-                    echo ", ".userdate($entry->modified);
-                }
-                echo "</UL></FONT>";
-            }
-        }
-    }
-
-?>
diff --git a/user/new.php b/user/new.php
deleted file mode 100644 (file)
index 4beec74..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-<?PHP // $Id$
-
-// Code fragment called by /courses/new.php
-// Prints out a formatted table of all the new things that have happened 
-// with this module (since the user's last login).  Suitable for students.
-
-// Assumes $course and $USER are defined and page has been started.
-
-// First, print all the users who have updated their records.
-
-    if ($users = get_records_sql("SELECT u.* FROM user u, user_students s 
-                                  WHERE u.id = s.user 
-                                        AND s.course = '$course->id' 
-                                        AND u.timemodified > '$USER->lastlogin' ")) {
-   
-        echo "<P><B>Updated User Profiles</B></P>";
-        echo "<FONT SIZE=2><UL>";
-
-        foreach ($users as $user) {
-            echo "<LI><A HREF=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id\">$user->firstname $user->lastname</A>";
-            echo " ".moodledate($user->timemodified);
-        }
-        echo "</UL></FONT>";
-    }
-
-    if ($users = get_records_sql("SELECT u.* FROM user u, user_students s 
-                                  WHERE u.id = s.user 
-                                        AND s.course = '$course->id' 
-                                        AND u.currentlogin > '$USER->lastlogin' ")) {
-   
-        echo "<P><B>User logins</B></P>";
-        echo "<FONT SIZE=2><UL>";
-
-        foreach ($users as $user) {
-            echo "<LI><A HREF=\"$CFG->wwwroot/user/view.php?id=$user->id&course=$course->id\">$user->firstname $user->lastname</A>";
-            echo " ".moodledate($user->currentlogin);
-        }
-        echo "</UL></FONT>";
-    }
-
-?>