Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-37009 function print_course_search() is moved to deprecatedlib.php

  • Loading branch information...
commit a8d683ca8e886bc1c76fb87a4a2a78132d81f895 1 parent f4b571a
Marina Glancy marinaglancy authored
Showing with 25 additions and 12 deletions.
  1. +0 −12 course/lib.php
  2. +25 −0 lib/deprecatedlib.php
12 course/lib.php
View
@@ -1767,18 +1767,6 @@ function print_my_moodle() {
}
}
-
-function print_course_search($value="", $return=false, $format="plain") {
- global $PAGE;
- debugging('Function print_course_search() is deprecated, please use course renderer', DEBUG_DEVELOPER);
- $renderer = $PAGE->get_renderer('core', 'course');
- if ($return) {
- return $renderer->course_search_form($value, $format);
- } else {
- echo $renderer->course_search_form($value, $format);
- }
-}
-
function print_remote_course($course, $width="100%") {
global $CFG, $USER;
25 lib/deprecatedlib.php
View
@@ -3922,3 +3922,28 @@ function get_categories($parent='none', $sort=NULL, $shallow=true) {
$rs->close();
return $categories;
}
+
+/**
+* Displays a course search form
+*
+* This function is deprecated, please use course renderer:
+* $renderer = $PAGE->get_renderer('core', 'course');
+* echo $renderer->course_search_form($value, $format);
+*
+* @deprecated since 2.5
+*
+* @param string $value default value to populate the search field
+* @param bool $return if true returns the value, if false - outputs
+* @param string $format display format - 'plain' (default), 'short' or 'navbar'
+* @return null|string
+*/
+function print_course_search($value="", $return=false, $format="plain") {
+ global $PAGE;
+ debugging('Function print_course_search() is deprecated, please use course renderer', DEBUG_DEVELOPER);
+ $renderer = $PAGE->get_renderer('core', 'course');
+ if ($return) {
+ return $renderer->course_search_form($value, $format);
+ } else {
+ echo $renderer->course_search_form($value, $format);
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.