Fixed a some debugging statements

This commit is contained in:
moodler
2006-09-18 13:24:45 +00:00
parent e51e3fcb34
commit 0e1cc9070b
17 changed files with 23 additions and 40 deletions
+5 -9
View File
@@ -1385,9 +1385,7 @@
$grade_item->module_name = $rec_module->name;
$inc_grade_items[] = $grade_item;
} else {
if ($CFG->debug > 7) {
echo "skipping $grade_item->modid"."-"."$rec_module->name<br />";
}
debugging("skipping $grade_item->modid"."-"."$rec_module->name<br />");
}
}
}
@@ -1443,9 +1441,7 @@
//Add it
$inc_grade_exceptions[] = $grade_exception;
} else {
if ($CFG->debug > 7) {
echo "skipping $grade_exception->userid"."-user<br />";
}
debugging("skipping $grade_exception->userid"."-user<br />");
}
}
}
@@ -1729,9 +1725,9 @@
}
}
if ($result != $content && $CFG->debug>7) { //Debug
echo '<br /><hr />'.s($content).'<br />changed to<br />'.s($result).'<hr /><br />'; //Debug
} //Debug
if ($result != $content) {
debugging('<br /><hr />'.s($content).'<br />changed to<br />'.s($result).'<hr /><br />');
}
return $result;
}
+1 -1
View File
@@ -2287,7 +2287,7 @@
$result = str_replace($search,$replace,$content);
if ($result != $content && $CFG->debug>7) { //Debug
if ($result != $content && debugging()) { //Debug
if (!defined('RESTORE_SILENTLY')) {
echo '<br /><hr />'.s($content).'<br />changed to<br />'.s($result).'<hr /><br />'; //Debug
}
+2 -2
View File
@@ -180,7 +180,7 @@
ob_end_clean();
if ($rss === false) {
if ($CFG->debug && !empty($rsserror)) {
if (debugging() && !empty($rsserror)) {
// There was a failure in loading the rss feed, print link to full error text
return '<a href="'. $CFG->wwwroot .'/blocks/rss_client/block_rss_client_error.php?error='. urlencode($rsserror) .'">Error loading a feed.</a><br />'; //Daryl Hawes note: localize this line
}
@@ -274,4 +274,4 @@
}
}
}
?>
?>
@@ -114,7 +114,7 @@ if ($act == 'updfeed') {
$message = '';
ob_start();
$rss = fetch_rss($url);
if ($CFG->debug) {
if (debugging()) {
$message .= ob_get_contents();
}
ob_end_clean();
@@ -181,7 +181,7 @@ if ($act == 'updfeed') {
$message = '';
ob_start();
$rss = fetch_rss($url);
if ($CFG->debug) {
if (debugging()) {
$message .= ob_get_contents();
}
ob_end_clean();
@@ -288,4 +288,4 @@ if ($act == 'updfeed') {
rss_print_form($act, $url, $rssid, $preferredtitle, $shared, $id, $context);
}
print_footer();
?>
?>
+1 -3
View File
@@ -53,9 +53,7 @@
global $CFG, $SITE;
if (empty($CFG->enablerssfeeds)) {
if ($CFG->debug > 7) {
notify('Sorry, RSS feeds are disabled on this site');
}
debugging('Sorry, RSS feeds are disabled on this site');
return '';
}
+1 -1
View File
@@ -73,7 +73,7 @@
'ajaxcourse_blocks','ajaxcourse_sections','ajaxcourse_topic'));
//javascript logging facilities
if ($CFG->debug > 7) {
if (debugging()) {
print_require_js(Array('yui_logger'));
}
}
+1 -1
View File
@@ -14,7 +14,7 @@
require_once($CFG->dirroot . "/enrol/" . $CFG->enrol . "/enrol.php");
// ensure errors are well explained
$CFG->debug=10;
$CFG->debug=E_ALL;
// update enrolments -- these handlers should autocreate courses if required
$enrol = new enrolment_plugin();
$enrol->sync_enrolments('student', true);
+2 -1
View File
@@ -14,7 +14,8 @@
require_once($CFG->dirroot . "/enrol/ldap/enrol.php");
// ensure errors are well explained
$CFG->debug=10;
$CFG->debug = E_NOTICE;
// update enrolments -- these handlers should autocreate courses if required
$enrol = new enrolment_plugin_ldap();
$enrol->enrol_ldap_connect();
+1 -1
View File
@@ -73,7 +73,7 @@
break;
default: /// Nothing was found, so tell them how to fix it.
if ($CFG->debug > 7) {
if (debugging()) {
echo "Make sure you have an appropriate MimeTeX binary here:\n\n";
echo " $CFG->dirroot/$CFG->texfilterdir/mimetex\n\n";
echo "and that it has the right permissions set on it as executable program.\n\n";
+1 -1
View File
@@ -91,7 +91,7 @@
break;
default: /// Nothing was found, so tell them how to fix it.
if ($CFG->debug > 7) {
if (debugging()) {
echo "Make sure you have an appropriate MimeTeX binary here:\n\n";
echo " $CFG->dirroot/$CFG->texfilterdir/mimetex\n\n";
echo "and that it has the right permissions set on it as executable program.\n\n";
-6
View File
@@ -3,12 +3,6 @@
include("plotconf.inc");
include("plot.inc");
if($CFG->debug > 1) {
error_reporting(E_ALL);
} else {
error_reporting(E_ERROR);
}
if (isset($HTTP_GET_VARS["lastquery"])){
$HTTP_GET_VARS["lastquery"] = clean_param($HTTP_GET_VARS["lastquery"], PARAM_HOST);
}
-6
View File
@@ -11,12 +11,6 @@ if (isset($user)) {
$username = "";
}
if ($CFG->debug > 1) {
error_reporting(E_ALL);
} else {
error_reporting(E_ERROR);
}
// cleanup
if (isset($HTTP_GET_VARS["lastquery"])) {
$HTTP_GET_VARS["lastquery"] = clean_param($HTTP_GET_VARS["lastquery"], PARAM_HOST);
+1 -1
View File
@@ -119,7 +119,7 @@ function question_rqp_print_serverinfo($serverinfo) {
function question_rqp_debug_soap($item) {
global $CFG;
if ($CFG->debug) {
if (debugging()) {
echo 'Here is the dump of the soap fault:<pre>';
var_dump($item);
echo '<pre>';
+1 -1
View File
@@ -25,7 +25,7 @@
echo $performanceinfo;
} ?>
</div>
<?php if ($CFG->debug > 7) {
<?php if (debugging()) {
?>
<br />
<hr size="1" noshade="noshade" />
+1 -1
View File
@@ -13,7 +13,7 @@
echo '</p>';
?>
<?php if ($CFG->debug > 7) {
<?php if (debugging()) {
echo $performanceinfo;
?>
<hr size="1" noshade="noshade" />
+1 -1
View File
@@ -25,7 +25,7 @@
echo $performanceinfo;
} ?>
<?php if ($CFG->debug > 7) {
<?php if (debugging()) {
?>
<br />
<hr size="1" noshade="noshade" />
+1 -1
View File
@@ -23,7 +23,7 @@
echo $performanceinfo;
} ?>
<?php if ($CFG->debug > 7) {
<?php if (debugging()) {
?>
<br />
<hr size="1" noshade="noshade" />