Skip to content

Commit

Permalink
MDL-57868 mod_feedback: Fix incorrect query parameters order
Browse files Browse the repository at this point in the history
get_records_menu call get_records using the same params ordering, it is
causing a duplicated value error for the first column
  • Loading branch information
jleyva committed Feb 6, 2017
1 parent a04076a commit 7b48139
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mod/feedback/lib.php
Expand Up @@ -962,10 +962,9 @@ function feedback_get_incomplete_users(cm_info $cm,

//now get all completeds
$params = array('feedback'=>$cm->instance);
if (!$completedusers = $DB->get_records_menu('feedback_completed', $params, '', 'userid,id')) {
if (!$completedusers = $DB->get_records_menu('feedback_completed', $params, '', 'id, userid')) {
return $allusers;
}
$completedusers = array_keys($completedusers);

//now strike all completedusers from allusers
$allusers = array_diff($allusers, $completedusers);
Expand Down

0 comments on commit 7b48139

Please sign in to comment.