Skip to content

Commit

Permalink
Merge pull request #138 from joshwillcock/issue#137
Browse files Browse the repository at this point in the history
#137 Plugin setting session_roles in plugin namespace not being used.
  • Loading branch information
danmarsden authored Feb 15, 2024
2 parents fd8ed62 + 75a4f07 commit 1278894
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -3871,15 +3871,16 @@ function facetoface_update_trainers($sessionid, $form) {
* @return array
*/
function facetoface_get_trainer_roles() {
global $CFG, $DB;
global $DB;

// Check that roles have been selected.
if (empty($CFG->facetoface_session_roles)) {
$config = get_config('facetoface');
if (empty($config->session_roles)) {
return false;
}

// Parse roles.
$cleanroles = clean_param($CFG->facetoface_session_roles, PARAM_SEQUENCE);
$cleanroles = clean_param($config->session_roles, PARAM_SEQUENCE);
$roles = explode(',', $cleanroles);
list($rolesql, $params) = $DB->get_in_or_equal($roles);

Expand Down

0 comments on commit 1278894

Please sign in to comment.