mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Fix typos in string concatenation.
This commit is contained in:
parent
7f2586640e
commit
15995c4ab6
1 changed files with 2 additions and 2 deletions
|
@ -252,13 +252,13 @@ class quiz_report extends quiz_default_report {
|
||||||
// So join on groups_members and do an inner join on attempts.
|
// 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 '.
|
$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;
|
'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)) {
|
} else if (!empty($currentgroup) && !empty($noattempts)) {
|
||||||
// We want a particular group and we want to do something funky with attempts
|
// We want a particular group and we want to do something funky with attempts
|
||||||
// So join on groups_members and left join on 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 '.
|
$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;
|
'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) {
|
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)
|
// 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;
|
$where .= ' AND qa.userid IS NULL'; // show ONLY no attempts;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue