Permalink
Browse files

Moved the new functions added for Bug #4074 to datalib.php

  • Loading branch information...
1 parent f6dccf0 commit d3322e6d986b59447f4fcc086f076229a0d709df patrickslee committed Dec 13, 2005
Showing with 14 additions and 14 deletions.
  1. +0 −14 course/lib.php
  2. +14 −0 lib/datalib.php
View
@@ -1875,18 +1875,4 @@ function print_visible_setting($form, $course=NULL) {
echo '</td></tr>';
}
-function course_parent_visible($course = null) {
- return category_parent_visible($course->category);
-}
-
-function category_parent_visible($parent = 0) {
- while ($parent && ($category = get_record('course_categories', 'id', $parent))) {
- $parent = $category->parent;
- if (!$category->visible) {
- return false;
- }
- }
- return true;
-}
-
?>
View
@@ -3002,5 +3002,19 @@ function check_db_compat() {
return true;
}
+function course_parent_visible($course = null) {
+ return category_parent_visible($course->category);
+}
+
+function category_parent_visible($parent = 0) {
+ while ($parent && ($category = get_record('course_categories', 'id', $parent))) {
+ $parent = $category->parent;
+ if (!$category->visible) {
+ return false;
+ }
+ }
+ return true;
+}
+
// vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
?>

0 comments on commit d3322e6

Please sign in to comment.