How to get list activities avialable for one student

Re: How to get list activities avialable for one student

by Dominique Palumbo -
Number of replies: 1
Picture of Particularly helpful Moodlers Picture of Plugin developers
Hi aurélien,

you're near your goal : )
loop throught all these activities and use Availability API. (Display a list of users who may be able to access the current activity)

$info = new \core_availability\info_module($cm);
$filtered = $info->filter_user_list($users);

But
  • This does not currently include the $cm->visible setting, nor does it take into account the viewhiddenactivities setting.
Hope it's help.

Dominique.


In reply to Dominique Palumbo

Re: How to get list activities avialable for one student

by Aurélien Besson -

Thank you Dominique !!!

It works like a charm, for visibility settings i use a sql request.

I will share my plugin in couple of weeks.