I'm having a problem here which i'm not sure if it is more PHP or Moodle related. I have a csv with usernames and emails and I would like to crosscheck these usernames with the students' usernames that are registered on a Moodle course. If those on Moodle are not present in the csv, I would like to define them a Quit status. This is particulary useful where Moodle is interacting with an outside management academic platform.
This method lists me all students of a course
[m.menas] => stdClass Object
[username] => m.menas
[m.bexiga] => stdClass Object
[username] => m.bexiga
[spm] => stdClass Object
[username] => spm
My first thought was to call array_diff function but that isn't working. I've had data( which is the position of the usernames) but that expects an array parameter. As it is now, the condition is never checked.
My goal is to make these usernames show on my table box, as in my picture.