Browse Source

Removing exercise.lib.php file calls, now we use lazy loading (composer)

Julio Montoya 12 năm trước cách đây
mục cha
commit
c9b55ed522

+ 2 - 4
main/inc/lib/events.lib.inc.php

@@ -305,7 +305,6 @@ function event_link($link_id)
  * @desc Record result of user when an exercice was done
  */
 function update_event_exercise($exeid, $exo_id, $score, $weight, $session_id, $learnpath_id = 0, $learnpath_item_id = 0, $learnpath_item_view_id = 0, $duration = 0, $status = '', $remind_list = array() , $end_date = null) {
-    require_once api_get_path(SYS_CODE_PATH).'exercice/exercise.lib.php';
     global $debug;
     $TABLETRACK_EXERCICES = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_EXERCICES);
 
@@ -353,11 +352,10 @@ function update_event_exercise($exeid, $exo_id, $score, $weight, $session_id, $l
         		 WHERE exe_id = '".Database::escape_string($exeid)."'";
         $res = Database::query($sql);
 
-        if ($debug)
+        if ($debug) {
             error_log('update_event_exercise called');
-        if ($debug)
             error_log("$sql");
-
+        }
         //Deleting control time session track
         //ExerciseLib::exercise_time_control_delete($exo_id);
         return $res;

+ 1 - 1
main/newscorm/learnpath_functions.inc.php

@@ -1416,7 +1416,7 @@ function export_exercise($item_id)
         }
 
         echo $s = "<tr bgcolor='#e6e6e6'><td valign='top' colspan='2'>".get_lang('Question')." ";
-        // Call the showQuestion() function from exercise.lib.php. This basically displays the question in a table.
+        // Call the showQuestion(). This basically displays the question in a table.
         $question_obj = Question::read($questionId);
         $test .= ExerciseLib::showQuestion($question_obj, false, 'export', $i);
 

+ 0 - 1
main/newscorm/lp_stats.php

@@ -13,7 +13,6 @@
  */
 require_once 'learnpath.class.php';
 require_once 'resourcelinker.inc.php';
-require_once '../exercice/exercise.lib.php';
 
 $course_code = api_get_course_id();