mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
Slight changes to userdate() function. It now uses gmstrftime() instead of
gmdate to format times, thus allowing it to take advantage of locale, if set, to print dates in the appropriate language. Several userdate invocations had to be changed, though, to use the different formatting specs.
This commit is contained in:
parent
1d16c5717b
commit
7a302afc5f
10 changed files with 35 additions and 27 deletions
|
@ -162,7 +162,7 @@ function print_forum_latest_topics($forum_id=0, $forum_numtopics=5, $forum_style
|
|||
$ownpost = ($topic->userid == $USER->id);
|
||||
switch ($forum_style) {
|
||||
case "minimal":
|
||||
echo "<P><FONT COLOR=#555555>".userdate($topic->modified, "j M H:i")."</FONT>";
|
||||
echo "<P><FONT COLOR=#555555>".userdate($topic->modified, "%e %B, %H:%M")."</FONT>";
|
||||
echo "<BR>$topic->subject ";
|
||||
echo "<A HREF=\"$CFG->wwwroot/mod/discuss/view.php?d=$topic->discuss\">more...</A>";
|
||||
echo "</P>\n";
|
||||
|
|
|
@ -142,7 +142,7 @@
|
|||
$myxls->InsertText($u->lastname);
|
||||
$myxls->InsertText($u->email);
|
||||
$myxls->InsertText($u->idnumber);
|
||||
$myxls->InsertText( userdate($results["$user"]["time"], "d-M-Y h:i:s A") );
|
||||
$myxls->InsertText( userdate($results["$user"]["time"], "%d-%b-%Y %I:%M:%S %p") );
|
||||
$myxls->InsertText($notes);
|
||||
|
||||
foreach ($order as $key => $qid) {
|
||||
|
@ -187,14 +187,14 @@
|
|||
if (! $u = get_record_sql("SELECT firstname,lastname,email,idnumber FROM user WHERE id = '$user'")) {
|
||||
error("Error finding student # $user");
|
||||
}
|
||||
echo $survey->id." ";
|
||||
echo $survey->name." ";
|
||||
echo $user." ";
|
||||
echo $u->firstname." ";
|
||||
echo $u->lastname." ";
|
||||
echo $u->email." ";
|
||||
echo $u->idnumber." ";
|
||||
echo userdate($results["$user"]["time"], "d-M-Y h:i:s A")." ";
|
||||
echo $survey->id."\t";
|
||||
echo $survey->name."\t";
|
||||
echo $user."\t";
|
||||
echo $u->firstname."\t";
|
||||
echo $u->lastname."\t";
|
||||
echo $u->email."\t";
|
||||
echo $u->idnumber."\t";
|
||||
echo userdate($results["$user"]["time"], "%d-%b-%Y %I:%M:%S %p")."\t";
|
||||
|
||||
foreach ($order as $key => $qid) {
|
||||
$question = $questions["$qid"];
|
||||
|
|
|
@ -60,7 +60,7 @@ function 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, "j M Y, h:i A")."</TD>";
|
||||
echo "<TD>".userdate($a->time, "%e %B %Y, %I:%M %p")."</TD>";
|
||||
echo "<TD align=right>$a->numanswers</TD>";
|
||||
echo "</TR>";
|
||||
}
|
||||
|
|
|
@ -194,7 +194,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, "j M Y h:i A")."</TD>";
|
||||
echo "<TD><P>".userdate($a->time, "%e %B %Y, %I:%M %p")."</TD>";
|
||||
echo "<TD BGCOLOR=\"$THEME->cellcontent\"><P>";
|
||||
if ($a->answer1) {
|
||||
echo "$a->answer1 - ".$answers[$a->answer1 - 1];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue