Fixing query see BT#7386

1.9.x
Julio Montoya 11 years ago
parent 6e1449e0c0
commit 306350d710
  1. 7
      main/gradebook/lib/be/abstractlink.class.php

@ -256,7 +256,12 @@ abstract class AbstractLink implements GradebookItem
$this->add_linked_data(); $this->add_linked_data();
if (isset($this->type) && isset($this->ref_id) && isset($this->user_id) && isset($this->course_code) && isset($this->category) && isset($this->weight) && isset($this->visible)) { if (isset($this->type) && isset($this->ref_id) && isset($this->user_id) && isset($this->course_code) && isset($this->category) && isset($this->weight) && isset($this->visible)) {
$tbl_grade_links = Database :: get_main_table(TABLE_MAIN_GRADEBOOK_LINK); $tbl_grade_links = Database :: get_main_table(TABLE_MAIN_GRADEBOOK_LINK);
$sql = "SELECT count(*) FROM ".$tbl_grade_links." WHERE ref_id=".$this->get_ref_id()." AND category_id = ".$this->category." AND type = ".$this->type." "; $sql = "SELECT count(*) FROM ".$tbl_grade_links."
WHERE
ref_id=".$this->get_ref_id()." AND
category_id = ".$this->category." AND
course_code = '".$this->course_code."' AND
type = ".$this->type." ";
$result = Database::query($sql); $result = Database::query($sql);
$row_testing = Database::fetch_array($result); $row_testing = Database::fetch_array($result);

Loading…
Cancel
Save