Blocks: Search Courses (Autocomplete)

block_searchcourses
Maintained by Picture of Hittesh Ahuja 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
91 sites
25 downloads
10 fans

Screenshots

Screenshot #0

Contributors

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

Comments RSS

Show comments
  • Picture of Yoann Saludes
    Mon, 1 Sep 2014, 5:13 PM
    An upgrade to 2.7 would be marvelous ! smile
  • Picture of Usman Asar
    Fri, 26 Dec 2014, 3:31 AM
    +1 to Yoann's comments
  • Picture of Hittesh Ahuja
    Fri, 26 Dec 2014, 11:50 PM
    2.7 version now Available !! Happy Holidays everyone !
  • Picture of 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.
  • Picture of 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?
  • Picture of 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 ?
  • Picture of 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.
  • Picture of Miiguel Navas
    Wed, 20 May 2015, 10:54 PM
    Sorry, other possibility is replace the normal search by this plugin
  • Picture of 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.
  • Picture of Sudan Maharjan
    Sun, 3 Apr 2016, 2:09 PM
    does this works with moodle version 3.0 + ???
  • Picture of 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
  • Picture of 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..
  • Picture of 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?
  • Picture of 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)
  • Picture of 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.
1 2
Please login to post comments