marxjohnson / moodle-block_quickfindlist

Moodle block providing a quick method of searching users
http://moodle.org/mod/data/view.php?d=13&rid=2200
6 stars 15 forks source link

Error when clicking on a student not enrolled in current course. #26

Open davidpesce opened 5 years ago

davidpesce commented 5 years ago

I think it'd be better to redirect them to the site-wide profile (rather than course profile). Thoughts?

marxjohnson commented 5 years ago

So this is a case where you've not configured a role or a custom URL, and you're using the block from inside a course, it will still return users who aren't enrolled on that course?

I'd be a bit concerned that having different behaviour for different users might be a cause for confusion. It's probably not obvious why clicking on one user would keep you in the course context while another would take you to the system context. I'd say either everyone's links should go to the site-wide profile by default, or it shouldn't return users from outside the course when you're using the block within a course.

davidpesce commented 5 years ago

My thought was that everyone would get redirected to the site-wide profile. Would there be a reason not to?

davidpesce commented 5 years ago

Where is the config->url set? There aren't config settings for the block (that I'm seeing)... https://github.com/marxjohnson/moodle-block_quickfindlist/blob/305e8b2a84281c820357a83abd29822f9e694d50/block_quickfindlist.php#L108-L112

davidpesce commented 5 years ago

Now there's an interesting thought. What if we made this an admin setting?

marxjohnson commented 5 years ago

Where is the config->url set? There aren't config settings for the block (that I'm seeing)...

It should be a per-instance config setting, on the same form that controls where the block appears etc.