Browse Source

Remove unused course_code (deleted in 1.10.x)

jmontoyaa 8 years ago
parent
commit
8cbdf1657f
2 changed files with 14 additions and 38 deletions
  1. 14 8
      main/inc/lib/events.lib.php
  2. 0 30
      src/Chamilo/CoreBundle/Entity/TrackEAttempt.php

+ 14 - 8
main/inc/lib/events.lib.php

@@ -494,8 +494,7 @@ class Event
                 'position' => $position,
                 'tms' => $now,
                 'filename' => !empty($fileName) ? basename($fileName) : $fileName,
-                'teacher_comment' => '',
-                'course_code' => ''
+                'teacher_comment' => ''
             );
 
             // Check if attempt exists.
@@ -532,6 +531,10 @@ class Event
             if ($updateResults == false) {
                 $attempt_id = Database::insert($TBL_TRACK_ATTEMPT, $attempt);
 
+                if ($debug) {
+                    error_log("Insert attempt with id #$attempt_id");
+                }
+
                 if (defined('ENABLED_LIVE_EXERCISE_TRACKING')) {
                     if ($debug) {
                         error_log("Saving e attempt recording ");
@@ -547,11 +550,13 @@ class Event
                     Database::insert($recording_table, $attempt_recording);
                 }
             } else {
-                Database::update($TBL_TRACK_ATTEMPT, $attempt,
-                    array('exe_id = ? AND question_id = ? AND user_id = ? ' => array($exe_id, $question_id, $user_id)));
+                Database::update(
+                    $TBL_TRACK_ATTEMPT,
+                    $attempt,
+                    array('exe_id = ? AND question_id = ? AND user_id = ? ' => array($exe_id, $question_id, $user_id))
+                );
 
                 if (defined('ENABLED_LIVE_EXERCISE_TRACKING')) {
-
                     $attempt_recording = array(
                         'exe_id' => $exe_id,
                         'question_id' => $question_id,
@@ -561,7 +566,9 @@ class Event
                         'session_id' => $session_id,
                     );
 
-                    Database::update($recording_table, $attempt_recording,
+                    Database::update(
+                        $recording_table,
+                        $attempt_recording,
                         array('exe_id = ? AND question_id = ? AND session_id = ? ' => array($exe_id, $question_id, $session_id))
                     );
                 }
@@ -570,7 +577,6 @@ class Event
 
             return $attempt_id;
         } else {
-
             return false;
         }
     }
@@ -1790,7 +1796,7 @@ class Event
                     WHERE user_from = '.$user_from.' AND user_to = '.$user_to.' AND event_type_name = "'.$event_name.'"';
         }
         $result = Database::store_result(Database::query($sql), 'ASSOC');
-        
+
         return $result[0]["total"];
     }
 

+ 0 - 30
src/Chamilo/CoreBundle/Entity/TrackEAttempt.php

@@ -64,13 +64,6 @@ class TrackEAttempt
      */
     private $marks;
 
-    /**
-     * @var string
-     *
-     * @ORM\Column(name="course_code", type="string", length=40, nullable=false)
-     */
-    private $courseCode;
-
     /**
      * @var integer
      *
@@ -255,29 +248,6 @@ class TrackEAttempt
         return $this->marks;
     }
 
-    /**
-     * Set courseCode
-     *
-     * @param string $courseCode
-     * @return TrackEAttempt
-     */
-    public function setCourseCode($courseCode)
-    {
-        $this->courseCode = $courseCode;
-
-        return $this;
-    }
-
-    /**
-     * Get courseCode
-     *
-     * @return string
-     */
-    public function getCourseCode()
-    {
-        return $this->courseCode;
-    }
-
     /**
      * Set cId
      *