Get students on activity

Re: Get students on activity

by Conn Warwicker -
Number of replies: 0
Picture of Core developers Picture of Plugin developers

I think I might have potentially find out how to do it, though I haven't fully tested it with other activities yet:


                            $modinfo = \get_fast_modinfo($course);

                            $cm = $modinfo->get_cm($courseModule->id);

                            $info = new \core_availability\info_module($cm);

                            $users = $info->filter_user_list( $students );