Skip to content

Commit

Permalink
Fix typos in string concatenation.
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhunt committed Sep 20, 2006
1 parent 7f25866 commit 15995c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mod/quiz/report/overview/report.php
Original file line number Diff line number Diff line change
Expand Up @@ -252,13 +252,13 @@ function display($quiz, $cm, $course) {
// So join on groups_members and do an inner join on attempts.
$from = 'FROM '.$CFG->prefix.'user u JOIN '.$CFG->prefix.'role_assignments ra ON ra.userid = u.id JOIN '.$CFG->prefix.'groups_members gm ON u.id = gm.userid '.
'JOIN '.$CFG->prefix.'quiz_attempts qa ON u.id = qa.userid AND qa.quiz = '.$quiz->id;
$where = ' WHERE ra.contextid $contextlists AND gm.groupid = '.$currentgroup.' AND qa.preview = 0';
$where = ' WHERE ra.contextid ' . $contextlists . ' AND gm.groupid = '.$currentgroup.' AND qa.preview = 0';
} else if (!empty($currentgroup) && !empty($noattempts)) {
// We want a particular group and we want to do something funky with attempts
// So join on groups_members and left join on attempts...
$from = 'FROM '.$CFG->prefix.'user u JOIN '.$CFG->prefix.'role_assignments ra ON ra.userid = u.id JOIN '.$CFG->prefix.'groups_members gm ON u.id = gm.userid '.
'LEFT JOIN '.$CFG->prefix.'quiz_attempts qa ON u.id = qa.userid AND qa.quiz = '.$quiz->id;
$where = ' WHERE ra.contextid $contextlists AND gm.groupid = '.$currentgroup.' AND qa.preview = 0';
$where = ' WHERE ra.contextid ' . $contextlists . ' AND gm.groupid = '.$currentgroup.' AND qa.preview = 0';
if ($noattempts == 1) {
// noattempts = 1 means only no attempts, so make the left join ask for only records where the right is null (no attempts)
$where .= ' AND qa.userid IS NULL'; // show ONLY no attempts;
Expand Down

0 comments on commit 15995c4

Please sign in to comment.