Permalink
Browse files

Merge branch 'w04_MDL-26045_20_onlineblock' of git://github.com/skoda…

…k/moodle
  • Loading branch information...
2 parents e53a87d + fb7dd39 commit f8b214e1cde48ae1d02798a9ab387981ee0a2158 Sam Hemelryk committed Jan 24, 2011
Showing with 4 additions and 6 deletions.
  1. +4 −6 blocks/online_users/block_online_users.php
@@ -43,8 +43,6 @@ function get_content() {
$groupmembers = "";
$groupselect = "";
- $rafrom = "";
- $rawhere = "";
$params = array();
//Add this to the SQL to show only group users
@@ -78,22 +76,22 @@ function get_content() {
$params = array_merge($params, $eparams);
$sql = "SELECT $userfields, MAX(ul.timeaccess) AS lastaccess
- FROM {user_lastaccess} ul, {user} u $groupmembers $rafrom
+ FROM {user_lastaccess} ul $groupmembers, {user} u
JOIN ($esqljoin) euj ON euj.id = u.id
WHERE ul.timeaccess > $timefrom
AND u.id = ul.userid
AND ul.courseid = :courseid
- $groupselect $rawhere
+ $groupselect
GROUP BY $userfields
ORDER BY lastaccess DESC";
$csql = "SELECT u.id
- FROM {user_lastaccess} ul, {user} u $groupmembers $rafrom
+ FROM {user_lastaccess} ul $groupmembers, {user} u
JOIN ($esqljoin) euj ON euj.id = u.id
WHERE ul.timeaccess > $timefrom
AND u.id = ul.userid
AND ul.courseid = :courseid
- $groupselect $rawhere
+ $groupselect
GROUP BY u.id";
$params['courseid'] = $this->page->course->id;

0 comments on commit f8b214e

Please sign in to comment.