diff --git a/main/admin/configure_extensions.php b/main/admin/configure_extensions.php index 45983249fe..f24c8ccecb 100644 --- a/main/admin/configure_extensions.php +++ b/main/admin/configure_extensions.php @@ -320,7 +320,7 @@ Display::display_header($nameTool); -
+ " /> - +
@@ -452,7 +452,7 @@ Display::display_header($nameTool); -
+
@@ -475,7 +475,7 @@ Display::display_header($nameTool); -
+
diff --git a/main/admin/configure_homepage.php b/main/admin/configure_homepage.php index 67dedafec7..6bd90d84ad 100644 --- a/main/admin/configure_homepage.php +++ b/main/admin/configure_homepage.php @@ -1,4 +1,4 @@ -

-
+ @@ -416,7 +416,7 @@ switch ($current_page) if (api_is_allowed_to_edit('BLOG_'.$blog_id, 'role_management')) { ?> - + 0 ? ($dayone['wday'] - 1) : 6; - $backwardsURL = $_SERVER['PHP_SELF']."?".api_get_cidreq()."&coursePath=".$_GET['coursePath']."&courseCode=".$_GET['courseCode']."&month=". ($month == 1 ? 12 : $month -1)."&year=". ($month == 1 ? $year -1 : $year); - $forewardsURL = $_SERVER['PHP_SELF']."?".api_get_cidreq()."&coursePath=".$_GET['coursePath']."&courseCode=".$_GET['courseCode']."&month=". ($month == 12 ? 1 : $month +1)."&year=". ($month == 12 ? $year +1 : $year); + $backwardsURL = api_get_self()."?".api_get_cidreq()."&coursePath=".$_GET['coursePath']."&courseCode=".$_GET['courseCode']."&month=". ($month == 1 ? 12 : $month -1)."&year=". ($month == 1 ? $year -1 : $year); + $forewardsURL = api_get_self()."?".api_get_cidreq()."&coursePath=".$_GET['coursePath']."&courseCode=".$_GET['courseCode']."&month=". ($month == 12 ? 1 : $month +1)."&year=". ($month == 12 ? $year +1 : $year); echo "
diff --git a/main/blog/blog.php b/main/blog/blog.php index f2085eab67..a3fc5cc02f 100644 --- a/main/blog/blog.php +++ b/main/blog/blog.php @@ -247,10 +247,10 @@ Blog :: display_minimonthcalendar($month, $year, $blog_id);
    -
  • -
  • -
  • -
  • +
  • +
  • +
  • +
\n", "\n", @@ -233,8 +233,8 @@ function display_monthcalendar($month, $year) //Start the week on monday $startdayofweek = $dayone['wday']<>0 ? ($dayone['wday']-1) : 6; - $backwardsURL = $_SERVER['PHP_SELF']."?".api_get_cidreq()."&origin=$origin&month=".($month==1 ? 12 : $month-1)."&year=".($month==1 ? $year-1 : $year); - $forewardsURL = $_SERVER['PHP_SELF']."?".api_get_cidreq()."&origin=$origin&month=".($month==12 ? 1 : $month+1)."&year=".($month==12 ? $year+1 : $year); + $backwardsURL = api_get_self()."?".api_get_cidreq()."&origin=$origin&month=".($month==1 ? 12 : $month-1)."&year=".($month==1 ? $year-1 : $year); + $forewardsURL = api_get_self()."?".api_get_cidreq()."&origin=$origin&month=".($month==12 ? 1 : $month+1)."&year=".($month==12 ? $year+1 : $year); $maand_array_maandnummer=$month-1; @@ -1895,7 +1895,7 @@ function show_add_form($id = '') ?> - + diff --git a/main/calendar/myagenda.php b/main/calendar/myagenda.php index 97edccd3f9..8be9297fe6 100644 --- a/main/calendar/myagenda.php +++ b/main/calendar/myagenda.php @@ -418,8 +418,8 @@ function display_monthcalendar($agendaitems, $month, $year, $weekdaynames, $mont $dayone = getdate(mktime(0, 0, 0, $month, 1, $year)); //Start the week on monday $startdayofweek = $dayone['wday'] <> 0 ? ($dayone['wday'] - 1) : 6; - $backwardsURL = $_SERVER['PHP_SELF']."?coursePath=".urlencode($course_path)."&courseCode=".htmlentities($_GET['courseCode'])."&action=view&view=month&month=". ($month == 1 ? 12 : $month -1)."&year=". ($month == 1 ? $year -1 : $year); - $forewardsURL = $_SERVER['PHP_SELF']."?coursePath=".urlencode($course_path)."&courseCode=".htmlentities($_GET['courseCode'])."&action=view&view=month&month=". ($month == 12 ? 1 : $month +1)."&year=". ($month == 12 ? $year +1 : $year); + $backwardsURL = api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".htmlentities($_GET['courseCode'])."&action=view&view=month&month=". ($month == 1 ? 12 : $month -1)."&year=". ($month == 1 ? $year -1 : $year); + $forewardsURL = api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".htmlentities($_GET['courseCode'])."&action=view&view=month&month=". ($month == 12 ? 1 : $month +1)."&year=". ($month == 12 ? $year +1 : $year); echo "
\n", "\n", "\n", "\n", "\n", "\n"; @@ -481,8 +481,8 @@ function display_minimonthcalendar($agendaitems, $month, $year, $monthName) $dayone = getdate(mktime(0, 0, 0, $month, 1, $year)); //Start the week on monday $startdayofweek = $dayone['wday'] <> 0 ? ($dayone['wday'] - 1) : 6; - $backwardsURL = $_SERVER['PHP_SELF']."?coursePath=".urlencode($course_path)."&courseCode=".$_GET['courseCode']."&month=". ($month == 1 ? 12 : $month -1)."&year=". ($month == 1 ? $year -1 : $year); - $forewardsURL = $_SERVER['PHP_SELF']."?coursePath=".urlencode($course_path)."&courseCode=".$_GET['courseCode']."&month=". ($month == 12 ? 1 : $month +1)."&year=". ($month == 12 ? $year +1 : $year); + $backwardsURL = api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".$_GET['courseCode']."&month=". ($month == 1 ? 12 : $month -1)."&year=". ($month == 1 ? $year -1 : $year); + $forewardsURL = api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".$_GET['courseCode']."&month=". ($month == 12 ? 1 : $month +1)."&year=". ($month == 12 ? $year +1 : $year); echo "
«", $monthName, " ", $year, "»
\n", "\n", "\n", "\n", "\n", "\n"; @@ -562,8 +562,8 @@ function display_weekcalendar($agendaitems, $month, $year, $weekdaynames, $month $day_of_the_week = date("w", $today); // Numeric representation of the day of the week 0 (for Sunday) through 6 (for Saturday) of today $timestamp_first_date_of_week = $today - (($day_of_the_week -1) * 24 * 60 * 60); // timestamp of the monday of this week $timestamp_last_date_of_week = $today + ((7 - $day_of_the_week) * 24 * 60 * 60); // timestamp of the sunday of this week - $backwardsURL = $_SERVER['PHP_SELF']."?coursePath=".urlencode($course_path)."&courseCode=".$_GET['courseCode']."&action=view&view=week&week=". ($week_number -1); - $forewardsURL = $_SERVER['PHP_SELF']."?coursePath=".urlencode($course_path)."&courseCode=".$_GET['courseCode']."&action=view&view=week&week=". ($week_number +1); + $backwardsURL = api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".$_GET['courseCode']."&action=view&view=week&week=". ($week_number -1); + $forewardsURL = api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".$_GET['courseCode']."&action=view&view=week&week=". ($week_number +1); echo "
«", $monthName, " ", $year, "»
\n"; // The title row containing the the week information (week of the year (startdate of week - enddate of week) echo "\n"; @@ -654,8 +654,8 @@ function display_daycalendar($agendaitems, $day, $month, $year, $weekdaynames, $ // we are loading all the calendar items of all the courses for today echo "
\n"; // the forward and backwards url - $backwardsURL = $_SERVER['PHP_SELF']."?coursePath=".urlencode($course_path)."&courseCode=".$_GET['courseCode']."&action=view&view=day&day=".date("j", $previousday)."&month=".date("n", $previousday)."&year=".date("Y", $previousday); - $forewardsURL = $_SERVER['PHP_SELF']."?coursePath=".urlencode($course_path)."&courseCode=".$_GET['courseCode']."&action=view&view=day&day=".date("j", $nextday)."&month=".date("n", $nextday)."&year=".date("Y", $nextday); + $backwardsURL = api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".$_GET['courseCode']."&action=view&view=day&day=".date("j", $previousday)."&month=".date("n", $previousday)."&year=".date("Y", $previousday); + $forewardsURL = api_get_self()."?coursePath=".urlencode($course_path)."&courseCode=".$_GET['courseCode']."&action=view&view=day&day=".date("j", $nextday)."&month=".date("n", $nextday)."&year=".date("Y", $nextday); // The title row containing the day echo "\n", "\n", "
«"; echo $DaysLong[$day_of_the_week]." ".date("j", $today)." ".$MonthsLong[date("n", $today) - 1]." ".date("Y", $today); diff --git a/main/document/document.inc.php b/main/document/document.inc.php index ae00e4f272..0a2bdeaae1 100644 --- a/main/document/document.inc.php +++ b/main/document/document.inc.php @@ -1,4 +1,4 @@ -'; diff --git a/main/document/edit_document.php b/main/document/edit_document.php index 86367cdfc9..8cf76b334e 100644 --- a/main/document/edit_document.php +++ b/main/document/edit_document.php @@ -1,4 +1,4 @@ -addElement('hidden','filename'); $form->addElement('hidden','extension'); diff --git a/main/exercice/exercise_admin.php b/main/exercice/exercise_admin.php index aa055176ba..7e8d13853a 100644 --- a/main/exercice/exercise_admin.php +++ b/main/exercice/exercise_admin.php @@ -60,7 +60,7 @@ $objExercise = new Exercise(); *********************/ if(isset($_GET['exerciseId'])) { - $form = new FormValidator('exercise_admin', 'post', $_SERVER['PHP_SELF'].'?exerciseId='.$_GET['exerciseId']); + $form = new FormValidator('exercise_admin', 'post', api_get_self().'?exerciseId='.$_GET['exerciseId']); $objExercise -> read (intval($_GET['exerciseId'])); $form -> addElement ('hidden','edit','true'); }else diff --git a/main/exercice/feedback.php b/main/exercice/feedback.php index 4c2cb8ca63..7fe1bb49b7 100644 --- a/main/exercice/feedback.php +++ b/main/exercice/feedback.php @@ -65,7 +65,7 @@ Display::display_header($nameTools,"Exercise"); $fck_attribute['Height'] = '200'; $fck_attribute['ToolbarSet'] = 'Small'; $fck_attribute['Config']['IMUploadPath'] = 'upload/test/'; - $form = new FormValidator('feedbackform','post',$_SERVER['PHP_SELF']."?modifyQuestion=".$modifyQuestion."&newQuestion=".$newQuestion); + $form = new FormValidator('feedbackform','post',api_get_self()."?modifyQuestion=".$modifyQuestion."&newQuestion=".$newQuestion); $obj_registration_form = new HTML_QuickForm('frmRegistration', 'POST'); $renderer =& $obj_registration_form->defaultRenderer(); $renderer->setElementTemplate( diff --git a/main/exercice/question_admin.inc.php b/main/exercice/question_admin.inc.php index 89f80fc5d5..46f8bc06a6 100644 --- a/main/exercice/question_admin.inc.php +++ b/main/exercice/question_admin.inc.php @@ -24,7 +24,7 @@ * It is included from the script admin.php * @package dokeos.exercise * @author Olivier Brouckaert -* @version $Id: question_admin.inc.php 11066 2007-02-07 09:39:47Z elixir_julian $ +* @version $Id: question_admin.inc.php 12272 2007-05-03 14:40:45Z elixir_julian $ */ /* @@ -48,12 +48,12 @@ if(!defined('ALLOWED_TO_INCLUDE')) if(isset($_GET['editQuestion'])) { $objQuestion = Question::read ($_GET['editQuestion']); - $action = $_SERVER['PHP_SELF']."?modifyQuestion=".$modifyQuestion."&editQuestion=".$objQuestion->id; + $action = api_get_self()."?modifyQuestion=".$modifyQuestion."&editQuestion=".$objQuestion->id; } else { $objQuestion = Question :: getInstance($_REQUEST['answerType']); - $action = $_SERVER['PHP_SELF']."?modifyQuestion=".$modifyQuestion."&newQuestion=".$newQuestion; + $action = api_get_self()."?modifyQuestion=".$modifyQuestion."&newQuestion=".$newQuestion; } if(is_object($objQuestion)) diff --git a/main/external_module/external_module.php b/main/external_module/external_module.php index a3e28061d4..ed14db0f25 100644 --- a/main/external_module/external_module.php +++ b/main/external_module/external_module.php @@ -136,7 +136,7 @@ else

- +setConstants(array('forum' => '5')); // settting the form elements @@ -1784,7 +1784,7 @@ function show_edit_post_form($current_post, $current_thread, $form_values='') global $_user; // initiate the object - $form = new FormValidator('edit_post', 'post', $_SERVER['PHP_SELF'].'?forum='.$_GET['forum'].'&thread='.$_GET['thread'].'&post='.$_GET['post']); + $form = new FormValidator('edit_post', 'post', api_get_self().'?forum='.$_GET['forum'].'&thread='.$_GET['thread'].'&post='.$_GET['post']); // settting the form elements $form->addElement('hidden', 'post_id', $current_post['post_id']); @@ -2357,7 +2357,7 @@ function move_thread_form() global $origin; // initiate the object - $form = new FormValidator('movepost', 'post', $_SERVER['PHP_SELF'].'?forum='.$_GET['forum'].'&thread='.$_GET['thread'].'&action='.$_GET['action'].'&origin='.$origin); + $form = new FormValidator('movepost', 'post', api_get_self().'?forum='.$_GET['forum'].'&thread='.$_GET['thread'].'&action='.$_GET['action'].'&origin='.$origin); // the header for the form $form->addElement('header', '', get_lang('MoveThread')); // invisible form: the thread_id @@ -2414,7 +2414,7 @@ function move_thread_form() function move_post_form() { // initiate the object - $form = new FormValidator('movepost', 'post', $_SERVER['PHP_SELF'].'?forum='.$_GET['forum'].'&thread='.$_GET['thread'].'&post='.$_GET['post'].'&action='.$_GET['action'].'&post='.$_GET['post']); + $form = new FormValidator('movepost', 'post', api_get_self().'?forum='.$_GET['forum'].'&thread='.$_GET['thread'].'&post='.$_GET['post'].'&action='.$_GET['action'].'&post='.$_GET['post']); // the header for the form $form->addElement('header', '', get_lang('MovePost')); diff --git a/main/inc/lib/blog.lib.php b/main/inc/lib/blog.lib.php index bec4f3184f..685fcf3f47 100644 --- a/main/inc/lib/blog.lib.php +++ b/main/inc/lib/blog.lib.php @@ -1300,7 +1300,7 @@ class Blog $css_class = (($counter % 2) == 0) ? "row_odd" : "row_even"; $delete_icon = ($task['system_task'] == '1') ? "delete_na.gif" : "delete.gif"; $delete_title = ($task['system_task'] == '1') ? get_lang('DeleteSystemTask') : get_lang('DeleteTask'); - $delete_link = ($task['system_task'] == '1') ? '#' : $_SERVER['PHP_SELF'] . '?action=manage_tasks&blog_id=' . $task['blog_id'] . '&do=delete&task_id=' . $task['task_id']; + $delete_link = ($task['system_task'] == '1') ? '#' : api_get_self() . '?action=manage_tasks&blog_id=' . $task['blog_id'] . '&do=delete&task_id=' . $task['task_id']; $delete_confirm = ($task['system_task'] == '1') ? '' : 'onclick="javascript:if(!confirm(\''.addslashes(htmlentities(get_lang("ConfirmYourChoice"))). '\')) return false;"'; echo '', @@ -1360,7 +1360,7 @@ class Blog $css_class = (($counter % 2)==0) ? "row_odd" : "row_even"; $delete_icon = ($task['system_task'] == '1') ? "delete_na.gif" : "delete.gif"; $delete_title = ($task['system_task'] == '1') ? get_lang('DeleteSystemTask') : get_lang('DeleteTask'); - $delete_link = ($task['system_task'] == '1') ? '#' : $_SERVER['PHP_SELF'] . '?action=manage_tasks&blog_id=' . $task['blog_id'] . '&do=delete&task_id=' . $task['task_id']; + $delete_link = ($task['system_task'] == '1') ? '#' : api_get_self() . '?action=manage_tasks&blog_id=' . $task['blog_id'] . '&do=delete&task_id=' . $task['task_id']; $delete_confirm = ($task['system_task'] == '1') ? '' : 'onclick="javascript:if(!confirm(\''.addslashes(htmlentities(get_lang("ConfirmYourChoice"))). '\')) return false;"'; echo '', @@ -2322,8 +2322,8 @@ class Blog //Start the week on monday $startdayofweek = $dayone['wday'] <> 0 ? ($dayone['wday'] - 1) : 6; - $backwardsURL = $_SERVER['PHP_SELF']."?blog_id=" . (int)$_GET['blog_id']."&filter=" . $_GET['filter']."&month=". ($month == 1 ? 12 : $month -1)."&year=". ($month == 1 ? $year -1 : $year); - $forewardsURL = $_SERVER['PHP_SELF']."?blog_id=" . (int)$_GET['blog_id']."&filter=" . $_GET['filter']."&month=". ($month == 12 ? 1 : $month +1)."&year=". ($month == 12 ? $year +1 : $year); + $backwardsURL = api_get_self()."?blog_id=" . (int)$_GET['blog_id']."&filter=" . $_GET['filter']."&month=". ($month == 1 ? 12 : $month -1)."&year=". ($month == 1 ? $year -1 : $year); + $forewardsURL = api_get_self()."?blog_id=" . (int)$_GET['blog_id']."&filter=" . $_GET['filter']."&month=". ($month == 12 ? 1 : $month +1)."&year=". ($month == 12 ? $year +1 : $year); // Get posts for this month $sql = "SELECT post.*, DAYOFMONTH(`date_creation`) as post_day, user.lastname, user.firstname FROM $tbl_blogs_posts post diff --git a/main/inc/lib/display.lib.php b/main/inc/lib/display.lib.php index 2d47c5673d..5c8f06d767 100644 --- a/main/inc/lib/display.lib.php +++ b/main/inc/lib/display.lib.php @@ -518,7 +518,7 @@ class Display { // check if the $_SERVER['REQUEST_URI'] contains already url parameters (thus a questionmark) if (!strstr($_SERVER['REQUEST_URI'], "?")) { - $sourceurl = $_SERVER['PHP_SELF']."?"; + $sourceurl = api_get_self()."?"; } else { diff --git a/main/inc/lib/fckeditor/editor/filemanager/browser/default/connectors/php/io.php b/main/inc/lib/fckeditor/editor/filemanager/browser/default/connectors/php/io.php index 7bc325f267..5999f0a180 100644 --- a/main/inc/lib/fckeditor/editor/filemanager/browser/default/connectors/php/io.php +++ b/main/inc/lib/fckeditor/editor/filemanager/browser/default/connectors/php/io.php @@ -90,7 +90,7 @@ function GetRootPath() { $sRealPath = realpath( './' ) ; - $sSelfPath = $_SERVER['PHP_SELF'] ; + $sSelfPath = api_get_self(); $sSelfPath = substr( $sSelfPath, 0, strrpos( $sSelfPath, '/' ) ) ; return substr( $sRealPath, 0, strlen( $sRealPath ) - strlen( $sSelfPath ) ) ; diff --git a/main/inc/lib/fckeditor/editor/filemanager/upload/php/util.php b/main/inc/lib/fckeditor/editor/filemanager/upload/php/util.php index 73486f5788..45f9522a6c 100644 --- a/main/inc/lib/fckeditor/editor/filemanager/upload/php/util.php +++ b/main/inc/lib/fckeditor/editor/filemanager/upload/php/util.php @@ -27,7 +27,7 @@ function GetRootPath() { $sRealPath = realpath( './' ) ; - $sSelfPath = $_SERVER['PHP_SELF'] ; + $sSelfPath = api_get_self(); $sSelfPath = substr( $sSelfPath, 0, strrpos( $sSelfPath, '/' ) ) ; return substr( $sRealPath, 0, strlen( $sRealPath ) - strlen( $sSelfPath ) ) ; diff --git a/main/inc/lib/main_api.lib.php b/main/inc/lib/main_api.lib.php index b57b79a754..ba491ea715 100644 --- a/main/inc/lib/main_api.lib.php +++ b/main/inc/lib/main_api.lib.php @@ -1138,7 +1138,7 @@ function api_display_tool_view_option() // check if the $_SERVER['REQUEST_URI'] contains already url parameters (thus a questionmark) if (!strstr($_SERVER['REQUEST_URI'], "?")) { - $sourceurl = $_SERVER['PHP_SELF']."?"; + $sourceurl = api_get_self()."?"; } else { diff --git a/main/inc/lib/pear/HTML/QuickForm.php b/main/inc/lib/pear/HTML/QuickForm.php index ea96d49e81..eaac66f5e2 100644 --- a/main/inc/lib/pear/HTML/QuickForm.php +++ b/main/inc/lib/pear/HTML/QuickForm.php @@ -17,7 +17,7 @@ // | Bertrand Mansion | // +----------------------------------------------------------------------+ // -// $Id: QuickForm.php 9612 2006-10-20 11:56:44Z bmol $ +// $Id: QuickForm.php 12272 2007-05-03 14:40:45Z elixir_julian $ require_once('PEAR.php'); require_once('HTML/Common.php'); @@ -257,7 +257,7 @@ class HTML_QuickForm extends HTML_Common { { HTML_Common::HTML_Common($attributes); $method = (strtoupper($method) == 'GET') ? 'get' : 'post'; - $action = ($action == '') ? $_SERVER['PHP_SELF'] : $action; + $action = ($action == '') ? api_get_self() : $action; $target = empty($target) ? array() : array('target' => $target); $attributes = array('action'=>$action, 'method'=>$method, 'name'=>$formName, 'id'=>$formName) + $target; $this->updateAttributes($attributes); diff --git a/main/metadata/importlinks.php b/main/metadata/importlinks.php index 430fe897c7..f0d5b3f560 100644 --- a/main/metadata/importlinks.php +++ b/main/metadata/importlinks.php @@ -141,7 +141,7 @@ if (isset($lcn)) // category_title } $interbreadcrumb[]= array( - 'url' => $_SERVER['PHP_SELF'] . '?lcn=' . urlencode($lcn), + 'url' => api_get_self() . '?lcn=' . urlencode($lcn), 'name'=> get_lang('Continue') . ' ' . htmlspecialchars($lcn)); } diff --git a/main/metadata/importmanifest.php b/main/metadata/importmanifest.php index 481859ad33..4d81acad8d 100644 --- a/main/metadata/importmanifest.php +++ b/main/metadata/importmanifest.php @@ -144,7 +144,7 @@ if (isset($workWith)) // now checked to be a valid path in scormdocument $mdObj->mdo_add_breadcrump_nav(); // see 'md_' . EID_TYPE . '.php' if (isset($sdi)) $interbreadcrumb[]= array( - 'url' => $_SERVER['PHP_SELF'] . '?sdi=' . urlencode($sdi) . + 'url' => api_get_self() . '?sdi=' . urlencode($sdi) . ($sdisub ? '&sdisub=' . urlencode($sdisub) : ($sdiall ? '&sdisub='.UZYX : '')), 'name'=> get_lang('Continue') . ' ' . $sdi . diff --git a/main/metadata/md_funcs.php b/main/metadata/md_funcs.php index 4dfe707894..b530c93441 100644 --- a/main/metadata/md_funcs.php +++ b/main/metadata/md_funcs.php @@ -88,7 +88,7 @@ function define_htt($htt_file, $urlp, $course_path) if ($xhtDoc->htt_error) give_up('Templates file "' . $htt_file . '": ' . $xhtDoc->htt_error); - $xhtDoc->xht_param['self'] = $_SERVER['PHP_SELF'] . $urlp; + $xhtDoc->xht_param['self'] = api_get_self() . $urlp; $xhtDoc->xht_param['dateTime'] = date('Y-m-d'); diff --git a/main/newscorm/document.php b/main/newscorm/document.php index ea4d721cb3..50c2e97d93 100644 --- a/main/newscorm/document.php +++ b/main/newscorm/document.php @@ -246,7 +246,7 @@ if ($curDirName) /* if the $curDirName is empty, we're in the root point { ?> - + parent   "; } elseif (file_exists($indexRoute2)) { - $urlFileName = $_SERVER['PHP_SELF'].'?'.api_get_cidreq().'&openDir='.$cmdFileName.'&indexRoute=index.html'; + $urlFileName = api_get_self().'?'.api_get_cidreq().'&openDir='.$cmdFileName.'&indexRoute=index.html'; $image="scorm"; } elseif (file_exists($indexRouteA)) { - $urlFileName = $_SERVER['PHP_SELF'].'?'.api_get_cidreq().'&openDir='.$cmdFileName.'&indexRoute=start.htm'; + $urlFileName = api_get_self().'?'.api_get_cidreq().'&openDir='.$cmdFileName.'&indexRoute=start.htm'; $image="scorm"; } elseif (file_exists($manifestRoute)) { - $urlFileName = $_SERVER['PHP_SELF'].'?'.api_get_cidreq().'&openDir='.$cmdFileName; + $urlFileName = api_get_self().'?'.api_get_cidreq().'&openDir='.$cmdFileName; $image="scorm"; } else { - $urlFileName = $_SERVER['PHP_SELF'].'?'.api_get_cidreq().'&subdirs=yes&openDir='.$cmdFileName; + $urlFileName = api_get_self().'?'.api_get_cidreq().'&subdirs=yes&openDir='.$cmdFileName; $image="scorm"; } diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index f25d2339bf..dade1b7afd 100644 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -3749,7 +3749,7 @@ class learnpath { for($i = 0; $i < count($arrLP); $i++) { - $menu_page = $_SERVER['PHP_SELF'] . '?cidReq=' . $_GET['cidReq'] . '&action=view_item&id=' . $arrLP[$i]['id'] . '&lp_id=' . $_SESSION['oLP']->lp_id; + $menu_page = api_get_self() . '?cidReq=' . $_GET['cidReq'] . '&action=view_item&id=' . $arrLP[$i]['id'] . '&lp_id=' . $_SESSION['oLP']->lp_id; if(file_exists("../img/lp_" . $arrLP[$i]['item_type'] . ".png")) { $return .= "\tm.add(" . $arrLP[$i]['id'] . ", " . $arrLP[$i]['parent_item_id'] . ", '" . $arrLP[$i]['title'] . "', '" . $menu_page . "', '', '', '../img/lp_" . $arrLP[$i]['item_type'] . ".png', '../img/lp_" . $arrLP[$i]['item_type'] . ".png');\n"; @@ -5001,7 +5001,7 @@ function display_thread_form($action = 'add', $id = 0, $extra_info = '') require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php'); - $form = new FormValidator('form','POST',$_SERVER["PHP_SELF"]."?".$_SERVER["QUERY_STRING"]); + $form = new FormValidator('form','POST',api_get_self()."?".$_SERVER["QUERY_STRING"]); $defaults["title"]=html_entity_decode($item_title); $defaults["description"]=html_entity_decode($item_description); @@ -5271,7 +5271,7 @@ function display_thread_form($action = 'add', $id = 0, $extra_info = '') */ require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php'); - $form = new FormValidator('form','POST',$_SERVER["PHP_SELF"]."?".$_SERVER["QUERY_STRING"]); + $form = new FormValidator('form','POST',api_get_self()."?".$_SERVER["QUERY_STRING"]); $defaults["title"]=html_entity_decode($item_title); $defaults["description"]=html_entity_decode($item_description); diff --git a/main/newscorm/lp_add_item.php b/main/newscorm/lp_add_item.php index f9bffe4c8a..fb53054c0a 100644 --- a/main/newscorm/lp_add_item.php +++ b/main/newscorm/lp_add_item.php @@ -137,7 +137,7 @@ $therow=Database::fetch_array($result); ==================================================*/ $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path")); -$interbreadcrumb[]= array ("url"=>$_SERVER['PHP_SELF']."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}")); +$interbreadcrumb[]= array ("url"=>api_get_self()."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}")); switch($_GET['type']){ case 'chapter': diff --git a/main/newscorm/lp_admin_view.php b/main/newscorm/lp_admin_view.php index cc88cd0569..d4f907590c 100644 --- a/main/newscorm/lp_admin_view.php +++ b/main/newscorm/lp_admin_view.php @@ -135,7 +135,7 @@ $therow=Database::fetch_array($result); $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path")); -$interbreadcrumb[]= array ("url"=>$_SERVER['PHP_SELF']."?action=admin_view&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}")); +$interbreadcrumb[]= array ("url"=>api_get_self()."?action=admin_view&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}")); Display::display_header(null,'Path'); //api_display_tool_title($therow['name']); diff --git a/main/newscorm/lp_build.php b/main/newscorm/lp_build.php index da314f6787..c25d78a4e2 100644 --- a/main/newscorm/lp_build.php +++ b/main/newscorm/lp_build.php @@ -156,7 +156,7 @@ $therow=Database::fetch_array($result); $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path")); -$interbreadcrumb[]= array ("url"=>$_SERVER['PHP_SELF']."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}")); +$interbreadcrumb[]= array ("url"=>api_get_self()."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}")); Display::display_header(null,'Path'); //api_display_tool_title($therow['name']); diff --git a/main/newscorm/lp_edit.php b/main/newscorm/lp_edit.php index 5b24bc28cd..cfb99741a2 100644 --- a/main/newscorm/lp_edit.php +++ b/main/newscorm/lp_edit.php @@ -16,7 +16,7 @@ event_access_tool(TOOL_LEARNPATH); if (! $is_allowed_in_course) api_not_allowed(); $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path")); -$interbreadcrumb[]= array ("url"=>$_SERVER['PHP_SELF']."?action=admin_view&lp_id=$learnpath_id", "name" => $_SESSION['oLP']->get_name()); +$interbreadcrumb[]= array ("url"=>api_get_self()."?action=admin_view&lp_id=$learnpath_id", "name" => $_SESSION['oLP']->get_name()); Display::display_header(null,'Path'); diff --git a/main/newscorm/lp_edit_item.php b/main/newscorm/lp_edit_item.php index 06e7acaf36..06e5f3416a 100644 --- a/main/newscorm/lp_edit_item.php +++ b/main/newscorm/lp_edit_item.php @@ -138,7 +138,7 @@ $therow=Database::fetch_array($result); $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path")); -$interbreadcrumb[]= array ("url"=>$_SERVER['PHP_SELF']."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}")); +$interbreadcrumb[]= array ("url"=>api_get_self()."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}")); Display::display_header(null,'Path'); //api_display_tool_title($therow['name']); diff --git a/main/newscorm/lp_edit_item_prereq.php b/main/newscorm/lp_edit_item_prereq.php index c303063ef0..afe13dc10e 100644 --- a/main/newscorm/lp_edit_item_prereq.php +++ b/main/newscorm/lp_edit_item_prereq.php @@ -136,7 +136,7 @@ $therow=Database::fetch_array($result); $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path")); -$interbreadcrumb[]= array ("url"=>$_SERVER['PHP_SELF']."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}")); +$interbreadcrumb[]= array ("url"=>api_get_self()."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}")); Display::display_header(null,'Path'); //api_display_tool_title($therow['name']); diff --git a/main/newscorm/lp_list.php b/main/newscorm/lp_list.php index 4e0685d556..fccfe18ff6 100644 --- a/main/newscorm/lp_list.php +++ b/main/newscorm/lp_list.php @@ -122,7 +122,7 @@ if ($curDirName) // if the $curDirName is empty, we're in the root point and we { ?> - + parent   "lp_controller.php?action=list", "name"=> get_lang("_learning_path")); -$interbreadcrumb[]= array ("url"=>$_SERVER['PHP_SELF']."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}")); +$interbreadcrumb[]= array ("url"=>api_get_self()."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}")); Display::display_header(null,'Path'); //api_display_tool_title($therow['name']); diff --git a/main/newscorm/lp_view_item.php b/main/newscorm/lp_view_item.php index 02e168cb84..19238cc397 100644 --- a/main/newscorm/lp_view_item.php +++ b/main/newscorm/lp_view_item.php @@ -137,7 +137,7 @@ $therow=Database::fetch_array($result); $interbreadcrumb[]= array ("url"=>"lp_controller.php?action=list", "name"=> get_lang("_learning_path")); -$interbreadcrumb[]= array ("url"=>$_SERVER['PHP_SELF']."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}")); +$interbreadcrumb[]= array ("url"=>api_get_self()."?action=build&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}")); Display::display_header(null,'Path'); //api_display_tool_title($therow['name']); diff --git a/main/newscorm/resourcelinker.inc.php b/main/newscorm/resourcelinker.inc.php index 0a9845b346..becd243af7 100644 --- a/main/newscorm/resourcelinker.inc.php +++ b/main/newscorm/resourcelinker.inc.php @@ -410,7 +410,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($builder != 'builder') { echo "".shorten($myrow["title"],($length-3*$level)).""; - $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Agenda&origin=$origin&agenda_id=$agenda_id#$id_in_path"; + $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Agenda&origin=$origin&agenda_id=$agenda_id#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') @@ -470,7 +470,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($builder != 'builder') { echo "".shorten($title,($length-3*$level)).""; - $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Ad_Valvas&origin=$origin&ann_id=$ann_id#$id_in_path"; + $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Ad_Valvas&origin=$origin&ann_id=$ann_id#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') @@ -529,7 +529,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($builder != 'builder') { echo "".shorten($myrow["title"],($length-3*$level)).""; - $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=$linktype&origin=$origin&thelink=$thelink#$id_in_path"; + $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=$linktype&origin=$origin&thelink=$thelink#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') @@ -586,7 +586,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($builder != 'builder') { echo "".shorten($myrow["title"],($length-3*$level)).""; - $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Exercise&origin=$origin&exerciseId=".$myrow["id"]."#$id_in_path"; + $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Exercise&origin=$origin&exerciseId=".$myrow["id"]."#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') @@ -645,7 +645,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($builder != 'builder') { echo "".shorten($name,($length-3*$level)).""; - $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=HotPotatoes&origin=$origin&id=$id#$id_in_path"; + $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=HotPotatoes&origin=$origin&id=$id#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') @@ -696,7 +696,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($builder != 'builder') { echo "".shorten($myrow["forum_name"],($length-3*$level)).""; - $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Forum&origin=$origin&forumparameters=$forumparameters#$id_in_path"; + $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Forum&origin=$origin&forumparameters=$forumparameters#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') @@ -747,7 +747,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($builder != 'builder') { echo "".shorten($myrow["topic_title"],($length-3*$level)).""; - $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Thread&origin=$origin&topic=".$myrow["topic_id"]."&forum=".$myrow["forum_id"]."&md5=".$myrow["md5"]."#$id_in_path"; + $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Thread&origin=$origin&topic=".$myrow["topic_id"]."&forum=".$myrow["forum_id"]."&md5=".$myrow["md5"]."#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') @@ -811,7 +811,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($icon == 'icon') { echo "forum"; } if ($builder != 'builder') { - echo "".shorten($myrow_titel["post_title"],($length-3*$level)).""; $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Post&origin=$origin&posternom=$posternom&posterprenom=$posterprenom&posttime=$posttime&posttext=$posttext&posttitle=$posttitle#$id_in_path"; + echo "".shorten($myrow_titel["post_title"],($length-3*$level)).""; $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Post&origin=$origin&posternom=$posternom&posterprenom=$posterprenom&posttime=$posttime&posttext=$posttext&posttitle=$posttitle#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') @@ -882,7 +882,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ { echo "
     ".shorten($desc,($length-3*$level))."
"; } - } $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Document&origin=$origin&docurl=".$myrow["path"]."#$id_in_path"; + } $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Document&origin=$origin&docurl=".$myrow["path"]."#$id_in_path"; } else { @@ -929,7 +929,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($icon == 'icon') { echo ""; } if ($builder != 'builder') { - echo "".shorten($name,($length-3*$level)).""; $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Assignments&origin=$origin#$id_in_path"; + echo "".shorten($name,($length-3*$level)).""; $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Assignments&origin=$origin#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') @@ -975,7 +975,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($builder != 'builder') { - echo "".shorten($name,($length-3*$level)).""; $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Dropbox&origin=$origin#$id_in_path"; + echo "".shorten($name,($length-3*$level)).""; $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Dropbox&origin=$origin#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') { echo "
"; } @@ -1015,7 +1015,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($builder != 'builder') { echo "".shorten($name,($length-3*$level)).""; - $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Introduction_text&origin=$origin#$id_in_path"; + $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Introduction_text&origin=$origin#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') { echo ""; } @@ -1055,7 +1055,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($builder != 'builder') { - echo "".shorten($name,($length-3*$level)).""; $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Course_description&origin=$origin#$id_in_path"; + echo "".shorten($name,($length-3*$level)).""; $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Course_description&origin=$origin#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') { echo ""; } @@ -1095,7 +1095,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($builder != 'builder') { - echo "".shorten($name,($length-3*$level)).""; $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Groups&origin=$origin#$id_in_path"; + echo "".shorten($name,($length-3*$level)).""; $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Groups&origin=$origin#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') { echo ""; } @@ -1134,7 +1134,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($builder != 'builder') { - echo "".shorten($name,($length-3*$level)).""; $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Users&origin=$origin#$id_in_path"; + echo "".shorten($name,($length-3*$level)).""; $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Users&origin=$origin#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') { echo ""; } @@ -1188,7 +1188,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Agenda&origin=$origin&agenda_id=$agenda_id#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Agenda&origin=$origin&agenda_id=$agenda_id#$id_in_path"; } else { @@ -1203,7 +1203,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Ad_Valvas&origin=$origin&ann_id=$id#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Ad_Valvas&origin=$origin&ann_id=$id#$id_in_path"; } else { @@ -1222,7 +1222,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) $thelink=$myrow["url"]; if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=$linktype&origin=$origin&thelink=$thelink#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=$linktype&origin=$origin&thelink=$thelink#$id_in_path"; } else { @@ -1244,7 +1244,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Exercise&origin=$origin&exerciseId=".$myrow["id"]."#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Exercise&origin=$origin&exerciseId=".$myrow["id"]."#$id_in_path"; } else { @@ -1266,7 +1266,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=HotPotatoes&origin=$origin&id=$id#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=HotPotatoes&origin=$origin&id=$id#$id_in_path"; } else { @@ -1290,7 +1290,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) $forumparameters="forum=".$myrow["forum_id"]."&md5=".$myrow["md5"]; if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Forum&origin=$origin&forumparameters=$forumparameters#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Forum&origin=$origin&forumparameters=$forumparameters#$id_in_path"; } else { @@ -1311,7 +1311,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Thread&origin=$origin&topic=".$myrow["topic_id"]."&forum=".$myrow["forum_id"]."&md5=".$myrow["md5"]."#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Thread&origin=$origin&topic=".$myrow["topic_id"]."&forum=".$myrow["forum_id"]."&md5=".$myrow["md5"]."#$id_in_path"; } else { @@ -1343,7 +1343,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Post&origin=$origin&posternom=$posternom&posterprenom=$posterprenom&posttime=$posttime&posttext=$posttext&posttitle=$posttitle#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Post&origin=$origin&posternom=$posternom&posterprenom=$posterprenom&posttime=$posttime&posttext=$posttext&posttitle=$posttitle#$id_in_path"; } else { @@ -1365,7 +1365,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Document&origin=$origin&docurl=".$myrow["path"]."#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Document&origin=$origin&docurl=".$myrow["path"]."#$id_in_path"; } else @@ -1386,7 +1386,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) case "Assignments": if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Assignments&origin=$origin#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Assignments&origin=$origin#$id_in_path"; } else { @@ -1396,7 +1396,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) case "Dropbox": if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Dropbox&origin=$origin#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Dropbox&origin=$origin#$id_in_path"; } else { $link .= "../dropbox/index.php"; } @@ -1404,7 +1404,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) case "Introduction_text": if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Introduction_text&origin=$origin#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Introduction_text&origin=$origin#$id_in_path"; } else { $s=api_get_path('WEB_COURSE_PATH')."$_cid/index.php?intro_cmdEdit=1"; $link .= $s; @@ -1413,7 +1413,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) case "Course_description": if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Course_description&origin=$origin#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Course_description&origin=$origin#$id_in_path"; } else { $s=api_get_path('WEB_CODE_PATH')."course_description"; $link .= $s; @@ -1423,7 +1423,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Groups&origin=$origin#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Groups&origin=$origin#$id_in_path"; } else { $link .= "../group/group.php?origin=$origin"; } @@ -1431,7 +1431,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) case "Users": if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Users&origin=$origin#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Users&origin=$origin#$id_in_path"; } else { $link .= "../user/user.php?origin=$origin"; } diff --git a/main/newscorm/resourcelinker.php b/main/newscorm/resourcelinker.php index 0ed4442255..eb9f309631 100644 --- a/main/newscorm/resourcelinker.php +++ b/main/newscorm/resourcelinker.php @@ -493,7 +493,7 @@ else session_register('from_learnpath'); $interbreadcrumb[] = array ("url" => "../newscorm/lp_controller.php?action=list", "name" => get_lang('LearningPath')); $interbreadcrumb[] = array ("url" => "../newscorm/lp_controller.php?action=admin_view&lp_id=$learnpath_id", "name" => stripslashes("{$therow['name']}")); - $interbreadcrumb[] = array ("url" => $_SERVER['PHP_SELF']."?action=$action&lp_id=$learnpath_id&parent_item_id=$chapter_id&originalresource=no", "name" => "{$therow2['title']}"); + $interbreadcrumb[] = array ("url" => api_get_self()."?action=$action&lp_id=$learnpath_id&parent_item_id=$chapter_id&originalresource=no", "name" => "{$therow2['title']}"); } diff --git a/main/online/online_links.php b/main/online/online_links.php index 180d9420d4..93d410aba1 100644 --- a/main/online/online_links.php +++ b/main/online/online_links.php @@ -1,4 +1,4 @@ -".shorten($myrow["title"],($length-3*$level)).""; - $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Agenda&origin=$origin&agenda_id=$agenda_id#$id_in_path"; + $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Agenda&origin=$origin&agenda_id=$agenda_id#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') @@ -465,7 +465,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($builder != 'builder') { echo "".shorten($title,($length-3*$level)).""; - $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Ad_Valvas&origin=$origin&ann_id=$ann_id#$id_in_path"; + $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Ad_Valvas&origin=$origin&ann_id=$ann_id#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') @@ -523,7 +523,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($builder != 'builder') { echo "".shorten($myrow["title"],($length-3*$level)).""; - $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=$linktype&origin=$origin&thelink=$thelink#$id_in_path"; + $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=$linktype&origin=$origin&thelink=$thelink#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') @@ -578,7 +578,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($builder != 'builder') { echo "".shorten($myrow["title"],($length-3*$level)).""; - $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Exercise&origin=$origin&exerciseId=".$myrow["id"]."#$id_in_path"; + $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Exercise&origin=$origin&exerciseId=".$myrow["id"]."#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') @@ -636,7 +636,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($builder != 'builder') { echo "".shorten($name,($length-3*$level)).""; - $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=HotPotatoes&origin=$origin&id=$id#$id_in_path"; + $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=HotPotatoes&origin=$origin&id=$id#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') @@ -686,7 +686,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($builder != 'builder') { echo "".shorten($myrow["forum_name"],($length-3*$level)).""; - $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Forum&origin=$origin&forumparameters=$forumparameters#$id_in_path"; + $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Forum&origin=$origin&forumparameters=$forumparameters#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') @@ -738,7 +738,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($builder != 'builder') { echo "".shorten($myrow["topic_title"],($length-3*$level)).""; - $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Thread&origin=$origin&topic=".$myrow["topic_id"]."&forum=".$myrow["forum_id"]."&md5=".$myrow["md5"]."#$id_in_path"; + $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Thread&origin=$origin&topic=".$myrow["topic_id"]."&forum=".$myrow["forum_id"]."&md5=".$myrow["md5"]."#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') @@ -801,7 +801,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($icon == 'icon') { echo "forum"; } if ($builder != 'builder') { - echo "".shorten($myrow_titel["post_title"],($length-3*$level)).""; $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Post&origin=$origin&posternom=$posternom&posterprenom=$posterprenom&posttime=$posttime&posttext=$posttext&posttitle=$posttitle#$id_in_path"; + echo "".shorten($myrow_titel["post_title"],($length-3*$level)).""; $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Post&origin=$origin&posternom=$posternom&posterprenom=$posterprenom&posttime=$posttime&posttext=$posttext&posttitle=$posttitle#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') @@ -868,7 +868,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ { echo "
     ".shorten($desc,($length-3*$level))."
