mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Use fullname() functions for quiz reports
This commit is contained in:
parent
4e17c6f39e
commit
ffdd209ad2
3 changed files with 5 additions and 5 deletions
|
@ -93,7 +93,7 @@ class quiz_report extends quiz_default_report {
|
||||||
foreach($user_resps as $thiskey => $thisresp){
|
foreach($user_resps as $thiskey => $thisresp){
|
||||||
$userdata[$thisresp->userid][$thisresp->attemptno]['response'][$thisresp->question]=$thisresp->answer;
|
$userdata[$thisresp->userid][$thisresp->attemptno]['response'][$thisresp->question]=$thisresp->answer;
|
||||||
$userdata[$thisresp->userid][$thisresp->attemptno]['grade']=$thisresp->sumgrades;
|
$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;
|
$userdata[$thisresp->userid][$thisresp->attemptno]['attemptid']=$thisresp->aid;
|
||||||
}
|
}
|
||||||
if($debug and !$download){
|
if($debug and !$download){
|
||||||
|
|
|
@ -102,7 +102,7 @@ class quiz_report extends quiz_default_report {
|
||||||
|
|
||||||
$table->data[] = array ($picture,
|
$table->data[] = array ($picture,
|
||||||
"<a href=\"$CFG->wwwroot/user/view.php?id=$grade->userid&course=$course->id\">".
|
"<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));
|
"$userattempts", round($grade->grade,0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ class quiz_report extends quiz_default_report {
|
||||||
|
|
||||||
$row=1;
|
$row=1;
|
||||||
foreach ($data as $userid => $datum) {
|
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++) {
|
for ($i=1; $i<=$count; $i++) {
|
||||||
if (isset($datum->grades[$i])) {
|
if (isset($datum->grades[$i])) {
|
||||||
$myxls->write_number($row,$i,$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
|
/// Print all the user data
|
||||||
|
|
||||||
foreach ($data as $userid => $datum) {
|
foreach ($data as $userid => $datum) {
|
||||||
echo "$datum->firstname $datum->lastname";
|
echo fullname($datum);
|
||||||
for ($i=1; $i<=$count; $i++) {
|
for ($i=1; $i<=$count; $i++) {
|
||||||
echo "\t";
|
echo "\t";
|
||||||
if (isset($datum->grades[$i])) {
|
if (isset($datum->grades[$i])) {
|
||||||
|
@ -217,7 +217,7 @@ class quiz_report extends quiz_default_report {
|
||||||
|
|
||||||
foreach ($data as $userid => $datum) {
|
foreach ($data as $userid => $datum) {
|
||||||
echo "<tr>";
|
echo "<tr>";
|
||||||
echo "<td><b>$datum->firstname $datum->lastname</b></td>";
|
echo "<td><b>".fullname($datum)."</b></td>";
|
||||||
if ($datum->grades) {
|
if ($datum->grades) {
|
||||||
foreach ($datum->grades as $key => $grade) {
|
foreach ($datum->grades as $key => $grade) {
|
||||||
if (isset($grade)) {
|
if (isset($grade)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue