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:
103 sites
17 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

  • MD shot of me from his iphone4
    Mon, 29 July 2013, 10:52 AM
    Thanks Hittesh, this works great!
  • Hittesh Ahuja
    Tue, 30 July 2013, 6:20 PM
    smile
  • Thomas Schoeftner
    Tue, 15 Oct 2013, 5:59 PM
    Just a quick question - will this block also work with version 2.4?
  • Hittesh Ahuja
    Tue, 15 Oct 2013, 10:32 PM
    @Thomas, yeah it should work with 2.4
  • Usman Asar
    Sun, 9 Feb 2014, 11:25 PM
    Lovely Plug-in Hittesh, Have waited for it for long to work with latest versions of Moodle.

    Few Things that I would really love to see added/changed.

    1: Search listings does include Course ID, where not everyone uses Course ID's because they are not required by Default, so if this can be changed with Short Course Name (required by default), as though one can copy the short course name in course ID without having any trouble, but if left blank, it shows blank round brackets, e.g: "() My Course" and that looks kinda weird.

    2: The Block Name "SEARCH COURSES (AUTOCOMPLETE)" is way too Long for it to adjust in a single line, if you can remove/delete the word "(AUTOCOMPLETE)", that would be lovely.

    3: I can see a useful check-box option of searching within My Courses, That seems applicable to a LMS where users are subjected to Log-In/Register so to search within there enrolled courses, but this check-box isn't useful where Guests are allowed (or site is fully opened to Guests), can there be added an option to Hide/Disable the option of this check-box?

    Thanks & Regards,
    Usman
  • Hittesh Ahuja
    Mon, 10 Feb 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.

    Regards,
    Hittesh Ahuja
  • Usman Asar
    Mon, 17 Feb 2014, 3:23 PM
    Many Thanks Hittesh, Much Appreciated.
  • Ravi Alamuri
    Mon, 17 Mar 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 http://www.yourmoodlesite.com/blocks/searchcourses/results.php?query= 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.

    Regards

    Ravi Alamuri

  • Hittesh Ahuja
    Tue, 8 Apr 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.

    Hittesh
  • Hittesh Ahuja
    Sun, 27 Apr 2014, 9:52 AM
    https://github.com/hitteshahuja/moodle-block_searchcourses/commit/42cf8fae7060937c831ffd67bd347cee889a2b26

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

    Hittesh
  • Hittesh Ahuja
    Sun, 27 Apr 2014, 10:04 AM
  • Yoann Saludes
    Mon, 1 Sept 2014, 5:13 PM
    An upgrade to 2.7 would be marvelous ! smile
Please login to post comments