Minor cosmetic changes + avoid warning PHP message

skala
Julio Montoya 14 years ago
parent 8ede09f2f9
commit 59e5ceaab6
  1. 3
      plugin/dashboard/block_session/block_session.class.php
  2. 11
      plugin/dashboard/block_student/block_student.class.php
  3. 3
      plugin/dashboard/block_student_graph/block_student_graph.class.php
  4. 4
      plugin/dashboard/block_teacher/block_teacher.class.php
  5. 4
      plugin/dashboard/block_teacher_graph/block_teacher_graph.class.php

@ -155,5 +155,4 @@ class BlockSession extends Block {
return count($this->sessions); return count($this->sessions);
} }
} }
?>

@ -212,12 +212,12 @@ class BlockStudent extends Block {
$course_code = $course['code']; $course_code = $course['code'];
$cats = Category::load(null, null, $course_code, null, null, null, false); $cats = Category::load(null, null, $course_code, null, null, null, false);
$scoretotal = array(); $scoretotal = array();
if (isset($cats)) { if (isset($cats) && isset($cats[0])) {
$scoretotal= $cats[0]->calc_score($student_id, $course_code); $scoretotal= $cats[0]->calc_score($student_id, $course_code);
} }
if (!empty($scoretotal)) { if (!empty($scoretotal)) {
$score += $scoretotal[0]; $score += $scoretotal[0];
$weight += $scoretotal[1]; $weight += $scoretotal[1];
} }
} }
@ -256,8 +256,5 @@ class BlockStudent extends Block {
*/ */
function get_number_of_students() { function get_number_of_students() {
return count($this->students); return count($this->students);
} }
}
}
?>

@ -210,5 +210,4 @@ class BlockStudentGraph extends Block {
function get_number_of_students() { function get_number_of_students() {
return count($this->students); return count($this->students);
} }
} }
?>

@ -215,6 +215,4 @@ class BlockTeacher extends Block {
return count($this->teachers); return count($this->teachers);
} }
} }
?>

@ -197,6 +197,4 @@ class BlockTeacherGraph extends Block {
return count($this->teachers); return count($this->teachers);
} }
} }
?>
Loading…
Cancel
Save