<?php
set_time_limit(10);
\Framework\Assets\JavaScript::includeJQuery(true);
function getRemainingSteps($arrVisibleSteps)
{
$arrRemainingSteps = array();
foreach(\Framework\AF\CourseSelector::getAvailableSteps() as $arrStep)
{
if(!in_array($arrStep, $arrVisibleSteps))
{
$arrRemainingSteps[] = $arrStep;
}
}
return $arrRemainingSteps;
}
function getRealLength($strVar)
{
// Because of a bug in the HTML Editor inserting the ​ character
return strlen(trim(strip_tags(str_replace('​', '', $strVar))));
}
function urlCleanup($arrCurrentStep)
{
$iInitialCount = count($_GET);
if($iInitialCount)
{
$arrParametersToClean = array('new_student', 'needs_test', 'reenroll');
if($arrCurrentStep && $arrCurrentStep['step_title'] !== 'Level' && \Components\AF\Courses\Configuration\Levels::configGetValue('course_selector_use_placement_page'))
{
foreach($arrParametersToClean as $strParameter)
{
if(array_key_exists($strParameter, $_GET))
{
unset($_GET[$strParameter]);
}
}
if(count($_GET) !== $iInitialCount)
{
$arrQueryString = array();
foreach($_GET as $strKey => $strValue)
{
$arrQueryString[] = urlencode($strKey) . '=' . urlencode($strValue);
}
$strQueryString = '';
if(count($arrQueryString))
{
$strQueryString = '?' . implode('&', $arrQueryString);
}
\Framework\HTTP\Redirection::redirect(\Components\Website\Pages::currentPageId() . $strQueryString);
}
}
}
}
?>
<?php
set_time_limit(10);
\Framework\Assets\JavaScript::includeJQuery(true);
function getRemainingSteps($arrVisibleSteps)
{
$arrRemainingSteps = array();
foreach(\Framework\AF\CourseSelector::getAvailableSteps() as $arrStep)
{
if(!in_array($arrStep, $arrVisibleSteps))
{
$arrRemainingSteps[] = $arrStep;
}
}
return $arrRemainingSteps;
}
function getRealLength($strVar)
{
// Because of a bug in the HTML Editor inserting the ​ character
return strlen(trim(strip_tags(str_replace('​', '', $strVar))));
}
function urlCleanup($arrCurrentStep)
{
$iInitialCount = count($_GET);
if($iInitialCount)
{
$arrParametersToClean = array('new_student', 'needs_test', 'reenroll');
if($arrCurrentStep && $arrCurrentStep['step_title'] !== 'Level' && \Components\AF\Courses\Configuration\Levels::configGetValue('course_selector_use_placement_page'))
{
foreach($arrParametersToClean as $strParameter)
{
if(array_key_exists($strParameter, $_GET))
{
unset($_GET[$strParameter]);
}
}
if(count($_GET) !== $iInitialCount)
{
$arrQueryString = array();
foreach($_GET as $strKey => $strValue)
{
$arrQueryString[] = urlencode($strKey) . '=' . urlencode($strValue);
}
$strQueryString = '';
if(count($arrQueryString))
{
$strQueryString = '?' . implode('&', $arrQueryString);
}
\Framework\HTTP\Redirection::redirect(\Components\Website\Pages::currentPageId() . $strQueryString);
}
}
}
}
?>