mirror of
https://github.com/moodle/moodle.git
synced 2025-02-13 12:34:28 +01:00
Add link for advanced searching
This commit is contained in:
parent
cb9ef4a06d
commit
10b9a26a20
@ -4,6 +4,7 @@
|
||||
|
||||
$string['addanewdiscussion'] = 'Add a new discussion topic';
|
||||
$string['addanewtopic'] = 'Add a new topic';
|
||||
$string['advancedsearch'] = 'Advanced search';
|
||||
$string['allforums'] = 'All forums';
|
||||
$string['allowchoice'] = 'Allow everyone to choose';
|
||||
$string['allowdiscussions'] = 'Can a $a post to this forum?';
|
||||
|
@ -7,6 +7,7 @@
|
||||
$search = trim(optional_param('search', '', PARAM_NOTAGS)); // search string
|
||||
$page = optional_param('page', 0, PARAM_INT); // which page to show
|
||||
$perpage = optional_param('perpage', 20, PARAM_INT); // which page to show
|
||||
$showform = optional_param('showform', 0, PARAM_INT); // Just show the form
|
||||
|
||||
$user = trim(optional_param('user', '', PARAM_NOTAGS)); // Names to search for
|
||||
$userid = trim(optional_param('userid', 0, PARAM_INT)); // UserID to search for
|
||||
@ -96,7 +97,7 @@
|
||||
$strsearchresults = get_string("searchresults", "forum");
|
||||
$strpage = get_string("page");
|
||||
|
||||
if (!$search) {
|
||||
if (!$search || $showform) {
|
||||
print_header_simple("$strsearch", "",
|
||||
"<a href=\"index.php?id=$course->id\">$strforums</a> -> $strsearch", 'search.words',
|
||||
"", "", " ", navmenu($course));
|
||||
@ -142,6 +143,22 @@
|
||||
<a href=\"search.php?id=$course->id\">$strsearch</a> -> ".s($search), '',
|
||||
"", "", $searchform, navmenu($course));
|
||||
|
||||
echo '<div class="reportlink">';
|
||||
echo '<a href="search.php?id='.$course->id.
|
||||
'&user='.urlencode($user).
|
||||
'&userid='.$userid.
|
||||
'&forumid='.$forumid.
|
||||
'&subject='.urlencode($subject).
|
||||
'&phrase='.urlencode($phrase).
|
||||
'&words='.urlencode($words).
|
||||
'&fullwords='.urlencode($fullwords).
|
||||
'&notwords='.urlencode($notwords).
|
||||
'&dateto='.$dateto.
|
||||
'&datefrom='.$datefrom.
|
||||
'&showform=1'.
|
||||
'">'.get_string('advancedsearch','forum').'...</a>';
|
||||
echo '</div>';
|
||||
|
||||
print_heading("$strsearchresults: $totalcount");
|
||||
|
||||
print_paging_bar($totalcount, $page, $perpage, "search.php?search=$search&id=$course->id&perpage=$perpage&");
|
||||
|
Loading…
x
Reference in New Issue
Block a user