]> git.mjollnir.org Git - moodle.git/commitdiff
Changed all references of %e to %d to fix strftime on Windows
authormoodler <moodler>
Tue, 19 Nov 2002 14:27:57 +0000 (14:27 +0000)
committermoodler <moodler>
Tue, 19 Nov 2002 14:27:57 +0000 (14:27 +0000)
course/lib.php
course/log.php
course/loggraph.php
course/weeks.php
files/index.php
lib/moodlelib.php
mod/assignment/lib.php
mod/forum/lib.php
mod/journal/lib.php
mod/survey/lib.php
mod/survey/report.php

index 8ba515e5bb08f42687b91ef8863cf4857a347e20..c8171d634a83726a95eaf53f26218300c7af714b 100644 (file)
@@ -61,7 +61,7 @@ function print_log_selector_form($course, $selecteduser=0, $selecteddate="today"
     $timemidnight = $today = usergetmidnight($timenow);
 
     // Put today up the top of the list
-    $dates = array("$timemidnight" => get_string("today").", ".userdate($timenow, "%e %B %Y") );
+    $dates = array("$timemidnight" => get_string("today").", ".userdate($timenow, "%d %B %Y") );
 
     if (! $course->startdate) {
         $course->startdate = $course->timecreated;
@@ -71,7 +71,7 @@ function print_log_selector_form($course, $selecteduser=0, $selecteddate="today"
     while ($timemidnight > $course->startdate and $numdates < 365) {
         $timemidnight = $timemidnight - 86400;
         $timenow = $timenow - 86400;
-        $dates["$timemidnight"] = userdate($timenow, "%A, %e %B %Y");
+        $dates["$timemidnight"] = userdate($timenow, "%A, %d %B %Y");
         $numdates++;
     }
 
@@ -160,7 +160,7 @@ function print_log($course, $user=0, $date=0, $order="ORDER BY l.time ASC") {
             echo "<TD NOWRAP><FONT SIZE=2><A HREF=\"view.php?id=$log->course\">".$courses[$log->course]."</A></TD>";
         }
         echo "<TD NOWRAP ALIGN=right><FONT SIZE=2>".userdate($log->time, "%A")."</TD>";
-        echo "<TD NOWRAP><FONT SIZE=2>".userdate($log->time, "%e %B %Y, %I:%M %p")."</TD>";
+        echo "<TD NOWRAP><FONT SIZE=2>".userdate($log->time, "%d %B %Y, %I:%M %p")."</TD>";
         echo "<TD NOWRAP><FONT SIZE=2>";
         link_to_popup_window("$CFG->wwwroot/lib/ipatlas/plot.php?address=$log->ip&user=$log->user", "ipatlas","$log->ip", 400, 700);
         echo "</TD>";
@@ -287,7 +287,7 @@ function print_recent_activity($course) {
     } else {
         echo "<P ALIGN=CENTER><FONT SIZE=1>";
         echo get_string("yourlastlogin").":<BR>"; 
-        echo userdate($USER->lastlogin, "%A, %e %b %Y, %H:%M");
+        echo userdate($USER->lastlogin, "%A, %d %b %Y, %H:%M");
         echo "</FONT></P>";
     }
 
index c925f164eb7f768dc36621748bef22f9d47ac83b..bf7732f69d2a3014987ddd0a892354c196b91253 100644 (file)
@@ -39,7 +39,7 @@
             $userinfo = "$u->firstname $u->lastname";
         }
         if ($date) {
-            $dateinfo = userdate($date, "%A, %e %B %Y");
+            $dateinfo = userdate($date, "%A, %d %B %Y");
         }
 
         print_header("$course->shortname: $strlogs", "$course->fullname", 
index 7e48cd960da91470b778a2e5342861b9dddfdf36..8721272bd779ffb46f0ea58e21ab3a8abc1f9556 100644 (file)
@@ -43,7 +43,7 @@
        $i = 0;
        while ($timestart < $timenow) {
            $timefinish = $timestart + 86400;
-           $days[$i] = userdate($timestart, "%a %e %b");
+           $days[$i] = userdate($timestart, "%a %d %b");
            $logs[$i] = 0;
            $i++;
            $timestart = $timefinish;
index 8f37ecc16638ac3713a53c7f95de445db8a195c9..75de1af282702b2025f2efc9fc9eb66410469cec 100644 (file)
 
         $thisweek = (($weekdate <= $timenow) && ($timenow < $nextweekdate));
 
-        $weekday = userdate($weekdate, "%e %B");
-        $endweekday = userdate($weekdate+518400, "%e %B");
+        $weekday = userdate($weekdate, "%d %B");
+        $endweekday = userdate($weekdate+518400, "%d %B");
 
         if ($thisweek) {
             $highlightcolor = $THEME->cellheading2;
index 8ceacdb0833c44edab4361bc88318e2c300ecd25..4d612143dc779c9ccec4a680935b405602ea3be3 100644 (file)
@@ -547,7 +547,7 @@ function displaydir ($wdir) {
             $filename = $fullpath."/".$dir;
             $fileurl  = rawurlencode($wdir."/".$dir);
             $filesafe = rawurlencode($dir);
-            $filedate = userdate(filectime($filename), "%e %b %Y, %I:%M %p");
+            $filedate = userdate(filectime($filename), "%d %b %Y, %I:%M %p");
     
             echo "<TR>";
 
@@ -573,7 +573,7 @@ function displaydir ($wdir) {
             $fileurl     = "$wdir/$file";
             $filesafe    = rawurlencode($file);
             $fileurlsafe = rawurlencode($fileurl);
-            $filedate    = userdate(filectime($filename), "%e %b %Y, %I:%M %p");
+            $filedate    = userdate(filectime($filename), "%d %b %Y, %I:%M %p");
 
             echo "<TR>";
 
index faf6b09966dff963ae7f639ac49d8b147886ef07..6689751a875e71daecb1e0cf12ef760c7632eb56 100644 (file)
@@ -527,7 +527,7 @@ function userdate($date, $format="", $timezone=99) {
     global $USER;
 
     if ($format == "") {
-        $format = "%A, %e %B %Y, %I:%M %p";
+        $format = "%A, %d %B %Y, %I:%M %p";
     }
     if ($timezone == 99) {
         if (isset($USER->timezone)) {
index 3b9f327e1ed1599cec10e08f248b854c9765dd88..21344919e50eb45fb34e681530d7a5df0860c6ae 100644 (file)
@@ -206,7 +206,7 @@ function assignment_print_recent_activity(&$logs, $isteacher=false) {
         $content = true;
         print_headline(get_string("newsubmissions", "assignment").":");
         foreach ($assignments as $assignment) {
-            $date = userdate($assignment->time, "%e %b, %H:%M");
+            $date = userdate($assignment->time, "%d %b, %H:%M");
             echo "<P><FONT SIZE=1>$date - $assignment->firstname $assignment->lastname<BR>";
             echo "\"<A HREF=\"$CFG->wwwroot/mod/assignment/$assignment->url\">";
             echo "$assignment->name";
index 944339c8b00acddf26f0492d8a1a670f8916a8c4..afbfbf9b0c4eeacada11dfc674786e786b4b761b 100644 (file)
@@ -349,7 +349,7 @@ function forum_print_recent_activity(&$logs, $isteacher=false) {
                     $heading = true;
                     $content = true;
                 }
-                $date = userdate($post->modified, "%e %b, %H:%M");
+                $date = userdate($post->modified, "%d %b, %H:%M");
                 echo "<P><FONT SIZE=1 $teacherpost>$date - $post->firstname $post->lastname<BR>";
                 echo "\"<A HREF=\"$CFG->wwwroot/mod/forum/$log->url\">";
                 if ($log->action == "add") {
@@ -1315,7 +1315,7 @@ function forum_print_latest_discussions($forum_id=0, $forum_numdiscussions=5, $f
         $ownpost = ($discussion->userid == $USER->id);
         switch ($forum_style) {
             case "minimal":
-                echo "<P><FONT COLOR=#555555>".userdate($discussion->modified, "%e %b, %H:%M")." - $discussion->firstname</FONT>";
+                echo "<P><FONT COLOR=#555555>".userdate($discussion->modified, "%d %b, %H:%M")." - $discussion->firstname</FONT>";
                 echo "<BR>$discussion->subject ";
                 echo "<A HREF=\"$CFG->wwwroot/mod/forum/discuss.php?d=$discussion->discussion\">";
                 echo get_string("more", "forum")."...</A>";
index 44d64c914d9697cbf303b6093d5fd3100454e9e2..35ce8c7f6c17ae7580deb5a098dd800ab68e51da 100644 (file)
@@ -150,7 +150,7 @@ function journal_print_recent_activity(&$logs, $isteacher=false) {
         $content = true;
         print_headline(get_string("newjournalentries", "journal").":");
         foreach ($journals as $journal) {
-            $date = userdate($journal->time, "%e %b, %H:%M");
+            $date = userdate($journal->time, "%d %b, %H:%M");
             echo "<P><FONT SIZE=1>$date - $journal->firstname $journal->lastname<BR>";
             echo "\"<A HREF=\"$CFG->wwwroot/mod/journal/$journal->url\">";
             echo "$journal->name";
index d166b4e0f2075a6498079e2f7fa25d4cf1bb6d33..9cbcd74c615f70b5a83e1789888b3b314745d366 100644 (file)
@@ -120,7 +120,7 @@ function survey_print_recent_activity(&$logs, $isteacher=false) {
         $content = true;
         print_headline(get_string("newsurveyresponses", "survey").":");
         foreach ($surveys as $survey) {
-            $date = userdate($survey->time, "%e %b, %H:%M");
+            $date = userdate($survey->time, "%d %b, %H:%M");
             echo "<P><FONT SIZE=1>$date - $survey->firstname $survey->lastname<BR>";
             echo "\"<A HREF=\"$CFG->wwwroot/mod/survey/$survey->url\">";
             echo "$survey->name";
@@ -167,7 +167,7 @@ function survey_print_all_responses($survey, $results) {
                  
         echo "<TR>";
         echo "<TD><A HREF=\"report.php?action=student&student=$a->id&id=$survey\">$a->firstname $a->lastname</A></TD>";
-        echo "<TD>".userdate($a->time, "%e %B %Y, %I:%M %p")."</TD>";
+        echo "<TD>".userdate($a->time, "%d %B %Y, %I:%M %p")."</TD>";
         echo "<TD align=right>$a->numanswers</TD>";
         echo "</TR>";
     }
index 00cb98b2c2128b0f930717d47c454896bc93d8a7..57f1e87f4ca5861a0ac6d1bcef3cf19be0586bbd 100644 (file)
             print_user_picture($a->user, $course->id, $a->picture, false);
             echo "</TD>";
             echo "<TD><P><A HREF=\"report.php?id=$id&action=student&student=$a->user\">$a->firstname $a->lastname</A></TD>";
-            echo "<TD><P>".userdate($a->time, "%e %B %Y, %I:%M %p")."</TD>";
+            echo "<TD><P>".userdate($a->time, "%d %B %Y, %I:%M %p")."</TD>";
             echo "<TD BGCOLOR=\"$THEME->cellcontent\"><P>";
             if ($a->answer1) {
                 echo "$a->answer1 - ".$answers[$a->answer1 - 1];