Changed all references of %e to %d to fix strftime on Windows

This commit is contained in:
moodler
2002-11-19 14:27:57 +00:00
parent 60459ef768
commit 62c13a2f3e
11 changed files with 18 additions and 18 deletions
+4 -4
View 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>";
}
+1 -1
View 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",
+1 -1
View 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;
+2 -2
View File
@@ -141,8 +141,8 @@
$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;
+2 -2
View 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>";
+1 -1
View 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)) {
+1 -1
View 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";
+2 -2
View 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>";
+1 -1
View 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";
+2 -2
View 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>";
}
+1 -1
View File
@@ -219,7 +219,7 @@
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];