Search Courses (Autocomplete)

Blocks ::: block_searchcourses
Maintained by Hittesh Ahuja
Just enter the first letter of the course you want to search and the auto complete box gives you a list of matching courses with the current word highlighted. The block also has a 'My Courses' feature, when enabled, lets you search only the courses the current user is registered on . This block is best used on the 'My Home' page which allows centre positioning of blocks thereby giving you a wider space to see the autocomplete results. Copyright : University of Bath
Latest release:
110 sites
16 downloads
19 fans
Current versions available: 3

Screenshots

Screenshot #0

Contributors

Hittesh Ahuja (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Comments

  • Usman Asar
    Fri, 26 Dec 2014, 3:31 AM
    +1 to Yoann's comments
  • Hittesh Ahuja
    Fri, 26 Dec 2014, 11:50 PM
    2.7 version now Available !! Happy Holidays everyone !
  • Usman Asar
    Sat, 27 Dec 2014, 5:11 AM
    Now I am thinking, if I could have wished for something else smile just kidding. many thanks for a very very quick turn around.
  • Narissa Tuawhiorangi
    Wed, 7 Jan 2015, 7:23 AM
    Great block but each time the Enter key is pressed (when using IE10 - our default browser) the next block is docked. This continues until there are no blocks left after the search block. Any suggestions on how to fix this?
  • Hittesh Ahuja
    Thu, 8 Jan 2015, 5:06 AM
    @Narissa Bayler
    I cant seem to replicate the error on IE11.. I'm afraid I dont have a copy of IE10 so cant really test . Would you mind sending me some screenshots of the error ?
  • Miiguel Navas
    Wed, 20 May 2015, 10:52 PM
    Hello, I´m a spanish student. first, I wuold like to thank you for your work, it´s very usefull plugin. I have a question for you. I´m a admid for a free moodle plattform. How do I activate this plugin in the main page for all user and outter personals pages.
    Thanks, sorry for my english.
  • Miiguel Navas
    Wed, 20 May 2015, 10:54 PM
    Sorry, other possibility is replace the normal search by this plugin
  • Hittesh Ahuja
    Wed, 20 May 2015, 10:59 PM
    @miguel Navas

    To make this plugin visible for all users logging in to your system, you can add the block to the front page by editing the front page settings under the Administration block and then clicking on turn editing on.

    I'm not sure what do you mean by normal search but my guess it you can replace this plugin with every search field on the moodle site. It has a specific use only for courses.
  • Sudan Maharjan
    Sun, 3 Apr 2016, 2:09 PM
    does this works with moodle version 3.0 + ???
  • Hittesh Ahuja
    Mon, 4 Apr 2016, 5:29 PM
    @Sujan, I dont see a reason why it shouldn't.. if something is missing dont hesitate to raise an issue on the github page and I'll look at it smile
  • abhishek bhattacharjee
    Wed, 4 May 2016, 4:43 PM
    i have customized the front page i want this search box on the front page how will i get it i mean its enable is there any code i need to add to the page its not showing up anywhere..
  • Lea Cohen
    Mon, 4 Jun 2018, 8:25 PM
    Thank you for a great plugin, we're very happy with it.
    There is one thing we would like, and that is - that hidden or non-active courses won't appear in the results.
    Is there a way to do that?
  • Hittesh Ahuja
    Tue, 5 Jun 2018, 4:11 AM
    Hi Lea, the plugin uses the enrol_get_my_courses() moodle function to fetch courses. If you look at https://github.com/moodle/moodle/blob/master/lib/enrollib.php#L727 you will see that the list of courses are not returned if the user does not have the capability to view hidden courses. So in short, only users who can see hidden courses would be able to see them in the results i.e students generally cannot unless you allow them to view hidden courses ( which I wouldnt recommend)
  • Lea Cohen
    Tue, 5 Jun 2018, 2:21 PM
    Thank you very much for pointing me in the right direction.
    I'm talking about the search done on all courses, not only on the ones the user is enrolled in, and that uses get_courses_search. But following your answer I checked that now , and I found that there, too, there is a check for viewing hidden courses https://github.com/moodle/moodle/blob/master/lib/datalib.php#L830. Before, I was only looking at the SQL query... So thank you.
  • Armaan khan
    Thu, 11 Jan 2024, 7:23 PM
    Hello @Hittesh
    I am using this plugin but I am facing the issue is that the search box is not showing to students role.
Please login to post comments