Use fullname() functions for quiz reports

This commit is contained in:
moodler 2004-05-18 13:31:37 +00:00
parent 4e17c6f39e
commit ffdd209ad2
3 changed files with 5 additions and 5 deletions

View file

@ -93,7 +93,7 @@ class quiz_report extends quiz_default_report {
foreach($user_resps as $thiskey => $thisresp){
$userdata[$thisresp->userid][$thisresp->attemptno]['response'][$thisresp->question]=$thisresp->answer;
$userdata[$thisresp->userid][$thisresp->attemptno]['grade']=$thisresp->sumgrades;
$userdata[$thisresp->userid][$thisresp->attemptno]['name']=$thisresp->lastname . ", " . $thisresp->firstname;
$userdata[$thisresp->userid][$thisresp->attemptno]['name']=fullname($thisresp);
$userdata[$thisresp->userid][$thisresp->attemptno]['attemptid']=$thisresp->aid;
}
if($debug and !$download){

View file

@ -102,7 +102,7 @@ class quiz_report extends quiz_default_report {
$table->data[] = array ($picture,
"<a href=\"$CFG->wwwroot/user/view.php?id=$grade->userid&course=$course->id\">".
"$grade->firstname $grade->lastname</a>",
fullname($grade).'</a>',
"$userattempts", round($grade->grade,0));
}

View file

@ -116,7 +116,7 @@ class quiz_report extends quiz_default_report {
$row=1;
foreach ($data as $userid => $datum) {
$myxls->write_string($row,0,"$datum->firstname $datum->lastname");
$myxls->write_string($row,0,fullname($datum));
for ($i=1; $i<=$count; $i++) {
if (isset($datum->grades[$i])) {
$myxls->write_number($row,$i,$datum->grades[$i]);
@ -170,7 +170,7 @@ class quiz_report extends quiz_default_report {
/// Print all the user data
foreach ($data as $userid => $datum) {
echo "$datum->firstname $datum->lastname";
echo fullname($datum);
for ($i=1; $i<=$count; $i++) {
echo "\t";
if (isset($datum->grades[$i])) {
@ -217,7 +217,7 @@ class quiz_report extends quiz_default_report {
foreach ($data as $userid => $datum) {
echo "<tr>";
echo "<td><b>$datum->firstname $datum->lastname</b></td>";
echo "<td><b>".fullname($datum)."</b></td>";
if ($datum->grades) {
foreach ($datum->grades as $key => $grade) {
if (isset($grade)) {