"; } - } $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Document&origin=$origin&docurl=".$myrow["path"]."#$id_in_path"; + } $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Document&origin=$origin&docurl=".$myrow["path"]."#$id_in_path"; } else { @@ -914,7 +914,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($icon == 'icon') { echo ""; } if ($builder != 'builder') { - echo "".shorten($name,($length-3*$level)).""; $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Assignments&origin=$origin#$id_in_path"; + echo "".shorten($name,($length-3*$level)).""; $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Assignments&origin=$origin#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') @@ -958,7 +958,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($builder != 'builder') { - echo "".shorten($name,($length-3*$level)).""; $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Dropbox&origin=$origin#$id_in_path"; + echo "".shorten($name,($length-3*$level)).""; $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Dropbox&origin=$origin#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') { echo ""; } @@ -996,7 +996,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($builder != 'builder') { echo "".shorten($name,($length-3*$level)).""; - $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Introduction_text&origin=$origin#$id_in_path"; + $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Introduction_text&origin=$origin#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') { echo ""; } @@ -1034,7 +1034,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($builder != 'builder') { - echo "".shorten($name,($length-3*$level)).""; $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Course_description&origin=$origin#$id_in_path"; + echo "".shorten($name,($length-3*$level)).""; $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Course_description&origin=$origin#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') { echo ""; } @@ -1072,7 +1072,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($builder != 'builder') { - echo "".shorten($name,($length-3*$level)).""; $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Groups&origin=$origin#$id_in_path"; + echo "".shorten($name,($length-3*$level)).""; $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Groups&origin=$origin#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') { echo ""; } @@ -1109,7 +1109,7 @@ function display_addedresource_link_in_learnpath($type, $id, $completed, $id_in_ if ($builder != 'builder') { - echo "".shorten($name,($length-3*$level)).""; $items[]=$_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Users&origin=$origin#$id_in_path"; + echo "".shorten($name,($length-3*$level)).""; $items[]=api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Users&origin=$origin#$id_in_path"; if ($desc != '') { if ($icon != 'wrap') { echo ""; } @@ -1162,7 +1162,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Agenda&origin=$origin&agenda_id=$agenda_id#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Agenda&origin=$origin&agenda_id=$agenda_id#$id_in_path"; } else { @@ -1177,7 +1177,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Ad_Valvas&origin=$origin&ann_id=$id#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Ad_Valvas&origin=$origin&ann_id=$id#$id_in_path"; } else { @@ -1196,7 +1196,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) $thelink=$myrow["url"]; if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=$linktype&origin=$origin&thelink=$thelink#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=$linktype&origin=$origin&thelink=$thelink#$id_in_path"; } else { @@ -1218,7 +1218,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Exercise&origin=$origin&exerciseId=".$myrow["id"]."#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Exercise&origin=$origin&exerciseId=".$myrow["id"]."#$id_in_path"; } else { @@ -1240,7 +1240,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=HotPotatoes&origin=$origin&id=$id#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=HotPotatoes&origin=$origin&id=$id#$id_in_path"; } else { @@ -1264,7 +1264,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) $forumparameters="forum=".$myrow["forum_id"]."&md5=".$myrow["md5"]; if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Forum&origin=$origin&forumparameters=$forumparameters#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Forum&origin=$origin&forumparameters=$forumparameters#$id_in_path"; } else { @@ -1285,7 +1285,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Thread&origin=$origin&topic=".$myrow["topic_id"]."&forum=".$myrow["forum_id"]."&md5=".$myrow["md5"]."#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Thread&origin=$origin&topic=".$myrow["topic_id"]."&forum=".$myrow["forum_id"]."&md5=".$myrow["md5"]."#$id_in_path"; } else { @@ -1317,7 +1317,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Post&origin=$origin&posternom=$posternom&posterprenom=$posterprenom&posttime=$posttime&posttext=$posttext&posttitle=$posttitle#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Post&origin=$origin&posternom=$posternom&posterprenom=$posterprenom&posttime=$posttime&posttext=$posttext&posttitle=$posttitle#$id_in_path"; } else { @@ -1339,7 +1339,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Document&origin=$origin&docurl=".$myrow["path"]."#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Document&origin=$origin&docurl=".$myrow["path"]."#$id_in_path"; } else @@ -1360,7 +1360,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) case "Assignments": if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Assignments&origin=$origin#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Assignments&origin=$origin#$id_in_path"; } else { @@ -1370,7 +1370,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) case "Dropbox": if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Dropbox&origin=$origin#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Dropbox&origin=$origin#$id_in_path"; } else { $link .= "../dropbox/index.php"; } @@ -1378,7 +1378,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) case "Introduction_text": if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Introduction_text&origin=$origin#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Introduction_text&origin=$origin#$id_in_path"; } else { $s=api_get_path('WEB_COURSE_PATH')."$_cid/index.php?intro_cmdEdit=1"; $link .= $s; @@ -1387,7 +1387,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) case "Course_description": if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Course_description&origin=$origin#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Course_description&origin=$origin#$id_in_path"; } else { $s=api_get_path('WEB_CODE_PATH')."course_description"; $link .= $s; @@ -1397,7 +1397,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Groups&origin=$origin#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Groups&origin=$origin#$id_in_path"; } else { $link .= "../group/group.php?origin=$origin"; } @@ -1405,7 +1405,7 @@ function get_addedresource_link_in_learnpath($type, $id, $id_in_path) case "Users": if ($builder != 'builder') { - $link .= $_SERVER['PHP_SELF']."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Users&origin=$origin#$id_in_path"; + $link .= api_get_self()."?action=closelesson&source_forum=".$_GET['source_forum']."&how=complete&id_in_path=$id_in_path&learnpath_id=$learnpath_id&type=Users&origin=$origin#$id_in_path"; } else { $link .= "../user/user.php?origin=$origin"; } diff --git a/main/resourcelinker/resourcelinker.php b/main/resourcelinker/resourcelinker.php index 5d09723095..1c86da84d1 100644 --- a/main/resourcelinker/resourcelinker.php +++ b/main/resourcelinker/resourcelinker.php @@ -414,7 +414,7 @@ else session_register('from_learnpath'); $interbreadcrumb[] = array ("url" => "../scorm/scormdocument.php", "name" => get_lang('LearningPath')); $interbreadcrumb[] = array ("url" => "../learnpath/learnpath_handler.php?learnpath_id=$learnpath_id", "name" => "{$therow['learnpath_name']}"); - $interbreadcrumb[] = array ("url" => $_SERVER['PHP_SELF']."?action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no", "name" => "{$therow2['chapter_name']}"); + $interbreadcrumb[] = array ("url" => api_get_self()."?action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no", "name" => "{$therow2['chapter_name']}"); } diff --git a/main/survey/create_new_survey.php b/main/survey/create_new_survey.php index eb31b96bcd..d3dc0e5625 100644 --- a/main/survey/create_new_survey.php +++ b/main/survey/create_new_survey.php @@ -21,7 +21,7 @@ * @package dokeos.survey * @author unknown, the initial survey that did not make it in 1.8 because of bad code * @author Patrick Cool , Ghent University: cleanup, refactoring and rewriting large parts (if not all) of the code -* @version $Id: create_new_survey.php 12106 2007-04-24 13:17:19Z elixir_julian $ +* @version $Id: create_new_survey.php 12272 2007-05-03 14:40:45Z elixir_julian $ * * @todo only the available platform languages should be used => need an api get_languages and and api_get_available_languages (or a parameter) */ @@ -108,7 +108,7 @@ else } // initiate the object -$form = new FormValidator('survey', 'post', $_SERVER['PHP_SELF'].'?action='.$_GET['action'].'&survey_id='.$_GET['survey_id']); +$form = new FormValidator('survey', 'post', api_get_self().'?action='.$_GET['action'].'&survey_id='.$_GET['survey_id']); // settting the form elements if ($_GET['action'] == 'edit' AND isset($_GET['survey_id']) AND is_numeric($_GET['survey_id'])) diff --git a/main/survey/survey_invite.php b/main/survey/survey_invite.php index 4e07f2b437..3380241968 100644 --- a/main/survey/survey_invite.php +++ b/main/survey/survey_invite.php @@ -84,7 +84,7 @@ if (mysql_num_rows($result) > 1) } // building the form for publishing the survey -$form = new FormValidator('publish_form','post', $_SERVER['PHP_SELF'].'?survey_id='.$_GET['survey_id']); +$form = new FormValidator('publish_form','post', api_get_self().'?survey_id='.$_GET['survey_id']); // Course users $complete_user_list = CourseManager :: get_user_list_from_course_code($_course['id'], true, $_SESSION['id_session']); $possible_users = array (); diff --git a/main/tracking/courseLogCSV.php b/main/tracking/courseLogCSV.php index 0017304d59..a537bbb07f 100644 --- a/main/tracking/courseLogCSV.php +++ b/main/tracking/courseLogCSV.php @@ -98,7 +98,7 @@ if($view=="0001000") $nameTools=get_lang('LinksAccess'); if($view=="0000100") $nameTools=get_lang('DocumentsAccess'); if($view=="00000010") $nameTools=get_lang('ScormAccess'); -$interbreadcrumb[] = array ("url" => $_SERVER['PHP_SELF']."?view=0000000", "name" => get_lang('ToolName')); +$interbreadcrumb[] = array ("url" => api_get_self()."?view=0000000", "name" => get_lang('ToolName')); include(api_get_path(LIBRARY_PATH)."statsUtils.lib.inc.php"); include("../resourcelinker/resourcelinker.inc.php"); diff --git a/main/work/work.php b/main/work/work.php index 89b4c151ee..5458c52903 100644 --- a/main/work/work.php +++ b/main/work/work.php @@ -23,7 +23,7 @@ * @author Patrick Cool , Ghent University - ability for course admins to specify wether uploaded documents are visible or invisible by default. * @author Roan Embrechts, code refactoring and virtual course support * @author Frederic Vauthier, directories management -* @version $Id: work.php 12263 2007-05-03 13:34:40Z elixir_julian $ +* @version $Id: work.php 12272 2007-05-03 14:40:45Z elixir_julian $ * * @todo refactor more code into functions, use quickforms, coding standards, ... */ @@ -817,7 +817,7 @@ if ($_POST['submitWork'] && $succeed &&!$id) //last value is to check this is no require_once (api_get_path(LIBRARY_PATH).'formvalidator/FormValidator.class.php'); require_once (api_get_path(LIBRARY_PATH).'fileDisplay.lib.php'); - $form = new FormValidator('form','POST',$_SERVER['PHP_SELF']."?curdirpath=$cur_dir_path&origin=$origin",'','enctype="multipart/form-data"'); + $form = new FormValidator('form','POST',api_get_self()."?curdirpath=$cur_dir_path&origin=$origin",'','enctype="multipart/form-data"'); if(!empty($error_message)) Display::display_error_message($error_message);
  ".shorten($desc,($length-3*$level))."
  ".shorten($desc,($length-3*$level))."
  ".shorten($desc,($length-3*$level))."
  ".shorten($desc,($length-3*$level))."
  ".shorten($desc,($length-3*$level))."
  ".shorten($desc,($length-3*$level))."
  ".shorten($desc,($length-3*$level))."
  ".shorten($desc,($length-3*$level))."
  ".shorten($desc,($length-3*$level))."
  ".shorten($desc,($length-3*$level))."