php js css php js css

Changes

Changes to Page: placement-tests

64768
Today 2:07am
System
Modified page
72498
Today 2:07am

Modified page
Order:
Id:
/placement-tests/
/placement-tests/
Title:
Placement Tests
Placement Tests
Content:
<h1>Placement Tests</h1>

<ss:logic:if test="$_GET['from_cart']">
<p style="color: #b00;">You have been redirected on this page because the course you are trying to enroll in has level requirements. If you believe this is a mistake, please contact us. </p>
</ss:logic:if>

<ss:logic:if test="!(\Components\Customers\Contacts::currentIsLoggedIn())" evaluateat="render">
<div style="float: right; width: 50%;">
<div style="padding-left: 20px;">
<h2>Existing Customer?</h2>
<p>If you already have an account, login below.</p>

<ss:logic:include page="/community/login/form_include/" />
</div>
</div>

<div style="float: left; width: 50%">
<h2>New Customer?</h2>
<p>You will need to fill in some details.</p>

<ss:logic:include page="/community/register/form_include/" />
</div>
</ss:logic:if>
<ss:logic:else test="\Components\AF\PlacementTests::getLastNonHandledSubmissionForContact(\Components\Customers\Contacts::currentContactId())">

<ss:logic:variable as="test_and_submission" value="[? \Components\AF\PlacementTests::getLastNonHandledSubmissionForContact(\Components\Customers\Contacts::currentContactId()) ?]" />

<ss:logic:variable as="test" value="[? $test_and_submission[0] ?]" />
<ss:logic:variable as="submission" value="[? $test_and_submission[1] ?]" />

<h2>Welcome back [? \Components\Customers\Contacts::currentGetColumn('contact_first_name') ?] [? \Components\Customers\Contacts::currentGetColumn('contact_last_name') ?]</h2>

You have already completed a placement test. It now needs to be reviewed, and you will be contacted shortly by a teacher to finalise your level.
<br />Please complete <a href="/community/profile/">your profile</a> and you should receive a phone call in two working days.

<br /><br />Assessment: [? $test['placement_test_title'] ?]
<br />Assessment Date: [? formatDate($submission['submission_date']) ?]
</ss:logic:else>
<ss:logic:else>

[? \Framework\Assets\CSS::includeHead('http://yui.yahooapis.com/pure/0.5.0/buttons-min.css') ?]
[? \Framework\Assets\CSS::includeHead('/_public/Components/AF/PlacementTests/radiogroup.css') ?]

<p>
To help us determine which course is the right one for you, please take a few minutes to assess yourself by selecting a level from the table below. This will lead you to a short evaluation.
<p>
<strong>Why do I need to take an evaluation?</strong><br />
The placement assessment was constructed to determine your level of French. Although it may look difficult at first sight, do not worry. It has been designed to recreate realistic daily situations in France. It will help to place you in the course best suited to your abilities, allowing you to improve quickly.
</p>

<p>
<strong>How long will it take?</strong><br />
It should not take you more than 10-15 minutes. All you need to do is follow the instructions.
<br /><br />If necessary, click on <a class="button-error pure-button" href="javascript: return false;">Stop! It's too difficult!</a> or <a class="button-warning pure-button" href="javascript: return false;">Stop! It's too easy!</a>.
</p>

<p>Good luck!</p>

<style type="text/css">
.accordionMenu .header
{
padding: 20px;
color: #fff;
font-size: 16pt;
display: block;
}

