MDL-36283 use accesscontext when assigning cohort members

This commit is contained in:
Petr Škoda 2012-11-10 20:43:35 +01:00
parent ce44bf4441
commit de06ba901f

View file

@ -70,8 +70,8 @@ echo $OUTPUT->heading(get_string('assignto', 'cohort', format_string($cohort->na
echo $OUTPUT->notification(get_string('removeuserwarning', 'core_cohort')); echo $OUTPUT->notification(get_string('removeuserwarning', 'core_cohort'));
// Get the user_selector we will need. // Get the user_selector we will need.
$potentialuserselector = new cohort_candidate_selector('addselect', array('cohortid'=>$cohort->id)); $potentialuserselector = new cohort_candidate_selector('addselect', array('cohortid'=>$cohort->id, 'accesscontext'=>$context));
$existinguserselector = new cohort_existing_selector('removeselect', array('cohortid'=>$cohort->id)); $existinguserselector = new cohort_existing_selector('removeselect', array('cohortid'=>$cohort->id, 'accesscontext'=>$context));
// Process incoming user assignments to the cohort // Process incoming user assignments to the cohort