MDL-37546 Assignment fix assign_get_recent_mod_activity code cleanup regression.

This commit is contained in:
Damyon Wiese 2013-01-16 13:40:23 +08:00
parent 50ac16b8d0
commit f93fdcef86

View File

@ -616,13 +616,13 @@ function assign_get_recent_mod_activity(&$activities,
$userfields = user_picture::fields('u', null, 'userid');
if (!$submissions = $DB->get_records_sql('SELECT asb.id, asb.timemodified,
$userfields
FROM {assign_submission} asb
JOIN {assign} a ON a.id = asb.assignment
JOIN {user} u ON u.id = asb.userid
$groupjoin
WHERE asb.timemodified > :timestart AND
if (!$submissions = $DB->get_records_sql('SELECT asb.id, asb.timemodified, ' .
$userfields .
' FROM {assign_submission} asb
JOIN {assign} a ON a.id = asb.assignment
JOIN {user} u ON u.id = asb.userid ' .
$groupjoin .
' WHERE asb.timemodified > :timestart AND
a.id = :cminstance
' . $userselect . ' ' . $groupselect .
' ORDER BY asb.timemodified ASC', $params)) {