Skip to content

Commit

Permalink
quiz manual grading NOBUG fix performance issue with printing the use…
Browse files Browse the repository at this point in the history
…r picture.
  • Loading branch information
timhunt committed Aug 5, 2010
1 parent 9ffcb38 commit fc3472d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mod/quiz/report/grading/report.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ function view_question($quiz, $question, $totalattempts, $ungraded) {
$table->add_separator();
foreach($attempts as $attempt) {

//TODO: this is a performance problem, fetch user info elsewhere!!
$user = (object)array('id'=>$attempt->userid);
$user = clone($attempt);
$user->id = $user->userid;
$picture = $OUTPUT->user_picture($user, array('courseid'=>$quiz->course));

// link to student profile
Expand Down Expand Up @@ -421,7 +421,7 @@ function attempts_sql($quizid, $wantstateevent=false, $questionid=0, $userid=0,
global $CFG, $DB;
// this sql joins the attempts table and the user table
$select = 'SELECT qa.id AS attemptid, qa.uniqueid, qa.attempt, qa.timefinish, qa.preview,
u.id AS userid, u.firstname, u.lastname, u.picture ';
u.id AS userid, u.firstname, u.lastname, u.picture, u.imagealt, u.email ';
if ($wantstateevent && $questionid){
$select .= ', qs.event ';
}
Expand Down

0 comments on commit fc3472d

Please sign in to comment.