Student ability to search with in the course content

Re: Student ability to search with in the course content

by Stefan Joller -
Number of replies: 0

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?