mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Course category listings now have a search box in the navbar for students
and non-users
This commit is contained in:
parent
ee44a11f06
commit
98e9a035d7
2 changed files with 4 additions and 5 deletions
|
@ -27,13 +27,13 @@
|
||||||
$USER->editing = false;
|
$USER->editing = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$updatebutton = update_category_button($category->id);
|
$navbaritem = update_category_button($category->id);
|
||||||
|
|
||||||
$creatorediting = !empty($USER->editing);
|
$creatorediting = !empty($USER->editing);
|
||||||
$adminediting = (isadmin() and $creatorediting);
|
$adminediting = (isadmin() and $creatorediting);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$updatebutton = "";
|
$navbaritem = print_course_search("", true, "navbar");
|
||||||
$adminediting = false;
|
$adminediting = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,11 +72,11 @@
|
||||||
"", "", true, $updatebutton);
|
"", "", true, $updatebutton);
|
||||||
} else {
|
} else {
|
||||||
print_header("$site->shortname: $category->name", "$site->fullname",
|
print_header("$site->shortname: $category->name", "$site->fullname",
|
||||||
"<a href=\"index.php\">$strcourses</a> -> $category->name", "", "", true, $updatebutton);
|
"<a href=\"index.php\">$strcourses</a> -> $category->name", "", "", true, $navbaritem);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
print_header("$site->shortname: $category->name", "$site->fullname",
|
print_header("$site->shortname: $category->name", "$site->fullname",
|
||||||
"<a href=\"index.php\">$strcourses</a> -> $category->name", "", "", true, $updatebutton);
|
"<a href=\"index.php\">$strcourses</a> -> $category->name", "", "", true, $navbaritem);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1147,7 +1147,6 @@ function print_course_search($value="", $return=false, $format="plain") {
|
||||||
$output .= "<form name=\"coursesearch\" action=\"$CFG->wwwroot/course/search.php\" method=\"get\">";
|
$output .= "<form name=\"coursesearch\" action=\"$CFG->wwwroot/course/search.php\" method=\"get\">";
|
||||||
$output .= "<input type=\"text\" size=20 name=\"search\" value=\"$value\">";
|
$output .= "<input type=\"text\" size=20 name=\"search\" value=\"$value\">";
|
||||||
$output .= "<input type=\"submit\" value=\"$strsearchcourses\">";
|
$output .= "<input type=\"submit\" value=\"$strsearchcourses\">";
|
||||||
$output .= "<input name=id type=hidden value=\"$course->id\">";
|
|
||||||
$output .= "</form>";
|
$output .= "</form>";
|
||||||
$output .= "</td></tr></table>";
|
$output .= "</td></tr></table>";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue