Student ability to search with in the course content

Student ability to search with in the course content

by André Jacobs -
Number of replies: 2
Please provide me with some insight.

Is it possible for students to search within the course content?

The course is focused on employee training (customer care)

The goal is to put the students through the course but then allow them to search for specific topics/key words later while they are fulfilling their duties in the workplace. Therefore using the course as reference material.
Average of ratings: -
In reply to André Jacobs

Student ability to search with in the course content

by Joost Elshoff -
Picture of Particularly helpful Moodlers Picture of Testers
Hi André,

Have you considered implementing global search in your Moodle site? https://docs.moodle.org/39/en/Global_search
Average of ratings: Useful (1)
In reply to Joost Elshoff

Re: Student ability to search with in the course content

by Stefan Joller -

Hi André and Joost,

I do have a similar request: As André I want to provide a simple search-box for my students so they can search the course content.

Of course they could just use the global search in the menu bar on the top right and set the filter to the relevant course afterwards. But I'd rather provide a search-box with a predefined filter to the course where the search-box is placed (better UX).

What I have achieved so far is this: Placing a textfield with a search bar using the following HTML:

Search &nbsp;<a class="icon fa fa-question-circle text-info fa-fw" role="button" data-container="body" data-toggle="popover" data-placement="right" data-content="<div class=&quot;no-overflow&quot;>
<p>additional information if needed</p>
</div> " data-html="true" tabindex="0" data-trigger="focus" data-original-title="" title="">
</a>
<form class="search-input-form expanded" action="ourwebsite/search/index.php"><label for="id_q_5f3d1335b58a4" class="accesshide">Search</label><input type="text" name="q" placeholder="Search" size="13" tabindex="-1" id="id_q_5f3d1335b58a4" class="form-control">
    <input type="hidden" name="context" value="2"></form>


Problem: This code just redirects to the global search and does not display exclusively the content of a specific course...

Does anyone know how to add a filter in this HTML code so that only results from a specific course will be shown?