Minor - removing var_dumps.

1.9.x
Julio Montoya 11 years ago
parent 75d0c15812
commit 0503684637
  1. 13
      main/inc/lib/chat.lib.php
  2. 25
      main/inc/lib/document.lib.php
  3. 5
      main/inc/lib/formvalidator/Element/style_button.php
  4. 4
      main/inc/lib/skill.lib.php
  5. 13
      main/inc/lib/tracking.lib.php

@ -134,16 +134,6 @@ class Chat extends Model
}
}
}
//print_r($_SESSION['chatHistory']);
/*
var_dump($_SESSION['openChatBoxes']);
var_dump($_SESSION['tsChatBoxes']);
var_dump($_SESSION['chatHistory']);
var_dump($items);
*/
//print_r($_SESSION['chatHistory']);
$sql = "UPDATE ".$this->table." SET recd = 1 WHERE to_user = '".$to_user_id."' AND recd = 0";
Database::query($sql);
@ -152,6 +142,7 @@ class Chat extends Model
}
echo json_encode(array('items' => $items));
}
/*
* Returns an array of messages inside a chat session with a specific user
* @param int The ID of the user with whom the current user is chatting
@ -266,4 +257,4 @@ class Chat extends Model
}
return false;
}
}
}

@ -1447,7 +1447,6 @@ class DocumentManager
}
if (isset($item_info_in_session['visibility'])) {
//if ($doc_id == 85) { var_dump($item_info_in_session);}
if ($item_info_in_session['visibility'] == 1) {
return true;
}
@ -2258,38 +2257,26 @@ class DocumentManager
} else {
$destination = $destiny_path . '/' . $file_name;
}
//var_dump("From $original ", "to $destination");
$original_count = count(explode('/', $original));
$destination_count = count(explode('/', $destination));
if ($original_count == $destination_count) {
//Nothing to change
return true;
}
$mode = '';
if ($original_count > $destination_count) {
$mode = 'outside';
} else {
$mode = 'inside';
}
//echo $original_count.' '.$destination_count; var_dump($mode);
//We do not select the $original_path becayse the file was already moved
$content_html = file_get_contents($destiny_path . '/' . $file_name);
$destination_file = $destiny_path . '/' . $file_name;
$pre_original = strstr($original_path, 'document');
$pre_destin = strstr($destiny_path, 'document');
//var_dump ("pre_original $pre_original");
//var_dump ("pre_destin $pre_destin");
$pre_original = substr($pre_original, 8, strlen($pre_original));
$pre_destin = substr($pre_destin, 8, strlen($pre_destin));
//var_dump ("pre_original $pre_original");
//var_dump ("pre_destin $pre_destin");
$levels = count(explode('/', $pre_destin)) - 1;
$link_to_add = '';
for ($i = 1; $i <= $levels; $i++) {
@ -2312,11 +2299,7 @@ class DocumentManager
$pre_destin = '..' . $pre_destin . '/';
}
//var_dump($pre_original);
$levels = explode('/', $pre_original);
//var_dump($levels);
$count_pre_destination_levels = 0;
foreach ($levels as $item) {
if (!empty($item) && $item != '..') {
@ -3208,9 +3191,7 @@ class DocumentManager
}
$course_info = api_get_course_info($course_code);
if ($document_data['parent_id'] == false || empty($document_data['parent_id'])) {
$visible = self::is_visible_by_id($doc_id, $course_info, $session_id, $user_id);
var_dump($doc_id, $visible);
return $visible;
} else {
$visible = self::is_visible_by_id($doc_id, $course_info, $session_id, $user_id);
@ -3218,12 +3199,6 @@ class DocumentManager
if (!$visible) {
return false;
} else {
echo '<pre>';
echo 'parent';
var_dump($document_data);
var_dump($document_data['parent_id']);
echo '</pre>';
return self::check_visibility_tree($document_data['parent_id'], $course_code, $session_id, $user_id);
}
}

@ -165,11 +165,10 @@ class HTML_QuickForm_stylebutton extends HTML_QuickForm_element
if ($this->_flagFrozen) {
return $this->getFrozenHtml();
} else {
//Adding the btn class
//Adding the btn class
if (isset($this->_attributes['class'])) {
$this->_attributes['class'] = 'btn '.$this->_attributes['class'];
}
//var_dump($this->getName());
return $this->_getTabs().'<button ' . $this->_getAttrString($this->_attributes) . ' >'.$this->getValue() .'</button>';
}
} //end func toHtml
@ -222,4 +221,4 @@ class HTML_QuickForm_stylebutton extends HTML_QuickForm_element
return parent::exportValue($submitValues, $assoc);
}
}
} // end class HTML_QuickForm_element
} // end class HTML_QuickForm_element

@ -675,8 +675,6 @@ class Skill extends Model
$original_skill = $skills;
//var_dump($skills);
//Show 1 item
if (!empty($skill_id)) {
if ($add_root) {
@ -944,4 +942,4 @@ class Skill extends Model
}
return false;
}
}
}

@ -828,7 +828,6 @@ class Tracking
if ($debug) echo '<h3>Item Type: ' .$row_max_score['item_type'].'</h3>';
if ($row_max_score['item_type'] == 'sco') {
//var_dump($row_max_score);
// Check if it is sco (easier to get max_score)
//when there's no max score, we assume 100 as the max score, as the SCORM 1.2 says that the value should always be between 0 and 100.
if ($max_score == 0 || is_null($max_score) || $max_score == '') {
@ -910,7 +909,6 @@ class Tracking
if ($debug) echo '<h3>$count_items '.$count_items.'</h3>';
if ($debug) echo '<h3>$score_of_scorm_calculate '.$score_of_scorm_calculate.'</h3>';
// var_dump($score_of_scorm_calculate);
$global_result += $score_of_scorm_calculate;
if ($debug) echo '<h3>$global_result '.$global_result.'</h3>';
} // end while
@ -2554,7 +2552,6 @@ class Tracking
$my_results_final[] = $my_results[$key];
$final_all_exercise_graph_list[] = $all_exercise_graph_list[$key];
}
//var_dump($final_all_exercise_graph_name_list, $final_all_user_results, $final_all_exercise_graph_list);
$main_session_graph = self::generate_session_exercise_graph($final_all_exercise_graph_name_list, $my_results_final, $final_all_exercise_graph_list);
}
//}
@ -3088,8 +3085,6 @@ class Tracking
$my_exercise_result = $my_exercise_result_array[0] *100;
}
//var_dump($exercise_result, $my_exercise_result);
$max = 100;
$pieces = 5 ;
$part = round($max / $pieces);
@ -3124,19 +3119,13 @@ class Tracking
}
}
//var_dump($my_final_array, $final_array); exit;
//Fix to remove the data of the user with my data
for($i = 0; $i<=count($my_final_array); $i++) {
if (!empty($my_final_array[$i])) {
$my_final_array[$i] = $final_array[$i] + 1; //Add my result
$final_array[$i] = 0;
}
}
//var_dump($my_final_array, $final_array); echo '<br />';
//echo '<pre>'; var_dump($my_exercise_result, $exercise_result,$x_axis);
$cache = new pCache();
@ -3219,8 +3208,6 @@ class Tracking
$my_exercise_result = $my_exercise_result_array[0] *100;
}
//var_dump($exercise_result, $my_exercise_result);
$max = 100;
$pieces = 5 ;
$part = round($max / $pieces);

Loading…
Cancel
Save