Skip to content

Commit

Permalink
Improved fetch sender user based on capability
Browse files Browse the repository at this point in the history
  • Loading branch information
prasanna-lmsace committed Oct 6, 2023
1 parent b3e29c3 commit 9ad00d6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion classes/task/notify_users.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public static function pulse_cron_task($extend=true) {
return true;
}

$rolesql = "SELECT rc.roleid FROM {role_capabilities} rc
$rolesql = "SELECT rc.id, rc.roleid FROM {role_capabilities} rc
JOIN {capabilities} cap ON rc.capability = cap.name
JOIN {context} ctx on rc.contextid = ctx.id
WHERE rc.capability = :capability ";
Expand Down
2 changes: 1 addition & 1 deletion classes/task/sendinvitation.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public static function find_user_sender($senderdata, $userid) {
*/
public static function get_sender($courseid) {
global $DB;
$rolesql = "SELECT rc.roleid FROM {role_capabilities} rc
$rolesql = "SELECT rc.id, rc.roleid FROM {role_capabilities} rc
JOIN {capabilities} cap ON rc.capability = cap.name
JOIN {context} ctx on rc.contextid = ctx.id
WHERE rc.capability = :capability ";
Expand Down
2 changes: 1 addition & 1 deletion classes/task/update_completion.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public function mod_pulse_completion_crontask() {

pulse_mtrace('Fetching pulse instance list - MOD-Pulse INIT');

$rolesql = "SELECT rc.roleid FROM {role_capabilities} rc
$rolesql = "SELECT rc.id, rc.roleid FROM {role_capabilities} rc
JOIN {capabilities} cap ON rc.capability = cap.name
JOIN {context} ctx on rc.contextid = ctx.id
WHERE rc.capability = :capability ";
Expand Down

0 comments on commit 9ad00d6

Please sign in to comment.