.accordionMenu .accordionItem { display: none; margin: 5px; padding: 15px; border: 1px solid #ccc; border-radius: 5px; }
.cke_editable .accordionMenu .accordionItem { display: block; }

.accordionMenu .test
{
line-height: 160%;
width: 50%;
float: left;
margin-bottom: 25px;
}

</style>

<script type="text/javascript">
(function($) {
$(document).ready(function(){
$('div.accordionMenu>a').on('click', function(e) {
$(this).next('div.accordionItem').fadeToggle();
return false;
});
});
})(jQuery);
</script>

<ss:logic:if test="$_GET['age_group_id'] && $_GET['type_id']">
<ss:logic:variable as="sets" value="[? [\Components\AF\PlacementTests\Sets::getForAgeGroupAndType($_GET['age_group_id'], $_GET['type_id'])] ?]" />
</ss:logic:if>
<ss:logic:else>
<ss:logic:variable as="sets" value="[? \Components\AF\PlacementTests\Sets::getAll() ?]" />
</ss:logic:else>

<ss:data:repeater datasource="$sets" as="set">

<h2>[? $set['placement_test_set_title'] ?]</h2>

<ss:logic:variable as="set_placement_submission" value="[? \Components\AF\PlacementTests::getPlacementForContact(\Components\Customers\Contacts::currentContactId(), $set['placement_test_set_id']) ?]" />
<ss:logic:variable as="level" value="[? $set_placement_submission ? getLevelsForPlacement($set_placement_submission['level_id'], $set['placement_test_set_id']) : null ?]" />

<ss:logic:if test="$set_placement_submission && $level">
<ss:logic:variable as="age_group_id" value="[? \Components\AF\Courses\Configuration\Levels::determineAgeGroupIdForLevel($level['level_id']) ?]" />

<div style="border: 1px solid #ccc; padding: 10px; margin: 15px;">

<strong>Congratulations! You can enroll in courses for this level:</strong>
<h1 style="margin-top: 2px">[? \Components\AF\Courses\Configuration\Levels::getColumn(intval($level['level_id']), 'level_name') ?]...</h1>
<p>Thank you for taking the test!</p>
<ul>
<li><big><a href="/af/course-selector/?age_group_id=[? $age_group_id ?]&amp;level_id=[? intval($level['level_id']) ?]&amp;step_order=agegroup,level">Click Here to Continue to Order a Course &gt;</a></big></li>
</ul>
</div>
</ss:logic:if>
<ss:logic:else>

<ss:logic:variable as="set_categories" value="[? \Components\AF\PlacementTests\Categories::getAllForSet($set['placement_test_set_id']) ?]" />

<ss:logic:if test="count($set_categories)">

<div class="accordionMenu">
<ss:data:repeater datasource="$set_categories" as="category">
<a href="#" class="header" style="background: [? $category['placement_test_category_colour'] ?]">
<span style="float: right; display: inline-block;">
[? $category['placement_test_category_description'] ?]
</span>
[? $category['placement_test_category_title'] ?]
</a>
<div class="accordionItem">
<ss:data:repeater datasource="\Components\AF\PlacementTests::getAll()" as="test" emptymessage="No tests configured for this level." datafilter="[? ['placement_test_category_id', '=', $category['placement_test_category_id']] ?]">
<div class="test">
<big><strong>[? $test['placement_test_title'] ?]</strong></big><br />
&bull; [? str_replace('<br />', '<br />&bull; ', nl2br(str_replace('<br />', '', $test['placement_test_description']))) ?]<br /><br />
<a class="button-error" style="background-color: #333;" href="[? \Components\AF\PlacementTests::getQuery($test['page_id']) ?]">Start at This Level</a>
</div>
</ss:data:repeater>
<div style="clear: both;"></div>
</div>

<br />
</ss:data:repeater>
</div>
</ss:logic:if>

</ss:logic:else>
</ss:data:repeater>
</ss:logic:else>
<h1>Placement Tests</h1>

<ss:logic:if test="$_GET['from_cart']">
<p style="color: #b00;">You have been redirected on this page because the course you are trying to enroll in has level requirements. If you believe this is a mistake, please contact us. </p>
</ss:logic:if>

<ss:logic:if test="!(\Components\Customers\Contacts::currentIsLoggedIn())" evaluateat="render">
<div style="float: right; width: 50%;">
<div style="padding-left: 20px;">
<h2>Existing Customer?</h2>
<p>If you already have an account, login below.</p>

<ss:logic:include page="/community/login/form_include/" />
</div>
</div>

<div style="float: left; width: 50%">
<h2>New Customer?</h2>
<p>You will need to fill in some details.</p>

<ss:logic:include page="/community/register/form_include/" />
</div>
</ss:logic:if>
<ss:logic:else test="\Components\AF\PlacementTests::getLastNonHandledSubmissionForContact(\Components\Customers\Contacts::currentContactId())">

<ss:logic:variable as="test_and_submission" value="[? \Components\AF\PlacementTests::getLastNonHandledSubmissionForContact(\Components\Customers\Contacts::currentContactId()) ?]" />

<ss:logic:variable as="test" value="[? $test_and_submission[0] ?]" />
<ss:logic:variable as="submission" value="[? $test_and_submission[1] ?]" />

<h2>Welcome back [? \Components\Customers\Contacts::currentGetColumn('contact_first_name') ?] [? \Components\Customers\Contacts::currentGetColumn('contact_last_name') ?]</h2>

You have already completed a placement test. It now needs to be reviewed, and you will be contacted shortly by a teacher to finalise your level.
<br />Please complete <a href="/community/profile/">your profile</a> and you should receive a phone call in two working days.

<br /><br />Assessment: [? $test['placement_test_title'] ?]
<br />Assessment Date: [? formatDate($submission['submission_date']) ?]
</ss:logic:else>
<ss:logic:else>

[? \Framework\Assets\CSS::includeHead('http://yui.yahooapis.com/pure/0.5.0/buttons-min.css') ?]
[? \Framework\Assets\CSS::includeHead('/_public/Components/AF/PlacementTests/radiogroup.css') ?]

<p>
To help us determine which course is the right one for you, please take a few minutes to assess yourself by selecting a level from the table below. This will lead you to a short evaluation.
<p>
<strong>Why do I need to take an evaluation?</strong><br />
The placement assessment was constructed to determine your level of French. Although it may look difficult at first sight, do not worry. It has been designed to recreate realistic daily situations in France. It will help to place you in the course best suited to your abilities, allowing you to improve quickly.
</p>

<p>
<strong>How long will it take?</strong><br />
It should not take you more than 10-15 minutes. All you need to do is follow the instructions.
<br /><br />If necessary, click on <a class="button-error pure-button" href="javascript: return false;">Stop! It's too difficult!</a> or <a class="button-warning pure-button" href="javascript: return false;">Stop! It's too easy!</a>.
</p>

<p>Good luck!</p>

<style type="text/css">
.accordionMenu .header
{
padding: 20px;
color: #fff;
font-size: 16pt;
display: block;
}

.accordionMenu .accordionItem { display: none; margin: 5px; padding: 15px; border: 1px solid #ccc; border-radius: 5px; }
.cke_editable .accordionMenu .accordionItem { display: block; }

.accordionMenu .test
{
line-height: 160%;
width: 50%;
float: left;
margin-bottom: 25px;
}

</style>

<script type="text/javascript">
(function($) {
$(document).ready(function(){
$('div.accordionMenu>a').on('click', function(e) {
$(this).next('div.accordionItem').fadeToggle();
return false;
});
});
})(jQuery);
</script>

<ss:logic:if test="$_GET['age_group_id'] && $_GET['type_id']">
<ss:logic:variable as="sets" value="[? [\Components\AF\PlacementTests\Sets::getForAgeGroupAndType($_GET['age_group_id'], $_GET['type_id'])] ?]" />
</ss:logic:if>
<ss:logic:else>
<ss:logic:variable as="sets" value="[? \Components\AF\PlacementTests\Sets::getAll() ?]" />
</ss:logic:else>

<ss:data:repeater datasource="$sets" as="set">

<h2>[? $set['placement_test_set_title'] ?]</h2>

<ss:logic:variable as="set_placement_submission" value="[? \Components\AF\PlacementTests::getPlacementForContact(\Components\Customers\Contacts::currentContactId(), $set['placement_test_set_id']) ?]" />
<ss:logic:variable as="level" value="[? $set_placement_submission ? getLevelsForPlacement($set_placement_submission['level_id'], $set['placement_test_set_id']) : null ?]" />

<ss:logic:if test="$set_placement_submission && $level">
<ss:logic:variable as="age_group_id" value="[? \Components\AF\Courses\Configuration\Levels::determineAgeGroupIdForLevel($level['level_id']) ?]" />

<div style="border: 1px solid #ccc; padding: 10px; margin: 15px;">

<strong>Congratulations! You can enroll in courses for this level:</strong>
<h1 style="margin-top: 2px">[? \Components\AF\Courses\Configuration\Levels::getColumn(intval($level['level_id']), 'level_name') ?]...</h1>
<p>Thank you for taking the test!</p>
<ul>
<li><big><a href="/af/course-selector/?age_group_id=[? $age_group_id ?]&amp;level_id=[? intval($level['level_id']) ?]&amp;step_order=agegroup,level">Click Here to Continue to Order a Course &gt;</a></big></li>
</ul>
</div>
</ss:logic:if>
<ss:logic:else>

<ss:logic:variable as="set_categories" value="[? \Components\AF\PlacementTests\Categories::getAllForSet($set['placement_test_set_id']) ?]" />

<ss:logic:if test="count($set_categories)">

<div class="accordionMenu">
<ss:data:repeater datasource="$set_categories" as="category">
<a href="#" class="header" style="background: [? $category['placement_test_category_colour'] ?]">
<span style="float: right; display: inline-block;">
[? $category['placement_test_category_description'] ?]
</span>
[? $category['placement_test_category_title'] ?]
</a>
<div class="accordionItem">
<ss:data:repeater datasource="\Components\AF\PlacementTests::getAll()" as="test" emptymessage="No tests configured for this level." datafilter="[? ['placement_test_category_id', '=', $category['placement_test_category_id']] ?]">
<div class="test">
<big><strong>[? $test['placement_test_title'] ?]</strong></big><br />
&bull; [? str_replace('<br />', '<br />&bull; ', nl2br(str_replace('<br />', '', $test['placement_test_description']))) ?]<br /><br />
<a class="button-error" style="background-color: #333;" href="[? \Components\AF\PlacementTests::getQuery($test['page_id']) ?]">Start at This Level</a>
</div>
</ss:data:repeater>
<div style="clear: both;"></div>
</div>

<br />
</ss:data:repeater>
</div>
</ss:logic:if>

</ss:logic:else>
</ss:data:repeater>
</ss:logic:else>
Content Additional:

															

														
Css:

															

														
Js:

															

														
Php Source:
<?php

\Framework\Assets\JavaScript::includeJQuery(true);


function getLevelsForPlacement($iPlacementTestLevelId, $iPlacementTestSetId)
{
// Get level from the form submission
$arrPlacementLevel = \Components\AF\Courses\Configuration\Levels::get($iPlacementTestLevelId);

// But we must also check to ensure a more recent placement hasn't occurred
$arrLevels = \Components\AF\Students\Levels::historyGetCurrentLevelsForContact(\Components\Customers\Contacts::currentContactId());

foreach ($arrLevels as $arrHistoryLevel)
{
if ($arrHistoryLevel['level_id'] == $iPlacementTestLevelId)
{
if ($arrHistoryLevel['level_status'] == 'passed' && count($arrHistoryLevel['next_levels']))
{
return \Components\AF\Courses\Configuration\Levels::get($arrHistoryLevel['next_levels'][0]);
}

break;
}
}

return $arrPlacementLevel;

}

?>
<?php

\Framework\Assets\JavaScript::includeJQuery(true);


function getLevelsForPlacement($iPlacementTestLevelId, $iPlacementTestSetId)
{
// Get level from the form submission
$arrPlacementLevel = \Components\AF\Courses\Configuration\Levels::get($iPlacementTestLevelId);

// But we must also check to ensure a more recent placement hasn't occurred
$arrLevels = \Components\AF\Students\Levels::historyGetCurrentLevelsForContact(\Components\Customers\Contacts::currentContactId());

foreach ($arrLevels as $arrHistoryLevel)
{
if ($arrHistoryLevel['level_id'] == $iPlacementTestLevelId)
{
if ($arrHistoryLevel['level_status'] == 'passed' && count($arrHistoryLevel['next_levels']))
{
return \Components\AF\Courses\Configuration\Levels::get($arrHistoryLevel['next_levels'][0]);
}

break;
}
}

return $arrPlacementLevel;

}

?>
Accept Child 404:
0
0
Search Title:

															

														
Search Title Prefix:

															

														
Search Description:

															

														
Search Keywords:

															

														
Search Noindex:
0
0
Search Nofollow:
0
0
Search Change Frequency:

															

														
Search Priority:
0.5
0.5
Search Canonical Override:

															

														
Is Offline:
0
0
Is Hidden In Navigation:
1
1
Is Hidden In Sitemap:
0
0
Security New:
0
0
Security Contact Mode:

															

														
Security Contact Squeeze Viewlimit:

															

														
Security Contact Require Login:

															

														
Security Contact Groups:

															

														
Security Condition Id:

															

														
Security Heading:

															

														
Security Description:

															

														
Other Fields:

															

														
Parent Id:
/
/
Contact Id:
0
0
Design Id:
0
0
Header Functions:

															

														
Header Category:

															

														
Is Domain:
0
0