From: stronk7 Date: Tue, 25 Apr 2006 23:52:42 +0000 (+0000) Subject: Handle some debugs properly. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=d860c55c84a53aa20436342013c1c80b5114099b;p=moodle.git Handle some debugs properly. --- diff --git a/mod/resource/type/ims/deploy.php b/mod/resource/type/ims/deploy.php index 7f94afa0b6..d449c13f39 100644 --- a/mod/resource/type/ims/deploy.php +++ b/mod/resource/type/ims/deploy.php @@ -277,14 +277,14 @@ /// Get the default organization $default_organization = $data['@']['default']; - if ($CFG->debug) print_object('default_organization: '.$default_organization); + if ($CFG->debug > 7) print_object('default_organization: '.$default_organization); /// Iterate (reverse) over organizations until we find the default one if (empty($data['#']['organization'])) { /// Verify exists return false; } $count_organizations = count($data['#']['organization']); - if ($CFG->debug) print_object('count_organizations: '.$count_organizations); + if ($CFG->debug > 7) print_object('count_organizations: '.$count_organizations); $current_organization = $count_organizations - 1; while ($current_organization >= 0) { @@ -297,7 +297,7 @@ } /// At this point we MUST have the final organization - if ($CFG->debug) print_object('final organization: '.$organization['#']['title'][0]['#']); + if ($CFG->debug > 7) print_object('final organization: '.$organization['#']['title'][0]['#']); if (empty($organization)) { return false; //Error, no organization found } @@ -323,7 +323,7 @@ /// Iterate over items from start to end $count_items = count($items); - if ($CFG->debug) print_object('level '.$level.'-count_items: '.$count_items); + if ($CFG->debug > 7) print_object('level '.$level.'-count_items: '.$count_items); $current_item = 0; while ($current_item < $count_items) { @@ -341,7 +341,7 @@ !empty($obj_item->identifier)) { /// Add to itemmap $itemmap[$id] = $obj_item; - if ($CFG->debug) print_object('level '.$level.'-id '.$id.'-parent '.$parent.'-'.$obj_item->title); + if ($CFG->debug > 7) print_object('level '.$level.'-id '.$id.'-parent '.$parent.'-'.$obj_item->title); /// Counters go up $id++; /// Check for subitems recursively @@ -377,7 +377,7 @@ return false; } $count_resources = count($data); - if ($CFG->debug) print_object('count_resources: '.$count_resources); + if ($CFG->debug > 7) print_object('count_resources: '.$count_resources); $current_resource = 0; while ($current_resource < $count_resources) { @@ -423,4 +423,4 @@ return $resources; } -?> \ No newline at end of file +?>