Skip to content

Commit

Permalink
Resolvido bug de alunos em mais de um curso
Browse files Browse the repository at this point in the history
  • Loading branch information
willianmano committed May 15, 2015
1 parent 4446640 commit e74f4ac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function block_ranking_get_students($limit = null) {
FROM
{user} u
INNER JOIN {role_assignments} a ON a.userid = u.id
INNER JOIN {ranking_points} r ON r.userid = u.id
INNER JOIN {ranking_points} r ON r.userid = u.id AND r.courseid = :r_courseid
INNER JOIN {context} c ON c.id = a.contextid
WHERE a.contextid = :contextid
AND a.userid = u.id
Expand All @@ -67,6 +67,7 @@ function block_ranking_get_students($limit = null) {
$params['roleid'] = 5;
$params['courseid'] = $COURSE->id;
$params['crsid'] = $COURSE->id;
$params['r_courseid'] = $COURSE->id;

$users = array_values($DB->get_records_sql($sql, $params));

Expand Down

0 comments on commit e74f4ac

Please sign in to comment.