Browse Source

[svn r17176] minor - style changes - defined variable

Isaac Flores 16 years ago
parent
commit
6121caeac3
1 changed files with 2 additions and 3 deletions
  1. 2 3
      main/gradebook/lib/be/exerciselink.class.php

+ 2 - 3
main/gradebook/lib/be/exerciselink.class.php

@@ -240,10 +240,9 @@ class ExerciseLink extends AbstractLink
      * Lazy load function to get the database table of the exercise
      */
     private function get_exercise_table () {
-    	if (!isset($this->exercise_table))
-    	{
+    	if (!isset($this->exercise_table)) {
 	    	$course_info = Database :: get_course_info($this->get_course_code());
-			$database_name = $course_info['db_name'];
+			$database_name = isset($course_info['db_name']) ? $course_info['db_name'] : '';
 			$this->exercise_table = Database :: get_course_table(TABLE_QUIZ_TEST, $database_name);
     	}
    		return $this->exercise_table;