Ver Fonte

use WEB_CODE_PATH

jmontoya há 9 anos atrás
pai
commit
9237518495

+ 3 - 3
main/inc/lib/course_home.lib.php

@@ -1096,7 +1096,7 @@ class CourseHome
             /* 	Link to the Course homepage */
 
             $navigation_items['home']['image'] = 'home.gif';
-            $navigation_items['home']['link'] = api_get_path(REL_COURSE_PATH).Security::remove_XSS($_SESSION['_course']['path']).'/index.php';
+            $navigation_items['home']['link'] = api_get_path(WEB_CODE_PATH).Security::remove_XSS($_SESSION['_course']['path']).'/index.php';
             $navigation_items['home']['name'] = get_lang('CourseHomepageLink');
 
             $sql_menu_query = "SELECT * FROM $course_tools_table
@@ -1106,7 +1106,7 @@ class CourseHome
             while ($row = Database::fetch_array($sql_result)) {
                 $navigation_items[$row['id']] = $row;
                 if (stripos($row['link'], 'http://') === false && stripos($row['link'], 'https://') === false) {
-                    $navigation_items[$row['id']]['link'] = api_get_path(REL_CODE_PATH).$row['link'];
+                    $navigation_items[$row['id']]['link'] = api_get_path(WEB_CODE_PATH).$row['link'];
                     $navigation_items[$row['id']]['name'] = CourseHome::translate_tool_name($row);
                 }
             }
@@ -1124,7 +1124,7 @@ class CourseHome
                 if (api_get_session_id() == 0) {
                     // course settings item
                     $navigation_items['course_settings']['image'] = $course_setting_info['image'];
-                    $navigation_items['course_settings']['link'] = api_get_path(REL_CODE_PATH).'course_info/infocours.php';
+                    $navigation_items['course_settings']['link'] = api_get_path(WEB_CODE_PATH).'course_info/infocours.php';
                     $navigation_items['course_settings']['name'] = $course_setting_visual_name;
                 }
             }

+ 1 - 1
main/inc/lib/tracking.lib.php

@@ -1578,7 +1578,7 @@ class Tracking
     				if ($convert_date) {
                         $last_login_date = api_convert_and_format_date($last_login_date, DATE_FORMAT_SHORT);
                         $icon = api_is_allowed_to_edit() ?
-                            '<a href="'.api_get_path(REL_CODE_PATH).'announcements/announcements.php?action=add&remind_inactive='.$student_id.'&cidReq='.$courseInfo['code'].'" title="'.get_lang('RemindInactiveUser').'">
+                            '<a href="'.api_get_path(WEB_CODE_PATH).'announcements/announcements.php?action=add&remind_inactive='.$student_id.'&cidReq='.$courseInfo['code'].'" title="'.get_lang('RemindInactiveUser').'">
                               '.Display::return_icon('messagebox_warning.gif').'
                              </a>'
                             : null;

+ 9 - 1
main/mySpace/myStudents.php

@@ -713,7 +713,15 @@ if (!empty($student_id)) {
 
                         $scoretotal_display = '0/0 (0%)';
                         if (!empty($scoretotal)) {
-                            $scoretotal_display =  round($scoretotal[0],1).'/'.round($scoretotal[1],1).' ('.round(($scoretotal[0] / $scoretotal[1]) * 100,2) . ' %)';
+                            $scoretotal_display = round(
+                                    $scoretotal[0],
+                                    1
+                                ).'/'.
+                                round(
+                                    $scoretotal[1],
+                                    1
+                                ).' ('.
+                                round(($scoretotal[0] / $scoretotal[1]) * 100, 2).' %)';
                         }
 
                         $progress = Tracking::get_avg_student_progress($user_info['user_id'], $course_code, null, $sessionId);

+ 2 - 3
main/newscorm/learnpath.class.php

@@ -8646,10 +8646,9 @@ class learnpath
         $res_hot  = Database::query($sql_hot);
 
         $return = '<ul class="lp_resource">';
-
         $return .= '<li class="lp_resource_element">';
-        $return .= '<img alt="" src="../img/new_test_small.gif" style="margin-right:5px;" title="" />';
-        $return .= '<a href="' . api_get_path(REL_CODE_PATH) . 'exercice/exercise_admin.php?'.api_get_cidreq().'&lp_id=' . $this->lp_id . '">' .
+        $return .= Display::return_icon('new_test_small.gif');
+        $return .= '<a href="' . api_get_path(WEB_CODE_PATH) . 'exercice/exercise_admin.php?'.api_get_cidreq().'&lp_id=' . $this->lp_id . '">' .
             get_lang('NewExercise') . '</a>';
         $return .= '</li>';
 

+ 1 - 1
main/newscorm/lp_ajax_switch_item.php

@@ -85,7 +85,7 @@ function switch_item_details($lp_id, $user_id, $view_id, $current_item, $next_it
     if ($mylp->force_commit) {
         $mylp->save_current();
     }
-    //$objResponse->addAlert(api_get_path(REL_CODE_PATH).'newscorm/learnpathItem.class.php');
+
     if (is_object($mylp->items[$new_item_id])) {
         $mylpi = $mylp->items[$new_item_id];
     } else {

+ 1 - 1
main/tracking/courseLog.php

@@ -327,7 +327,7 @@ if (count($a_students) > 0) {
     $form = new FormValidator(
         'reminder_form',
         'get',
-        api_get_path(REL_CODE_PATH).'announcements/announcements.php?' . api_get_cidreq(),
+        api_get_path(WEB_CODE_PATH).'announcements/announcements.php?' . api_get_cidreq(),
         null,
         ['style' => 'margin-bottom: 10px'],
         FormValidator::LAYOUT_INLINE