Merge branch 'MDL-60880-master' of https://github.com/sammarshallou/moodle

This commit is contained in:
Damyon Wiese 2017-12-06 10:07:58 +08:00 committed by Jun Pataleta
commit 97812f14c1
14 changed files with 330 additions and 32 deletions

View file

@ -3259,6 +3259,10 @@ EOD;
$contents = html_writer::tag('label', get_string('enteryoursearchquery', 'search'),
array('for' => 'id_q_' . $id, 'class' => 'accesshide')) . html_writer::tag('input', '', $inputattrs);
if ($this->page->context && $this->page->context->contextlevel !== CONTEXT_SYSTEM) {
$contents .= html_writer::empty_tag('input', ['type' => 'hidden',
'name' => 'context', 'value' => $this->page->context->id]);
}
$searchinput = html_writer::tag('form', $contents, $formattrs);
return html_writer::tag('div', $searchicon . $searchinput, array('class' => 'search-input-wrapper nav-link', 'id' => $id));