Option 1-
"Show students with attempts only" mean that you will not see students that din't yet attempted this quiz but are enrolled in that course (the query contains
AND qa.userid IS NOT NULL so to make the left join ask for only records where the right is not null)
Option 2-
"Show students with no attempts only" mean that you will only see students that are enrolled in that course but didn't attempted this quiz (useful for instance to remember them to attempt it before closing date and time) (the query contains
AND qa.userid IS NULL so to make the left join ask for only records where the right is null)
Option 3-
"Show all students" mean that you will get a list of all students in the course with all their attempts so we can say that option 3 is Option 1 + Option 2 (the query is exactly the same minus the condition on qa.userid so that we get all records)
Option 4-
"Show all attempts" is not very clear to me and looking at the
sql query in the code doesn't help a lot. I will try to provide a clear answer after some tests.
If I remember well it has something to do with "unenrolled students" ??
Also the sql queries have been changed to improve performances on very big Moodle sites so please report in the bug tracker if you don't get what you expected