Your Moodle version

Blocks: Search Courses (Autocomplete)

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


Screenshot #0


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 Hittesh Ahuja
    Mon, Feb 10, 2014, 4:57 PM
    Hi Usman,
    Many thanks for your comments.
    I have changed the code on my GitHub so that it displays the course shortname in the brackets instead of the courseid number. Regarding (2), I am trying to not to confuse the block with any core blocks that moodle would have,hence the additional 'AutoComplete' for now. I am working on (3) at the moment.
    Keep an eye on the github repository as its easier for me to update that than to upload the zip again.

    Hittesh Ahuja
  • Picture of Usman Asar
    Mon, Feb 17, 2014, 3:23 PM
    Many Thanks Hittesh, Much Appreciated.
  • Picture of Ravi Alamuri
    Mon, Mar 17, 2014, 7:29 PM
    Hello Hittesh,

    Many thanks for the excellent block. We are using it quite successfully in our moodle instance. We did make a few changes to our version of the block however. We noticed that anyone could in theory access and get a list of the courses on the site even without being logged in. So we added a isloggedin check to ensure that the user is logged in. It still does not prevent direct access to the script but at least it ensures that the user is logged in (in which case he has access to the courses list anyway).

    We also noticed that checking the "My Courses" checkbox on Moodle 2.6 does not return any results. We figured this is because the enrol_get_my_courses function no longer likes modinfo as a valid field. Since we were not displaying this info anyway, we simply removed it from the list of fields and this seems to have the functionality restored as expected.

    Once again, thank you for the excellent plugin. Hope the above info helps someone.


    Ravi Alamuri

  • Picture of Hittesh Ahuja
    Tue, Apr 8, 2014, 4:33 AM
    interesting find on the results.php page, I shall update that so you only get the results when you are logged in. I shall dig deeper in the 'my courses' link so see what i can do to fix it.

    thanks for the contribution.

  • Picture of Hittesh Ahuja
    Sun, Apr 27, 2014, 9:52 AM

    Block updated on GitHub so the result.php redirects to the login page for unauthorised access.

  • Picture of Hittesh Ahuja
    Sun, Apr 27, 2014, 10:04 AM
  • Picture of Yoann Saludes
    Mon, Sep 1, 2014, 5:13 PM
    An upgrade to 2.7 would be marvelous ! smile
  • Picture of Usman Asar
    Fri, Dec 26, 2014, 3:31 AM
    +1 to Yoann's comments
  • Picture of Hittesh Ahuja
    Fri, Dec 26, 2014, 11:50 PM
    2.7 version now Available !! Happy Holidays everyone !
  • Picture of Usman Asar
    Sat, Dec 27, 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 Bayler
    Wed, Jan 7, 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, Jan 8, 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 miguel Navas
    Wed, May 20, 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 miguel Navas
    Wed, May 20, 2015, 10:54 PM
    Sorry, other possibility is replace the normal search by this plugin
  • Picture of Hittesh Ahuja
    Wed, May 20, 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.
1 2
Please login to post comments