Lesterhuis-Training-en-Consultancy / moodle-block_quickcourselist

This block allows quick searching of Moodle courses, and displays a link to the course page.
0 stars 0 forks source link

Issue with Accented Characters in Course Search (block_quickcourselist) #9

Open gjalam opened 2 months ago

gjalam commented 2 months ago

Hello,

I am the Moodle 4.4 administrator at a higher education institution, and I use your plugin block_quickcourselist to help users search for courses.

However, I have encountered two issues:

  1. Searching for a course without accented characters, such as "economie," does not return courses that contain the word "économie" with an accent. After checking, the database is configured with the utf8mb4_general_ci collation, and all the tables are correctly set up with this collation.

  2. I noticed that courses hidden by teachers do not appear in their search results when using the plugin, while, as an admin, I can see these hidden courses in my search results. Is this expected behavior? Is there a way to make hidden courses searchable for the teachers who own them?

Could these issues be related to how the plugin handles search queries or user permissions? Is there an option or configuration to address these behaviors?

Thank you in advance for your help, and I appreciate your work on this useful plugin.

Best regards,
Gabriel

gemguardian commented 1 month ago

@gjalam as for

  1. @luukverhoeven I think this needs to be resolved in the code right?
  2. Have you checked of Teacher have the capability to see hidden courses? (moodle/course:viewhiddencourses) By default they should but if this has been changed this could be the reason. Or else it will need a code change.

Gemma

luukverhoeven commented 1 month ago

@gemguardian

  1. This code needs to be modified to make the search less strict. The estimated time for this task is 1 hour.
  2. In this section of the code (https://github.com/Lesterhuis-Training-en-Consultancy/moodle-block_quickcourselist/blob/master/block_quickcourselist.php#L270), we check based on the specified capability.
gemguardian commented 1 month ago

@gjalam

As for

  1. If you are ok for funding the 1 hour development work , please let me know -then we will address this issue from our point of view for M4.5 and M4.4 ór you make the change yourself in the code and we would be greatfully accept the push.

  2. As Luuk points out we check on specified moodle/course:viewhiddencourses capability, please check of the teacher have this capability.

Gemma