Internal: add plugins from 1.11.x

pull/3544/head
Julio Montoya 5 years ago
parent 2d9a224732
commit 72f508658e
  1. 1
      public/plugin/exercise_signature/README.md
  2. 1
      public/plugin/exercise_signature/index.php
  3. 9
      public/plugin/exercise_signature/install.php
  4. 12
      public/plugin/exercise_signature/lang/english.php
  5. 12
      public/plugin/exercise_signature/lang/french.php
  6. 11
      public/plugin/exercise_signature/lang/spanish.php
  7. 206
      public/plugin/exercise_signature/lib/ExerciseSignature.php
  8. 5
      public/plugin/exercise_signature/plugin.php
  9. 9
      public/plugin/exercise_signature/uninstall.php
  10. 10
      public/plugin/positioning/README.md
  11. BIN
      public/plugin/positioning/img/positioning-line.png
  12. 810
      public/plugin/positioning/img/positioning-line.svg
  13. 1
      public/plugin/positioning/index.php
  14. 7
      public/plugin/positioning/install.php
  15. 20
      public/plugin/positioning/lang/english.php
  16. 20
      public/plugin/positioning/lang/french.php
  17. 20
      public/plugin/positioning/lang/spanish.php
  18. 7
      public/plugin/positioning/plugin.php
  19. 235
      public/plugin/positioning/src/Positioning.php
  20. 151
      public/plugin/positioning/start.php
  21. 108
      public/plugin/positioning/start_student.php
  22. 7
      public/plugin/positioning/uninstall.php
  23. 10
      public/plugin/positioning/view/start.tpl
  24. 25
      public/plugin/positioning/view/start_student.tpl

@ -0,0 +1 @@
Students can sign exercise results.

@ -0,0 +1,9 @@
<?php
/* For license terms, see /license.txt */
if (!api_is_platform_admin()) {
die('You must have admin permissions to install plugins');
}
ExerciseSignaturePlugin::create()->install();

@ -0,0 +1,12 @@
<?php
/* License: see /license.txt */
// Needed in order to show the plugin title
$strings['plugin_title'] = "Exercise signature";
$strings['plugin_comment'] = "";
$strings['tool_enable'] = 'Tool enabled';
$strings['ProvideASignatureFirst'] = 'Please provide a signature first';
$strings['Sign'] = 'Sign';
$strings['SignatureActivated'] = 'Signature activated';
$strings['SignatureMandatory'] = 'Signature mandatory';

@ -0,0 +1,12 @@
<?php
/* License: see /license.txt */
// Needed in order to show the plugin title
$strings['plugin_title'] = "Exercice signature";
$strings['plugin_comment'] = "";
$strings['tool_enable'] = 'Activer le plugin';
$strings['Sign'] = 'Signer';
$strings['ProvideASignatureFirst'] = "Veuillez d'abord fournir une signature";
$strings['SignatureActivated'] = 'Signature activée';
$strings['SignatureMandatory'] = 'Signature obligatoire';

@ -0,0 +1,11 @@
<?php
/* License: see /license.txt */
// Needed in order to show the plugin title
$strings['plugin_title'] = "Exercise signature";
$strings['plugin_comment'] = "";
$strings['tool_enable'] = 'Activar plugin';
$strings['Sign'] = 'Firmar';
$strings['ProvideASignatureFirst'] = "Primero ingrese una firma";
$strings['SignatureActivated'] = 'Firma activada';

@ -0,0 +1,206 @@
<?php
/* For licensing terms, see /license.txt */
class ExerciseSignaturePlugin extends Plugin
{
public function __construct()
{
parent::__construct(
'0.1',
'Julio Montoya',
[
'tool_enable' => 'boolean',
]
);
$this->isAdminPlugin = true;
}
/**
* @return $this
*/
public static function create()
{
static $instance = null;
return $instance ? $instance : $instance = new self();
}
public static function exerciseHasSignatureActivated(Exercise $exercise)
{
if (empty($exercise->iId)) {
return false;
}
if ('true' === api_get_plugin_setting('exercise_signature', 'tool_enable')) {
$extraFieldValue = new ExtraFieldValue('exercise');
$result = $extraFieldValue->get_values_by_handler_and_field_variable($exercise->iId, 'signature_activated');
if ($result && isset($result['value']) && 1 === (int) $result['value']) {
return true;
}
}
return false;
}
public static function saveSignature($userId, $trackInfo, $file)
{
if (false === self::validateSignatureAccess($userId, $trackInfo)) {
return false;
}
$signature = self::getSignature($userId, $trackInfo);
if (false !== $signature) {
return false;
}
if (empty($file)) {
return false;
}
$params = [
'item_id' => $trackInfo['exe_id'],
'extra_signature' => $file,
];
$extraFieldValue = new ExtraFieldValue('track_exercise');
$extraFieldValue->saveFieldValues(
$params,
true
);
$signature = self::getSignature($userId, $trackInfo);
if (false !== $signature) {
return true;
}
return true;
}
public static function validateSignatureAccess($userId, $trackInfo)
{
$userId = (int) $userId;
if (isset($trackInfo['exe_id']) && isset($trackInfo['exe_user_id']) &&
!empty($trackInfo['exe_id']) && !empty($trackInfo['exe_user_id']) &&
$trackInfo['status'] !== 'incomplete'
) {
if ($userId === (int) $trackInfo['exe_user_id']) {
return true;
}
}
return false;
}
public static function getSignature($userId, $trackInfo)
{
if (false === self::validateSignatureAccess($userId, $trackInfo)) {
return false;
}
$extraFieldValue = new ExtraFieldValue('track_exercise');
$result = $extraFieldValue->get_values_by_handler_and_field_variable($trackInfo['exe_id'], 'signature');
if ($result && isset($result['value']) && !empty($result['value'])) {
return $result['value'];
}
return false;
}
/**
* Get the plugin Name.
*
* @return string
*/
public function get_name()
{
return 'exercise_signature';
}
/**
* Creates this plugin's related tables in the internal database.
* Installs course fields in all courses.
*/
public function install()
{
$extraField = new ExtraField('exercise');
$extraFieldHandler = $extraField->get_handler_field_info_by_field_variable('signature_activated');
$exists = $extraFieldHandler !== false;
if (!$exists) {
$extraField->save(
[
'field_type' => 13, // checkbox yes/no
'variable' => 'signature_activated',
'display_text' => get_plugin_lang('SignatureActivated', 'ExerciseSignaturePlugin'),
'default_value' => null,
'field_order' => null,
'visible_to_self' => 1,
'changeable' => 1,
'filter' => null,
]
);
}
$extraFieldHandler = $extraField->get_handler_field_info_by_field_variable('signature_mandatory');
$exists = $extraFieldHandler !== false;
if (!$exists) {
$extraField->save(
[
'field_type' => 13, // checkbox yes/no
'variable' => 'signature_mandatory',
'display_text' => get_plugin_lang('SignatureMandatory', 'ExerciseSignaturePlugin'),
'default_value' => null,
'field_order' => null,
'visible_to_self' => 1,
'changeable' => 1,
'filter' => null,
]
);
}
$extraField = new ExtraField('track_exercise');
$extraFieldHandler = $extraField->get_handler_field_info_by_field_variable('signature');
$exists = $extraFieldHandler !== false;
if (!$exists) {
$extraField->save(
[
'field_type' => 2, // textarea
'variable' => 'signature',
'display_text' => get_plugin_lang('Signature', 'ExerciseSignaturePlugin'),
'default_value' => null,
'field_order' => null,
'visible_to_self' => 1,
'changeable' => 1,
'filter' => null,
]
);
}
$table = Database::get_main_table(TABLE_EXTRA_FIELD_VALUES);
$sql = "ALTER TABLE $table MODIFY COLUMN value LONGTEXT null;";
Database::query($sql);
}
/**
* Drops this plugins' related tables from the internal database.
* Uninstalls course fields in all courses().
*/
public function uninstall()
{
$extraField = new ExtraField('track_exercise');
$fieldInfo = $extraField->get_handler_field_info_by_field_variable('signature_activated');
if ($fieldInfo) {
$extraField->delete($fieldInfo['id']);
}
$extraField = new ExtraField('exercise');
$fieldInfo = $extraField->get_handler_field_info_by_field_variable('signature');
if ($fieldInfo) {
$extraField->delete($fieldInfo['id']);
}
}
}

@ -0,0 +1,5 @@
<?php
/* For license terms, see /license.txt */
$plugin_info = ExerciseSignaturePlugin::create()->get_info();

@ -0,0 +1,9 @@
<?php
/* For license terms, see /license.txt */
if (!api_is_platform_admin()) {
die('You must have admin permissions to uninstall plugins');
}
ExerciseSignaturePlugin::create()->uninstall();

@ -0,0 +1,10 @@
Positioning
===
This plugin adds a positioning test tool in every course.
Positioning tests should be used before and after any course. One initial test should be taken before anything else is used in the course, and a final test (usually a copy of the same test) should be used at the end. A radar-chart will show the differences between the initial test and the final test for each learner.
For a test to be used as initial or final test, it has to match 3 criteria:
- use at least 3 question categories
- use the "radar" type result page
- have only one available attempt

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

@ -0,0 +1,810 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="150"
height="450"
viewBox="0 0 39.6875 119.0625"
version="1.1"
id="svg8"
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
sodipodi:docname="positioning-line.svg"
inkscape:export-filename="/var/www/chamilo111x/plugin/positioning/img/positioning-line.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<defs
id="defs2">
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath20">
<path
d="M 4500,0 H 0 V 6800 H 4500 V 0 M 3337.97,2866.8 c 26.6,-25.57 62.71,-41.33 102.54,-41.33 81.72,0 147.97,66.27 147.97,147.99 0,67.46 -45.12,124.31 -106.82,142.15 v 0 c -13.09,3.79 -26.88,5.83 -41.15,5.83 -39.83,0 -75.94,-15.74 -102.54,-41.32 v 0 0 c 19.84,-19.06 34.35,-43.62 41.15,-71.21 v 0 c 2.79,-11.37 4.3,-23.23 4.3,-35.45 v 0 c 0,12.22 -1.51,24.08 -4.3,35.45 v 0 c -6.8,27.59 -21.31,52.15 -41.15,71.21 -19.84,-19.06 -34.38,-43.62 -41.15,-71.21 v 0 c -2.82,-11.37 -4.32,-23.23 -4.32,-35.45 v 0 c 0,12.22 1.5,24.08 4.32,35.45 v 0 c 6.77,27.59 21.31,52.15 41.15,71.21 v 0 0 c -26.6,25.58 -62.72,41.32 -102.54,41.32 -14.3,0 -28.09,-2.04 -41.15,-5.83 v 0 c -61.7,-17.84 -106.84,-74.69 -106.84,-142.15 0,-81.72 66.25,-147.99 147.99,-147.99 39.82,0 75.94,15.76 102.54,41.33 v 0 0 m -102.54,254.64 c 39.82,0 75.94,-15.74 102.54,-41.32 26.6,25.58 62.71,41.32 102.54,41.32 14.27,0 28.06,-2.04 41.15,-5.83 2.77,11.36 4.3,23.22 4.3,35.44 0,81.72 -66.25,147.99 -147.99,147.99 -81.74,0 -148.01,-66.27 -148.01,-147.99 0,-12.22 1.52,-24.08 4.32,-35.44 13.06,3.79 26.85,5.83 41.15,5.83"
id="path18" />
</clipPath>
<radialGradient
fx="0"
fy="0"
cx="0"
cy="0"
r="1"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(6090.67,0,0,-6090.67,2250,3400)"
spreadMethod="pad"
id="radialGradient28">
<stop
style="stop-opacity:1;stop-color:#faf3e9"
offset="0"
id="stop22" />
<stop
style="stop-opacity:1;stop-color:#faf3e9"
offset="0.76858655"
id="stop24" />
<stop
style="stop-opacity:1;stop-color:#c7c2ba"
offset="1"
id="stop26" />
</radialGradient>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath126">
<path
d="m 3337.97,3003.07 c -14.3,0 -28.09,2.05 -41.15,5.84 6.77,27.59 21.31,52.15 41.15,71.21 19.84,-19.06 34.35,-43.62 41.15,-71.21 -13.08,-3.79 -26.87,-5.84 -41.15,-5.84"
id="path124" />
</clipPath>
<radialGradient
fx="0"
fy="0"
cx="0"
cy="0"
r="1"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(6090.67,0,0,-6090.67,2250,3400)"
spreadMethod="pad"
id="radialGradient132">
<stop
style="stop-opacity:1;stop-color:#ffeddd"
offset="0"
id="stop128" />
<stop
style="stop-opacity:1;stop-color:#f59f93"
offset="1"
id="stop130" />
</radialGradient>
<linearGradient
id="linearGradient3596">
<stop
id="stop3598"
style="stop-color:#0035ed;stop-opacity:1"
offset="0" />
<stop
id="stop3615"
style="stop-color:#1c7eff;stop-opacity:1"
offset="0.55445766" />
<stop
id="stop3600"
style="stop-color:#98cbff;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3585">
<stop
id="stop3587"
style="stop-color:#00008d;stop-opacity:1"
offset="0" />
<stop
id="stop3589"
style="stop-color:#0048b7;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
id="linearGradient3607">
<stop
id="stop3609"
style="stop-color:#f9fbff;stop-opacity:1"
offset="0" />
<stop
id="stop3611"
style="stop-color:#62aaff;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
x1="66.259003"
y1="7.8641"
x2="66.259003"
gradientUnits="userSpaceOnUse"
y2="88.929001"
id="linearGradient3617">
<stop
offset="0"
stop-color="#010000"
id="stop3307" />
<stop
offset=".73611"
stop-color="#411000"
id="stop3352" />
<stop
offset="1"
stop-color="#822000"
id="stop3309" />
</linearGradient>
<linearGradient
x1="598.17999"
y1="290.64999"
gradientTransform="matrix(0.11572517,0,0,0.11572517,54.642566,115.94236)"
x2="598.17999"
gradientUnits="userSpaceOnUse"
xlink:href="#linearGradient3439"
y2="319.60999"
id="linearGradient3881" />
<linearGradient
id="linearGradient3439">
<stop
offset="0"
stop-color="#824623"
id="stop3441" />
<stop
offset=".5"
stop-color="#672412"
id="stop3443" />
<stop
offset="1"
stop-opacity=".99608"
stop-color="#420804"
id="stop3445" />
</linearGradient>
<linearGradient
x1="612.31"
y1="303.39999"
x2="612.31"
gradientUnits="userSpaceOnUse"
y2="299.60999"
id="linearGradient3878"
gradientTransform="matrix(0.11572517,0,0,0.11572517,54.643083,115.94236)">
<stop
offset="0"
stop-color="#712717"
id="stop3505" />
<stop
offset="1"
stop-color="#76351b"
id="stop3507" />
</linearGradient>
<linearGradient
x1="598.17999"
y1="290.64999"
gradientTransform="matrix(-0.11572517,0,0,0.11572517,197.7604,115.94236)"
x2="598.17999"
gradientUnits="userSpaceOnUse"
xlink:href="#linearGradient3439"
y2="319.60999"
id="linearGradient3875" />
<linearGradient
x1="622.04999"
y1="301.88"
gradientTransform="matrix(0.11572517,0,0,0.11572517,54.643083,116.05808)"
x2="622.04999"
gradientUnits="userSpaceOnUse"
xlink:href="#linearGradient3431"
y2="299.04001"
id="linearGradient3870" />
<linearGradient
id="linearGradient3431">
<stop
offset="0"
stop-color="#c96905"
id="stop3433" />
<stop
offset="1"
stop-color="#d6902a"
id="stop3435" />
</linearGradient>
<linearGradient
id="linearGradient3511">
<stop
offset="0"
stop-color="#813d20"
id="stop3513" />
<stop
offset="1"
stop-color="#7f4621"
id="stop3515" />
</linearGradient>
<linearGradient
x1="622.04999"
y1="295.54999"
gradientTransform="matrix(0.11572517,0,0,0.11572517,54.643083,116.05808)"
x2="622.04999"
gradientUnits="userSpaceOnUse"
xlink:href="#linearGradient3551"
y2="299.34"
id="linearGradient3865" />
<linearGradient
id="linearGradient3551">
<stop
offset="0"
id="stop3553" />
<stop
offset="1"
stop-opacity="0"
stop-color="#6f382e"
id="stop3557" />
</linearGradient>
<linearGradient
x1="583.47998"
y1="315.81"
gradientTransform="matrix(0.11572517,0,0,0.11572517,54.642566,115.94236)"
x2="583.47998"
gradientUnits="userSpaceOnUse"
xlink:href="#linearGradient3431"
y2="297.04999"
id="linearGradient3860" />
<linearGradient
x1="597.52002"
y1="290.62"
gradientTransform="matrix(0.11572517,0,0,0.11572517,54.654947,115.94236)"
x2="597.52002"
gradientUnits="userSpaceOnUse"
xlink:href="#linearGradient3405"
y2="318.35001"
id="linearGradient3862" />
<linearGradient
id="linearGradient3405">
<stop
offset="0"
stop-color="#672b27"
id="stop3407" />
<stop
offset=".5"
stop-color="#712913"
id="stop3413" />
<stop
offset="1"
stop-opacity=".98431"
stop-color="#620000"
id="stop3409" />
</linearGradient>
<linearGradient
x1="583.47998"
y1="315.81"
gradientTransform="matrix(-0.11572517,0,0,0.11572517,197.7604,115.94236)"
x2="583.47998"
gradientUnits="userSpaceOnUse"
xlink:href="#linearGradient3431"
y2="297.04999"
id="linearGradient3855" />
<linearGradient
x1="597.52002"
y1="290.62"
gradientTransform="matrix(-0.11572517,0,0,0.11572517,197.74883,115.94236)"
x2="597.52002"
gradientUnits="userSpaceOnUse"
xlink:href="#linearGradient3405"
y2="318.35001"
id="linearGradient3857" />
<linearGradient
x1="599.37"
y1="285.39999"
gradientTransform="matrix(0.11572517,0,0,0.11572517,54.642566,115.94236)"
x2="599.37"
gradientUnits="userSpaceOnUse"
xlink:href="#linearGradient3551"
y2="297.60001"
id="linearGradient3850" />
<linearGradient
x1="597.52002"
y1="290.62"
gradientTransform="matrix(0.11572517,0,0,0.11572517,54.654947,115.94236)"
x2="597.52002"
gradientUnits="userSpaceOnUse"
xlink:href="#linearGradient3579"
y2="318.35001"
id="linearGradient3852" />
<linearGradient
id="linearGradient3579">
<stop
offset="0"
stop-color="#672b27"
id="stop3581" />
<stop
offset=".5"
stop-color="#712913"
id="stop3583" />
<stop
offset="1"
stop-color="#965e26"
id="stop3585" />
</linearGradient>
<linearGradient
x1="599.37"
y1="285.39999"
gradientTransform="matrix(-0.11572517,0,0,0.11572517,197.72568,115.94236)"
x2="599.37"
gradientUnits="userSpaceOnUse"
xlink:href="#linearGradient3551"
y2="297.60001"
id="linearGradient3845" />
<linearGradient
x1="597.52002"
y1="290.62"
gradientTransform="matrix(-0.11572517,0,0,0.11572517,197.71411,115.94236)"
x2="597.52002"
gradientUnits="userSpaceOnUse"
xlink:href="#linearGradient3579"
y2="318.35001"
id="linearGradient3847" />
<linearGradient
gradientTransform="matrix(0.11572517,0,0,0.11572517,118.32549,139.06309)"
x1="111.23"
y1="13.656"
x2="111.23"
gradientUnits="userSpaceOnUse"
y2="80.616997"
id="linearGradient3990">
<stop
offset="0"
stop-opacity=".36078"
stop-color="#fff"
id="stop3986" />
<stop
offset="1"
stop-opacity=".086275"
stop-color="#fff"
id="stop3988" />
</linearGradient>
<linearGradient
x1="570.70001"
y1="284.79001"
x2="668.25"
gradientUnits="userSpaceOnUse"
y2="284.79001"
id="linearGradient3376"
gradientTransform="matrix(0.11572517,0,0,0.11572517,54.643083,115.94236)">
<stop
offset="0"
stop-color="#d68c23"
id="stop3380" />
<stop
offset=".5"
stop-color="#c66100"
id="stop3392" />
<stop
offset="1"
stop-color="#6f382e"
id="stop3382" />
</linearGradient>
<linearGradient
x1="568.19"
y1="280.44"
x2="668.92999"
gradientUnits="userSpaceOnUse"
y2="280.44"
id="linearGradient3390"
gradientTransform="matrix(0.11572517,0,0,0.11572517,54.643083,115.94236)">
<stop
offset="0"
stop-color="#d5801f"
id="stop3386" />
<stop
offset=".5"
stop-color="#993a1b"
id="stop3394" />
<stop
offset="1"
stop-color="#78413e"
id="stop3388" />
</linearGradient>
<linearGradient
x1="568.28998"
y1="285.39999"
x2="669.90997"
gradientUnits="userSpaceOnUse"
y2="285.39999"
id="linearGradient3613"
gradientTransform="matrix(0.11572517,0,0,0.11572517,54.643083,115.94236)">
<stop
offset="0"
stop-opacity=".50196"
stop-color="#fff"
id="stop3609-2" />
<stop
offset="1"
stop-opacity=".36078"
stop-color="#fff"
id="stop3611-9" />
</linearGradient>
<linearGradient
x1="568.66998"
y1="289.29001"
x2="668"
gradientUnits="userSpaceOnUse"
y2="289.29001"
id="linearGradient3654"
gradientTransform="matrix(0.11572517,0,0,0.11572517,54.643083,115.94236)">
<stop
offset="0"
stop-color="#811f00"
id="stop3625" />
<stop
offset=".5"
stop-color="#5d0003"
id="stop3631" />
<stop
offset="1"
stop-color="#811f00"
id="stop3627" />
</linearGradient>
<filter
id="filter3834">
<feGaussianBlur
stdDeviation="0.38432455"
id="feGaussianBlur3836" />
</filter>
<linearGradient
x1="41.167"
y1="113.08"
gradientTransform="matrix(0.05990629,0.0990133,-0.0990133,0.05990629,128.21305,136.40604)"
x2="41.167"
gradientUnits="userSpaceOnUse"
y2="71.686996"
id="linearGradient3814">
<stop
offset="0"
stop-color="#c8c8d8"
id="stop3697" />
<stop
offset="1"
stop-color="#fbfbfc"
id="stop3699" />
</linearGradient>
<filter
height="1.0621001"
x="-0.38163"
width="1.7632999"
y="-0.031029001"
id="filter3772">
<feGaussianBlur
stdDeviation="0.58138587"
id="feGaussianBlur3774" />
</filter>
<linearGradient
x1="45.798"
y1="113.08"
gradientTransform="matrix(0.05990629,0.0990133,-0.0990133,0.05990629,128.21305,136.40604)"
x2="45.798"
gradientUnits="userSpaceOnUse"
y2="64.410004"
id="linearGradient3810">
<stop
offset="0"
stop-color="#5a5a6b"
id="stop3685" />
<stop
offset=".5"
stop-color="#837e97"
id="stop3691" />
<stop
offset=".75"
stop-color="#9192a7"
id="stop3693" />
<stop
offset="1"
stop-color="#8780a4"
id="stop3687" />
</linearGradient>
<linearGradient
gradientTransform="matrix(0.11572517,0,0,0.11572517,118.32549,139.06309)"
x1="27.965"
y1="10.75"
x2="27.965"
gradientUnits="userSpaceOnUse"
y2="55.842999"
id="linearGradient3980">
<stop
offset="0"
stop-opacity=".36078"
stop-color="#fff"
id="stop3976" />
<stop
offset="1"
stop-opacity="0"
stop-color="#fff"
id="stop3978" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.4"
inkscape:cx="-13.928571"
inkscape:cy="244.69542"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
inkscape:document-rotation="0"
showgrid="false"
inkscape:snap-global="false"
units="px"
inkscape:window-width="1920"
inkscape:window-height="1043"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Calque 1"
inkscape:groupmode="layer"
id="layer1">
<path
d="m 33.392636,95.759229 v 0.42087 H 22.376705 v -0.42087 h 11.015931"
style="fill:#bace97;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.02356204"
id="path72"
inkscape:connector-curvature="0" />
<path
d="m 34.718885,21.853724 v 0.42121 H 22.633876 v -0.42121 h 12.085009"
style="fill:#d29493;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0246789"
id="path74" />
<path
d="m 34.726819,58.890497 v 0.42086 H 22.64181 v -0.42086 h 12.085009"
style="fill:#94aad0;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0246789"
id="path78" />
<path
d="M 36.854793,112.81532 V 77.752689 l -2.12901,1.74805 -2.12937,-1.74805 v 19.306188 15.756443 l 2.12937,1.74871 2.12901,-1.74871"
style="fill:#bace97;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path82" />
<path
d="m 34.725783,97.189297 c -0.56903,0 -1.03046,-0.461788 -1.03046,-1.030788 0,-0.56938 0.46143,-1.03007 1.03046,-1.03007 0.56903,0 1.03046,0.46069 1.03046,1.03007 0,0.569 -0.46143,1.030788 -1.03046,1.030788"
style="fill:#f8f1e7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path84" />
<path
d="M 36.839617,38.721084 V 3.6588546 l -2.12901,1.74801 -2.12937,-1.74801 v 19.3064694 15.75576 l 2.12937,1.74872 2.12901,-1.74872"
style="fill:#d29493;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path86" />
<path
d="m 34.710607,23.094794 c -0.56903,0 -1.03046,-0.46179 -1.03046,-1.03082 0,-0.56903 0.46143,-1.03011 1.03046,-1.03011 0.56903,0 1.03046,0.46108 1.03046,1.03011 0,0.56903 -0.46143,1.03082 -1.03046,1.03082"
style="fill:#f8f1e7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path88" />
<path
d="M 36.855829,75.770907 V 40.707973 l -2.12901,1.748014 -2.12937,-1.748014 v 19.306474 15.75646 l 2.12937,1.74802 2.12901,-1.74802"
style="fill:#94aad0;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path94" />
<path
d="m 34.726819,60.131567 c -0.56903,0 -1.03046,-0.46179 -1.03046,-1.03082 0,-0.56938 0.46143,-1.03011 1.03046,-1.03011 0.56903,0 1.03046,0.46073 1.03046,1.03011 0,0.56903 -0.46143,1.03082 -1.03046,1.03082"
style="fill:#f8f1e7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path96" />
<path
d="m 18.775815,89.494442 -1.2118,1.254157 C 14.913232,88.187341 10.69173,88.259181 8.1315745,90.908822 5.5702962,93.559628 5.6430681,97.781534 8.293853,100.34279 l -1.211974,1.25433 C 3.7392875,98.36743 3.6475019,93.039842 6.8774171,89.697025 10.105355,86.356259 15.433223,86.264741 18.775815,89.494442"
style="fill:#bace97;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.03174862"
id="path170"
inkscape:connector-curvature="0"
inkscape:transform-center-x="1.2967958"
inkscape:transform-center-y="-1.1709926" />
<path
d="m 17.09358,91.234374 -1.019264,1.052558 c -1.799737,-1.742811 -4.672707,-1.696867 -6.4144149,0.101731 -1.7432439,1.800184 -1.696629,4.672912 0.1031069,6.415722 L 8.7430682,99.857644 C 6.3612843,97.551193 6.3001976,93.750985 8.6056075,91.370271 10.912011,88.988533 14.711798,88.927925 17.09358,91.234374"
style="fill:#87aade;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.03174862"
id="path172"
inkscape:connector-curvature="0"
inkscape:transform-center-x="0.92909007"
inkscape:transform-center-y="-0.82755232" />
<path
d="m 15.696035,92.642669 -0.85896,0.908915 c -1.105052,-1.044316 -2.846896,-0.995096 -3.889909,0.108572 -1.044314,1.10505 -0.9950667,2.846865 0.109983,3.891182 l -0.858732,0.908674 c -1.6069331,-1.518615 -1.6780698,-4.051718 -0.160969,-5.657049 1.518349,-1.606651 4.051655,-1.678909 5.658587,-0.160294"
style="fill:#6f7b91;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.03174862"
id="path174"
inkscape:connector-curvature="0"
inkscape:transform-center-x="0.63122276"
inkscape:transform-center-y="-0.53464608" />
<path
d="m 4.5086722,95.550312 h 1.7439433 c 0,3.686044 2.9856452,6.671648 6.6697505,6.671648 3.686327,0 6.671973,-2.985604 6.671973,-6.671648 h 1.743628 c 0,4.648308 -3.767603,8.415848 -8.415601,8.415848 -4.645776,0 -8.4136938,-3.76754 -8.4136938,-8.415848"
style="fill:#bace97;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.03174862"
id="path176"
inkscape:connector-curvature="0" />
<path
d="m 6.92188,95.550312 h 1.4655132 c 0,2.505905 2.0312738,4.537178 4.5349728,4.537178 2.505598,0 4.53688,-2.031273 4.53688,-4.537178 h 1.466143 c 0,3.315852 -2.687516,6.002708 -6.0008,6.002708 -3.3155086,0 -6.002709,-2.686856 -6.002709,-6.002708"
style="fill:#87aade;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.03174862"
id="path178"
inkscape:connector-curvature="0" />
<path
d="m 8.9214027,95.550312 h 1.2499463 c 0,1.520436 1.232801,2.752557 2.751017,2.752557 1.520762,0 2.7526,-1.232121 2.7526,-2.752557 h 1.250261 c 0,2.21061 -1.791892,4.002801 -4.000638,4.002801 -2.210969,0 -4.0031863,-1.792191 -4.0031863,-4.002801"
style="fill:#6f7b91;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.03174862"
id="path180"
inkscape:connector-curvature="0" />
<path
d="m 14.440706,93.888786 -0.729339,0.797079 c -0.480879,-0.440006 -1.229039,-0.406828 -1.668404,0.07335 -0.440882,0.481832 -0.406822,1.229075 0.07405,1.669084 L 11.38789,97.22514 c -0.920992,-0.842722 -0.984741,-2.27426 -0.142841,-3.194354 0.842887,-0.921172 2.27466,-0.984718 3.195654,-0.141996"
style="fill:#ffdd55;fill-opacity:0.58823494;fill-rule:nonzero;stroke:none;stroke-width:0.03174862"
id="path182"
inkscape:connector-curvature="0"
inkscape:transform-center-x="0.36439883"
inkscape:transform-center-y="-0.28229357" />
<path
d="m 10.662502,95.550312 1.079772,6.03e-4 c 0,0.651857 0.529565,1.181394 1.180407,1.181394 0.653705,0 1.181369,-0.529537 1.181369,-1.181394 l 1.080403,-6.03e-4 c 0,1.248981 -1.01278,2.262079 -2.260503,2.262079 -1.248039,0 -2.261448,-1.013098 -2.261448,-2.262079"
style="fill:#ffdd55;fill-opacity:0.58823494;fill-rule:nonzero;stroke:none;stroke-width:0.03174862"
id="path184"
inkscape:connector-curvature="0" />
<path
d="m 17.645825,89.783517 c 0,-0.08667 0.0702,-0.156836 0.156512,-0.156836 0.08667,0 0.15716,0.0702 0.15716,0.156836 0,0.0864 -0.07047,0.156845 -0.15716,0.156845 -0.0864,0 -0.156512,-0.07047 -0.156512,-0.156845"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.03174862"
id="path202"
inkscape:connector-curvature="0" />
<path
d="m 16.056166,91.390665 c 0,-0.08703 0.0702,-0.156845 0.156512,-0.156845 0.08667,0 0.15716,0.06984 0.15716,0.156845 0,0.08667 -0.07047,0.156836 -0.15716,0.156836 -0.0864,0 -0.156512,-0.0702 -0.156512,-0.156836"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.03174862"
id="path204"
inkscape:connector-curvature="0" />
<path
d="m 14.780496,92.757824 c 0,-0.08703 0.0702,-0.157161 0.156512,-0.157161 0.08667,0 0.15716,0.0702 0.15716,0.157161 0,0.08604 -0.07047,0.156206 -0.15716,0.156206 -0.0864,0 -0.156512,-0.0702 -0.156512,-0.156206"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.03174862"
id="path206"
inkscape:connector-curvature="0" />
<path
d="m 13.481203,93.989743 c 0,-0.08604 0.0702,-0.156837 0.156512,-0.156837 0.08667,0 0.15716,0.07083 0.15716,0.156837 0,0.08703 -0.07047,0.15716 -0.15716,0.15716 -0.0864,0 -0.156512,-0.0702 -0.156512,-0.15716"
style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.03174862"
id="path208"
inkscape:connector-curvature="0" />
<path
d="M 6.752826,28.902727 H 3.3652774 V 9.449796 H 6.752826 v 19.452931"
style="fill:#d29493;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0371274"
id="path304" />
<path
d="M 20.364758,28.902727 H 16.97668 V 9.449796 h 3.388078 v 19.452931"
style="fill:#d29493;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0371274"
id="path306" />
<path
d="M 15.827683,28.902727 H 12.439605 V 9.449796 h 3.388078 v 19.452931"
style="fill:#d29493;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0371274"
id="path308" />
<path
d="M 11.290255,28.902727 H 7.902528 V 9.449796 h 3.387727 v 19.452931"
style="fill:#d29493;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0371274"
id="path310" />
<path
d="M 6.752826,28.902727 H 3.3652774 V 20.533726 H 6.752826 v 8.369001"
style="fill:#6f7b91;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0337004"
id="path312" />
<path
d="M 20.364758,28.902727 H 16.97668 V 17.085834 h 3.388078 v 11.816893"
style="fill:#6f7b91;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0327783"
id="path314" />
<path
d="M 15.827683,28.902727 H 12.439605 V 18.677419 h 3.388078 v 10.225308"
style="fill:#6f7b91;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0329863"
id="path316" />
<path
d="M 11.290255,28.902727 H 7.902528 v -5.927716 h 3.387727 v 5.927716"
style="fill:#6f7b91;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0334432"
id="path318" />
<path
d="m 5.3149034,27.887077 h 0.151342 c 0.116769,0 0.15875,-0.0515 0.15875,-0.133 0,-0.0818 -0.04198,-0.13299 -0.15875,-0.13299 h -0.358705 c -0.116734,0 -0.160972,0.0512 -0.160972,0.13299 0,0.0815 0.04424,0.133 0.160972,0.133 h 0.04875 v 0.24201 l -0.946291,-0.0466 v -0.67592 h 0.233045 v 0.4452 l 0.38929,0.0212 c -0.07705,-0.0466 -0.11878,-0.12136 -0.11878,-0.22402 0,-0.18873 0.13268,-0.28433 0.372886,-0.28433 h 0.363679 c 0.26095,0 0.410175,0.13052 0.410175,0.38241 0,0.25153 -0.149225,0.38206 -0.410175,0.38206 h -0.13522 v -0.24201"
style="fill:#f8f1e7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path320" />
<path
d="m 5.3149034,26.963147 h 0.151342 c 0.116769,0 0.15875,-0.0512 0.15875,-0.13264 0,-0.0815 -0.04198,-0.133 -0.15875,-0.133 h -0.358705 c -0.116734,0 -0.160972,0.0515 -0.160972,0.133 0,0.0815 0.04424,0.13264 0.160972,0.13264 h 0.04875 v 0.24272 l -0.946291,-0.0469 v -0.67593 h 0.233045 v 0.44556 l 0.38929,0.0208 c -0.07705,-0.0466 -0.11878,-0.12101 -0.11878,-0.22366 0,-0.18909 0.13268,-0.28434 0.372886,-0.28434 h 0.363679 c 0.26095,0 0.410175,0.13052 0.410175,0.38205 0,0.25189 -0.149225,0.38242 -0.410175,0.38242 h -0.13522 v -0.24272"
style="fill:#f8f1e7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path322" />
<path
d="m 5.6038284,25.312857 c 0.07232,0 0.102659,-0.0303 0.102659,-0.0843 0,-0.0508 -0.03034,-0.0836 -0.102659,-0.0836 h -0.5594 c -0.07221,0 -0.102552,0.0328 -0.102552,0.0836 0,0.054 0.03034,0.0843 0.102552,0.0843 z m -0.547687,0.16334 c -0.167711,0 -0.261162,-0.0868 -0.261162,-0.24765 0,-0.16052 0.09345,-0.24695 0.261162,-0.24695 h 0.536046 c 0.167922,0 0.261055,0.0864 0.261055,0.24695 0,0.16086 -0.09313,0.24765 -0.261055,0.24765 z m -0.04893,0.64558 c 0.07221,0 0.102518,-0.0303 0.102518,-0.0843 0,-0.0512 -0.0303,-0.084 -0.102518,-0.084 h -0.559505 c -0.07218,0 -0.102517,0.0328 -0.102517,0.084 0,0.054 0.03034,0.0843 0.102517,0.0843 z m -0.797207,-0.72743 v -0.15169 l 1.631597,0.64346 v 0.15135 z m 0.249414,0.89041 c -0.167675,0 -0.261126,-0.0864 -0.261126,-0.24729 0,-0.16087 0.09345,-0.24695 0.261126,-0.24695 h 0.536081 c 0.167852,0 0.261126,0.0861 0.261126,0.24695 0,0.16086 -0.09327,0.24729 -0.261126,0.24729 h -0.536082"
style="fill:#f8f1e7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path324" />
<path
d="M 9.849509,27.688817 H 9.245906 l 0.603603,0.254 z m 0,0.4893 -1.102431,-0.46637 v -0.27975 h 1.102431 v -0.12101 h 0.233186 v 0.12101 h 0.295981 v 0.25682 h -0.295981 v 0.4893 H 9.849509"
style="fill:#f8f1e7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path326" />
<path
d="m 10.00332,26.958917 c 0.11677,0 0.160867,-0.0515 0.160867,-0.133 0,-0.0818 -0.0441,-0.13299 -0.160867,-0.13299 H 9.122434 c -0.116417,0 -0.160867,0.0511 -0.160867,0.13299 0,0.0815 0.04445,0.133 0.160867,0.133 z m -0.864658,0.25612 c -0.261056,0 -0.409928,-0.13723 -0.409928,-0.38912 0,-0.25188 0.148872,-0.38946 0.409928,-0.38946 h 0.84843 c 0.261056,0 0.410281,0.13758 0.410281,0.38946 0,0.25189 -0.149225,0.38912 -0.410281,0.38912 h -0.84843"
style="fill:#f8f1e7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path328" />
<path
d="m 10.141256,25.312857 c 0.07197,0 0.102306,-0.0303 0.102306,-0.0843 0,-0.0508 -0.03034,-0.0836 -0.102306,-0.0836 H 9.581751 c -0.07232,0 -0.102659,0.0328 -0.102659,0.0836 0,0.054 0.03034,0.0843 0.102659,0.0843 z m -0.547864,0.16334 c -0.167922,0 -0.261055,-0.0868 -0.261055,-0.24765 0,-0.16052 0.09313,-0.24695 0.261055,-0.24695 h 0.53587 c 0.167922,0 0.261408,0.0864 0.261408,0.24695 0,0.16086 -0.09349,0.24765 -0.261408,0.24765 z m -0.04904,0.64558 c 0.07232,0 0.102659,-0.0303 0.102659,-0.0843 0,-0.0512 -0.03034,-0.084 -0.102659,-0.084 H 8.984847 c -0.07197,0 -0.102306,0.0328 -0.102306,0.084 0,0.054 0.03034,0.0843 0.102306,0.0843 z m -0.797278,-0.72743 v -0.15169 l 1.631598,0.64346 v 0.15135 z m 0.249414,0.89041 c -0.167569,0 -0.261055,-0.0864 -0.261055,-0.24729 0,-0.16087 0.09349,-0.24695 0.261055,-0.24695 h 0.536223 c 0.167569,0 0.261055,0.0861 0.261055,0.24695 0,0.16086 -0.09349,0.24729 -0.261055,0.24729 H 8.996488"
style="fill:#f8f1e7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path330" />
<path
d="m 13.284507,27.364617 h 0.223662 l 1.407936,0.37747 v 0.25647 l -1.398411,-0.37536 v 0.51082 h -0.233187 v -0.7694"
style="fill:#f8f1e7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path332" />
<path
d="m 14.540749,26.958917 c 0.11677,0 0.160867,-0.0515 0.160867,-0.133 0,-0.0818 -0.0441,-0.13299 -0.160867,-0.13299 h -0.880886 c -0.116417,0 -0.160867,0.0511 -0.160867,0.13299 0,0.0815 0.04445,0.133 0.160867,0.133 z m -0.864658,0.25612 c -0.261056,0 -0.410281,-0.13723 -0.410281,-0.38912 0,-0.25188 0.149225,-0.38946 0.410281,-0.38946 h 0.84843 c 0.261056,0 0.410281,0.13758 0.410281,0.38946 0,0.25189 -0.149225,0.38912 -0.410281,0.38912 h -0.84843"
style="fill:#f8f1e7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path334" />
<path
d="m 14.678333,25.312857 c 0.07232,0 0.102658,-0.0303 0.102658,-0.0843 0,-0.0508 -0.03034,-0.0836 -0.102658,-0.0836 h -0.559506 c -0.07197,0 -0.102306,0.0328 -0.102306,0.0836 0,0.054 0.03034,0.0843 0.102306,0.0843 z m -0.547512,0.16334 c -0.167922,0 -0.261408,-0.0868 -0.261408,-0.24765 0,-0.16052 0.09349,-0.24695 0.261408,-0.24695 h 0.53587 c 0.167922,0 0.261055,0.0864 0.261055,0.24695 0,0.16086 -0.09313,0.24765 -0.261055,0.24765 z m -0.04904,0.64558 c 0.07232,0 0.102306,-0.0303 0.102306,-0.0843 0,-0.0512 -0.02999,-0.084 -0.102306,-0.084 h -0.559505 c -0.07232,0 -0.102659,0.0328 -0.102659,0.084 0,0.054 0.03034,0.0843 0.102659,0.0843 z m -0.797278,-0.72743 v -0.15169 l 1.631598,0.64346 v 0.15135 z m 0.249414,0.89041 c -0.167569,0 -0.261055,-0.0864 -0.261055,-0.24729 0,-0.16087 0.09349,-0.24695 0.261055,-0.24695 h 0.536223 c 0.167569,0 0.261055,0.0861 0.261055,0.24695 0,0.16086 -0.09349,0.24729 -0.261055,0.24729 h -0.536223"
style="fill:#f8f1e7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path336" />
<path
d="m 19.239048,27.749137 c 0,-0.0815 -0.0399,-0.14181 -0.18415,-0.14428 h -0.1517 c -0.12806,0 -0.18415,0.0536 -0.18415,0.14428 0,0.091 0.0561,0.14464 0.18415,0.14464 h 0.1517 c 0.14428,0 0.18415,-0.0631 0.18415,-0.14464 z m -0.92534,0.14464 c 0.13053,0 0.17251,-0.0607 0.17251,-0.14464 0,-0.0815 -0.042,-0.14428 -0.17251,-0.14428 h -0.091 c -0.146752,0 -0.186616,0.0628 -0.186616,0.14428 0,0.0815 0.03986,0.14464 0.186616,0.14464 z m 1.15817,-0.14464 c 0,0.25859 -0.14923,0.40111 -0.40993,0.40111 h -0.12841 c -0.15628,0 -0.27728,-0.0466 -0.34008,-0.15875 -0.0586,0.10725 -0.16792,0.15875 -0.32879,0.15875 h -0.0515 c -0.260705,0 -0.40993,-0.14252 -0.40993,-0.40111 0,-0.25858 0.149225,-0.40075 0.40993,-0.40075 h 0.0515 c 0.16087,0 0.27023,0.0536 0.32879,0.1584 0.0628,-0.11184 0.1838,-0.1584 0.34008,-0.1584 h 0.12841 c 0.2607,0 0.40993,0.14217 0.40993,0.40075"
style="fill:#f8f1e7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path338" />
<path
d="m 18.926478,26.963147 h 0.1517 c 0.11642,0 0.1584,-0.0512 0.1584,-0.13264 0,-0.0815 -0.042,-0.133 -0.1584,-0.133 h -0.35913 c -0.11642,0 -0.16087,0.0515 -0.16087,0.133 0,0.0815 0.0444,0.13264 0.16087,0.13264 h 0.049 v 0.24272 l -0.946505,-0.0469 v -0.67593 h 0.233186 v 0.44556 l 0.389469,0.0208 c -0.0773,-0.0466 -0.11889,-0.12101 -0.11889,-0.22366 0,-0.18909 0.13265,-0.28434 0.37289,-0.28434 h 0.36371 c 0.2607,0 0.40993,0.13052 0.40993,0.38205 0,0.25189 -0.14923,0.38242 -0.40993,0.38242 h -0.13547 v -0.24272"
style="fill:#f8f1e7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path340" />
<path
d="m 19.215758,25.312857 c 0.072,0 0.10231,-0.0303 0.10231,-0.0843 0,-0.0508 -0.0303,-0.0836 -0.10231,-0.0836 h -0.5595 c -0.0723,0 -0.10266,0.0328 -0.10266,0.0836 0,0.054 0.0303,0.0843 0.10266,0.0843 z m -0.54786,0.16334 c -0.16792,0 -0.26106,-0.0868 -0.26106,-0.24765 0,-0.16052 0.0931,-0.24695 0.26106,-0.24695 h 0.53587 c 0.16792,0 0.26141,0.0864 0.26141,0.24695 0,0.16086 -0.0935,0.24765 -0.26141,0.24765 z m -0.049,0.64558 c 0.0723,0 0.10266,-0.0303 0.10266,-0.0843 0,-0.0512 -0.0303,-0.084 -0.10266,-0.084 h -0.559503 c -0.07197,0 -0.102306,0.0328 -0.102306,0.084 0,0.054 0.03034,0.0843 0.102306,0.0843 z m -0.797275,-0.72743 v -0.15169 l 1.631595,0.64346 v 0.15135 z m 0.249766,0.89041 c -0.167922,0 -0.261408,-0.0864 -0.261408,-0.24729 0,-0.16087 0.09349,-0.24695 0.261408,-0.24695 h 0.535869 c 0.16792,0 0.26106,0.0861 0.26106,0.24695 0,0.16086 -0.0931,0.24729 -0.26106,0.24729 h -0.535869"
style="fill:#f8f1e7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path342" />
<path
d="m 4.8382654,14.765511 h 0.329212 l -0.164676,-1.09961 z m 0.779322,0.68932 h -0.344559 l -0.05912,-0.3944 h -0.419347 l -0.05881,0.3944 h -0.313796 l 0.347804,-2.17417 h 0.500097 l 0.347734,2.17417"
style="fill:#f8f1e7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path344" />
<path
d="m 9.400776,14.476581 v 0.66746 h 0.195791 c 0.114653,0 0.176742,-0.0526 0.176742,-0.21414 v -0.18944 c 0,-0.20179 -0.06526,-0.26388 -0.220486,-0.26388 z m 0,-0.88512 v 0.57468 h 0.13335 c 0.127352,0 0.204964,-0.0561 0.204964,-0.23001 v -0.12101 c 0,-0.15557 -0.05256,-0.22366 -0.17392,-0.22366 z m 0.680155,0.18944 v 0.0776 c 0,0.22367 -0.06844,0.36654 -0.220486,0.4378 0.183092,0.0716 0.254706,0.23601 0.254706,0.46602 v 0.17674 c 0,0.33585 -0.177095,0.51576 -0.518584,0.51576 H 9.058934 v -2.17417 h 0.515761 c 0.353836,0 0.506236,0.16475 0.506236,0.50024"
style="fill:#f8f1e7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path346" />
<path
d="m 14.674805,14.644151 v 0.28893 c 0,0.34783 -0.174272,0.5468 -0.509411,0.5468 -0.335492,0 -0.509411,-0.19897 -0.509411,-0.5468 v -1.1303 c 0,-0.3482 0.173919,-0.54681 0.509411,-0.54681 0.335139,0 0.509411,0.19861 0.509411,0.54681 v 0.21096 H 14.35166 v -0.23284 c 0,-0.15522 -0.06844,-0.21413 -0.177094,-0.21413 -0.108656,0 -0.177095,0.0589 -0.177095,0.21413 v 1.1737 c 0,0.15557 0.06844,0.21166 0.177095,0.21166 0.108655,0 0.177094,-0.0561 0.177094,-0.21166 v -0.31045 h 0.323145"
style="fill:#f8f1e7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path348" />
<path
d="m 18.572998,13.591461 v 1.55258 h 0.19262 c 0.10865,0 0.17392,-0.0557 0.17392,-0.21096 v -1.1303 c 0,-0.15558 -0.0653,-0.21132 -0.17392,-0.21132 z m -0.34149,-0.3108 h 0.54046 c 0.34149,0 0.50941,0.18945 0.50941,0.53764 v 1.09925 c 0,0.34784 -0.16792,0.53728 -0.50941,0.53728 h -0.54046 v -2.17417"
style="fill:#f8f1e7;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:0.0352778"
id="path350" />
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.5833px;line-height:1.25;font-family:OpenDyslexic;-inkscape-font-specification:OpenDyslexic;letter-spacing:0px;word-spacing:0px;fill:#d29493;fill-opacity:1;stroke:none;stroke-width:0.264583;"
x="24.492859"
y="19.65476"
id="text3033"><tspan
sodipodi:role="line"
id="tspan3031"
x="24.492859"
y="19.65476"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Consolas;-inkscape-font-specification:Consolas;fill:#d29493;fill-opacity:1;stroke-width:0.264583;">1</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.5833px;line-height:1.25;font-family:OpenDyslexic;-inkscape-font-specification:OpenDyslexic;letter-spacing:0px;word-spacing:0px;fill:#94aad0;fill-opacity:1;stroke:none;stroke-width:0.264583;"
x="23.924967"
y="57.247356"
id="text3033-5"><tspan
sodipodi:role="line"
id="tspan3031-3"
x="23.924967"
y="57.247356"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Consolas;-inkscape-font-specification:Consolas;fill:#94aad0;fill-opacity:1;stroke-width:0.264583;">2</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.5833px;line-height:1.25;font-family:OpenDyslexic;-inkscape-font-specification:OpenDyslexic;letter-spacing:0px;word-spacing:0px;fill:#bace97;fill-opacity:1;stroke:none;stroke-width:0.264583;"
x="24.022102"
y="93.170761"
id="text3033-5-8"><tspan
sodipodi:role="line"
id="tspan3031-3-6"
x="24.022102"
y="93.170761"
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:Consolas;-inkscape-font-specification:Consolas;fill:#bace97;fill-opacity:1;stroke-width:0.264583;">3</tspan></text>
<circle
style="opacity:0.588764;fill:#d38d5f;fill-opacity:1;stroke:#b7c8be;stroke-width:0.144872;stroke-linecap:round;stroke-linejoin:round"
id="path3413"
cx="12.305862"
cy="53.866276"
r="5.2749286" />
<circle
style="opacity:0.61573;fill:#6f7b91;fill-opacity:1;stroke:#b7c8be;stroke-width:0.144872;stroke-linecap:round;stroke-linejoin:round"
id="path3413-2"
cx="8.8198938"
cy="60.002007"
r="5.274929" />
<circle
style="opacity:0.588764;fill:#ffdd55;fill-opacity:1;stroke:#b7c8be;stroke-width:0.144872;stroke-linecap:round;stroke-linejoin:round"
id="path3413-1"
cx="15.768903"
cy="60.135643"
r="5.274929" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 39 KiB

@ -0,0 +1,7 @@
<?php
/* For license terms, see /license.txt */
require_once __DIR__.'/../../main/inc/global.inc.php';
Positioning::create()->install();

@ -0,0 +1,20 @@
<?php
$strings['plugin_title'] = 'Positioning';
$strings['plugin_comment'] = 'Adds positioning tests to the course homepage';
$strings['tool_enable'] = 'Enable plugin';
$strings['block_course_if_initial_exercise_not_attempted'] = 'Block other course tools';
$strings['block_course_if_initial_exercise_not_attempted_help'] = 'When this option is enabled, if an initial positioning test has been configured, the learner will not be able to use the rest of the course on the course homepage until he/she has completed the initial test.';
$strings['average_percentage_to_unlock_final_exercise'] = 'End test unlock threshold';
$strings['average_percentage_to_unlock_final_exercise_help'] = 'Learners *must* have an average progress of at least this percentage (e.g. \'75\' for a 75% progress required) in the combined learning paths of this course.';
$strings['PositioningIntroduction'] = 'Please select one initial test and one final test below. Only tests that match the 3 following criteria will be available for selection: use at least 3 question categories, use the radar report mode *and* have only one possible attempt allowed. Once these are selected, the student will only be able to pass the final test if he/she has completed the average of all learning paths in this course.';
$strings['SelectAsInitialTest'] = 'Select as initial test';
$strings['UnselectAsInitialTest'] = 'Unselect as initial test';
$strings['SelectAsFinalTest'] = 'Select as final test';
$strings['UnselectAsFinalTest'] = 'Unselect as final test';
$strings['InviteToTakePositioningTest'] = 'Please take this positioning test before you start. This will help us measure the quality of this course.';
$strings['InitialTest'] = 'Initial test';
$strings['YouMustCompleteAThresholdToTakeFinalTest'] = 'You must complete at least %s%% percent of progress on average for all learning paths to unlock the final test.';
$strings['FinalTest'] = 'Final test';
$strings['Positioning'] = 'Positioning';
$strings['ChartShowsAverageForAllStudentsUsingZeroForIncompleteTests'] = 'Note: This chart shows average scores for all students, using zero for incomplete tests.';

@ -0,0 +1,20 @@
<?php
$strings['plugin_title'] = 'Positionnement';
$strings['plugin_comment'] = 'Ajoute des tests de positionnement sur la page d\'accueil des cours';
$strings['tool_enable'] = 'Activer le plugin';
$strings['block_course_if_initial_exercise_not_attempted'] = 'Bloquer les autres outils du cours';
$strings['block_course_if_initial_exercise_not_attempted_help'] = 'Lorsque cette option est activée, si un test de positionnement initial a été configuré, l\'apprenant ne pourra pas utiliser le reste des outils du cours jusqu\'à ce qu\'il/elle ait complété le test.';
$strings['average_percentage_to_unlock_final_exercise'] = 'Limite de déblocage du test final';
$strings['average_percentage_to_unlock_final_exercise_help'] = 'Les apprenants *doivent* obtenir un progrès moyen dans les parcours d\'au moins ce pourcentage (exemple : \'75\' pour un progrès requis de 75%) dans les parcours de ce cours pour débloquer le test final.';
$strings['PositioningIntroduction'] = 'Veuillez sélectionner un test initial et un test final ci-dessous. Seuls les tests qui correspondent aux 3 critères suivants seront disponbiles à la sélection: utiliser au moins 3 catégories de questions, utiliser les résultats de type radar *et* être configurés pour une seule tentative autorisée. Une fois que ceux-ci sont sélectionnés, l\'apprenant pourra uniquement passer le test final s\'il/elle a complété la moyenne de progrès aux parcours de ce cours.';
$strings['SelectAsInitialTest'] = 'Sélectionner comme test initial';
$strings['UnselectAsInitialTest'] = 'Désélectionner comme test initial';
$strings['SelectAsFinalTest'] = 'Sélectionner comme test final';
$strings['UnselectAsFinalTest'] = 'Désélectionner comme test final';
$strings['InviteToTakePositioningTest'] = 'Merci de passer ce test de positionnement avant de commencer, ce qui nous aidera à mesurer la qualité de ce cours.';
$strings['InitialTest'] = 'Test initial';
$strings['YouMustCompleteAThresholdToTakeFinalTest'] = 'Vous devez compléter au moins %s%% de progrès moyen dans les parcours pour débloquer le test final.';
$strings['FinalTest'] = 'Test final';
$strings['Positioning'] = 'Positionnement';
$strings['ChartShowsAverageForAllStudentsUsingZeroForIncompleteTests'] = 'Note: Ce graphique montre les scores moyens, utilisant zéro pour les tests non passés.';

@ -0,0 +1,20 @@
<?php
$strings['plugin_title'] = 'Posicionamiento';
$strings['plugin_comment'] = 'Agrega pruebas de posicionamiento en la página principal del curso';
$strings['tool_enable'] = 'Activar plugin';
$strings['block_course_if_initial_exercise_not_attempted'] = 'Bloquear las otras herramientas';
$strings['block_course_if_initial_exercise_not_attempted_help'] = 'Cuando esta opción está activada, si una prueba de positionamiento inicial ha sido configurada, el/la alumno/a no podrá usar el resto de herramientas del curso hasta que esta prueba esté completada.';
$strings['average_percentage_to_unlock_final_exercise'] = 'Limite para desbloquear la prueba final';
$strings['average_percentage_to_unlock_final_exercise_help'] = 'L@s alumn@s *deben* obtener un progreso medio en las lecciones de por lo mínimo este porcentaje (ejemplo : \'75\' para un progreso requerido de 75%) en las lecciones del curso para desbloquear la prueba final.';
$strings['PositioningIntroduction'] = 'Seleccione una prueba inicial y una prueba final de bajo. Solo las pruebas que corresponden a los 3 criterios siguientes serán disponibles para su selección: usar por lo menos 3 categorías de preguntas, usar el modo de resultados de tipo radar *y* tener un solo intento máximo configurado. Una vez estos seleccionados, el/la alumno/a podrá dar la prueba final *solo* si el/ella ha obtenido el promedio de progreso requerido en las lecciones del curso.';
$strings['SelectAsInitialTest'] = 'Seleccionar como prueba inicial';
$strings['UnselectAsInitialTest'] = 'Deselectionar como prueba inicial';
$strings['SelectAsFinalTest'] = 'Seleccionar como prueba final';
$strings['UnselectAsFinalTest'] = 'Deseleccionar como prueba final';
$strings['InviteToTakePositioningTest'] = 'Por favor, pase esta prueba de posicionamiento antes de iniciar el curso. Esto nos ayudará medir la calidad del curso.';
$strings['InitialTest'] = 'Prueba initial';
$strings['YouMustCompleteAThresholdToTakeFinalTest'] = 'Completa mínimo %s%% de progreso promedio en las lecciones para desbloquear la prueba final.';
$strings['FinalTest'] = 'Prueba final';
$strings['Positioning'] = 'Posicionamiento';
$strings['ChartShowsAverageForAllStudentsUsingZeroForIncompleteTests'] = 'Nota: Este gráfico muestra las notas promedias para todos los estudiantes, considerando un valor de cero para las pruebas no tomadas.';

@ -0,0 +1,7 @@
<?php
/* For licensing terms, see /license.txt */
require_once __DIR__.'/../../main/inc/global.inc.php';
$plugin_info = Positioning::create()->get_info();

@ -0,0 +1,235 @@
<?php
/* For licensing terms, see /license.txt */
class Positioning extends Plugin
{
public $isCoursePlugin = true;
public $table;
/**
* Class constructor.
*/
protected function __construct()
{
parent::__construct(
'1.0',
'Julio Montoya',
[
'tool_enable' => 'boolean',
'block_course_if_initial_exercise_not_attempted' => 'boolean',
'average_percentage_to_unlock_final_exercise' => 'text',
]
);
$this->table = Database::get_main_table('plugin_positioning_exercise');
}
public static function create()
{
static $result = null;
return $result ? $result : $result = new self();
}
public function install()
{
$table = $this->table;
$sql = 'CREATE TABLE IF NOT EXISTS '.$table.' (
id INT unsigned NOT NULL auto_increment PRIMARY KEY,
exercise_id INT unsigned NOT NULL,
c_id INT unsigned NOT NULL,
session_id INT unsigned DEFAULT NULL,
is_initial TINYINT(1) NOT NULL,
is_final TINYINT(1) NOT NULL
)';
Database::query($sql);
// Installing course settings
$this->install_course_fields_in_all_courses(true, 'positioning.png');
}
public function uninstall()
{
$table = $this->table;
Database::query("DROP TABLE IF EXISTS $table");
}
public function isInitialExercise($exerciseId, $courseId, $sessionId)
{
$data = $this->getPositionData($exerciseId, $courseId, $sessionId);
if ($data && isset($data['is_initial']) && 1 === (int) $data['is_initial']) {
return true;
}
return false;
}
public function getPositionData($exerciseId, $courseId, $sessionId)
{
$table = $this->table;
$courseId = (int) $courseId;
$sessionId = (int) $sessionId;
$sql = "SELECT * FROM $table
WHERE
exercise_id = $exerciseId AND
c_id = $courseId AND
session_id = $sessionId
";
$result = Database::query($sql);
if (Database::num_rows($result) > 0) {
return Database::fetch_array($result, 'ASSOC');
}
return false;
}
public function isFinalExercise($exerciseId, $courseId, $sessionId)
{
$data = $this->getPositionData($exerciseId, $courseId, $sessionId);
if ($data && isset($data['is_final']) && 1 === (int) $data['is_final']) {
return true;
}
}
public function setInitialExercise($exerciseId, $courseId, $sessionId)
{
$this->setOption('is_initial', $exerciseId, $courseId, $sessionId);
}
public function setFinalExercise($exerciseId, $courseId, $sessionId)
{
$this->setOption('is_final', $exerciseId, $courseId, $sessionId);
}
public function blockFinalExercise($userId, $exerciseId, $courseId, $sessionId)
{
$initialData = $this->getInitialExercise($courseId, $sessionId);
if (empty($initialData)) {
return false;
}
if ($initialData && isset($initialData['exercise_id'])) {
// If this is final exercise?
$finalData = $this->getFinalExercise($courseId, $sessionId);
if (!empty($finalData) && $finalData['exercise_id'] && $exerciseId == $finalData['exercise_id']) {
$initialResults = Event::getExerciseResultsByUser(
$userId,
$initialData['exercise_id'],
$courseId,
$sessionId
);
if (empty($initialResults)) {
return true;
}
$averageToUnlock = (float) $this->get('average_percentage_to_unlock_final_exercise');
if (empty($averageToUnlock)) {
return false;
}
// Check average
$courseInfo = api_get_course_info_by_id($courseId);
$userAverage = (float) Tracking::get_avg_student_progress(
$userId,
$courseInfo['code'],
[],
$sessionId
);
if ($userAverage >= $averageToUnlock) {
return false;
}
return true;
} else {
return false;
}
}
return true;
}
public function getInitialExercise($courseId, $sessionId)
{
return $this->getCourseExercise($courseId, $sessionId, true, false);
}
public function getFinalExercise($courseId, $sessionId)
{
return $this->getCourseExercise($courseId, $sessionId, false, true);
}
private function setOption($field, $exerciseId, $courseId, $sessionId)
{
if (!in_array($field, ['is_initial', 'is_final'], true)) {
return false;
}
$data = $this->getPositionData($exerciseId, $courseId, $sessionId);
$disableField = $field === 'is_initial' ? 'is_final' : 'is_initial';
if ($data && isset($data['id'])) {
$id = $data['id'];
$sql = "UPDATE $this->table SET
$field = 1,
$disableField = 0
WHERE id = $id";
Database::query($sql);
$sql = "DELETE FROM $this->table
WHERE $field = 1 AND c_id = $courseId AND session_id = $sessionId AND id <> $id";
Database::query($sql);
} else {
$params = [
'exercise_id' => $exerciseId,
'c_id' => $courseId,
'session_id' => $sessionId,
$field => 1,
$disableField => 0,
];
$id = Database::insert($this->table, $params);
$sql = "DELETE FROM $this->table
WHERE $field = 1 AND c_id = $courseId AND session_id = $sessionId AND id <> $id";
Database::query($sql);
}
}
private function getCourseExercise($courseId, $sessionId, $isInitial, $isFinal)
{
$table = $this->table;
$courseId = (int) $courseId;
$sessionId = (int) $sessionId;
$sql = "SELECT * FROM $table
WHERE
c_id = $courseId AND
session_id = $sessionId
";
if ($isInitial) {
$sql .= ' AND is_initial = 1 ';
} else {
$sql .= ' AND is_initial = 0 ';
}
if ($isFinal) {
$sql .= ' AND is_final = 1 ';
} else {
$sql .= ' AND is_final = 0 ';
}
$result = Database::query($sql);
if (Database::num_rows($result) > 0) {
return Database::fetch_array($result, 'ASSOC');
}
return false;
}
}

@ -0,0 +1,151 @@
<?php
/* For license terms, see /license.txt */
require_once __DIR__.'/../../main/inc/global.inc.php';
api_protect_course_script(true);
$plugin = Positioning::create();
if (!$plugin->isEnabled()) {
api_not_allowed(true);
}
if (!api_is_allowed_to_edit()) {
// Students are redirected to the start_student.php
api_location(api_get_path(WEB_PLUGIN_PATH).'positioning/start_student.php?'.api_get_cidreq());
}
$action = isset($_REQUEST['action']) ? $_REQUEST['action'] : '';
$id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0;
$formToString = '';
$currentUrl = api_get_self().'?'.api_get_cidreq();
$courseId = api_get_course_int_id();
$sessionId = api_get_session_id();
$courseInfo = api_get_course_info();
switch ($action) {
case 'set_initial':
Display::addFlash(Display::return_message(get_lang('Updated')));
$plugin->setInitialExercise($id, $courseId, $sessionId);
api_location($currentUrl);
break;
case 'set_final':
Display::addFlash(Display::return_message(get_lang('Updated')));
$plugin->setFinalExercise($id, $courseId, $sessionId);
api_location($currentUrl);
break;
}
$nameTools = $plugin->get_lang('Positioning');
$htmlHeadXtra[] = api_get_js('chartjs/Chart.min.js');
$template = new Template($nameTools);
$url = $currentUrl.'&';
$actions = function ($row) use ($plugin, $url, $courseId, $sessionId) {
$classInitial = 'btn btn-default';
if ($plugin->isInitialExercise($row['iid'], $courseId, $sessionId)) {
$classInitial = 'btn btn-primary disabled';
}
$classFinal = 'btn btn-default';
if ($plugin->isFinalExercise($row['iid'], $courseId, $sessionId)) {
$classFinal = 'btn btn-primary disabled';
}
$actions = Display::url(
$plugin->get_lang('SelectAsInitialTest'),
$url.'&action=set_initial&id='.$row['iid'],
['class' => $classInitial]
);
$actions .= Display::url(
$plugin->get_lang('SelectAsFinalTest'),
$url.'&action=set_final&id='.$row['iid'],
['class' => $classFinal]
);
$actions .= '&nbsp;'.Display::url(
Display::return_icon('test_results.png', get_lang('Results'), '', ICON_SIZE_MEDIUM),
api_get_path(WEB_CODE_PATH).'exercise/exercise_report.php?'.api_get_cidreq().'&exerciseId='.$row['iid']
);
return $actions;
};
$table = Exercise::exerciseGrid(
0,
null,
null,
null,
null,
false,
3,
RESULT_DISABLE_RADAR,
1,
$actions,
true
);
$exercisesToString = '';
if (!empty($table)) {
if ($table instanceof SortableTableFromArrayConfig) {
$table->headers = [];
$table->set_header(0, get_lang('ExerciseName'), false);
$table->set_header(1, get_lang('QuantityQuestions'), false);
$table->set_header(2, get_lang('Actions'), false);
$exerciseList = [];
foreach ($table->table_data as &$data) {
$data = [
$data[1],
$data[2],
$data[3],
];
}
$table->set_form_actions([]);
$exercisesToString = $table->return_table();
} else {
$exercisesToString = Display::return_message(get_lang('NoDataAvailable'), 'warning');
}
}
$initialData = $plugin->getInitialExercise($courseId, $sessionId);
$filter = STUDENT;
if (!empty($sessionId)) {
$filter = 0;
}
$users = CourseManager::get_user_list_from_course_code(api_get_course_id(), $sessionId, null, null, $filter);
$radars = '';
$initialExerciseTitle = '';
if (!empty($users) && $initialData && $initialData['exercise_id']) {
$results = [];
$labels = [];
$users = array_column($users, 'user_id');
$exerciseId = $initialData['exercise_id'];
$initialExercise = new Exercise();
$initialExercise->read($exerciseId);
$finalData = $plugin->getFinalExercise($courseId, $sessionId);
if ($finalData && $finalData['exercise_id']) {
$finalExercise = new Exercise();
$finalExercise->read($finalData['exercise_id']);
$results[] = $finalExercise;
$labels[] = $plugin->get_lang('FinalTest');
}
$results[] = $initialExercise;
$labels[] = $plugin->get_lang('InitialTest');
$radars = $initialExercise->getAverageRadarsFromUsers($users, $results, $labels, $courseId, $sessionId);
$initialExerciseTitle = $initialExercise->get_formated_title();
}
$template->assign(
'positioning_introduction',
Display::return_message($plugin->get_lang('PositioningIntroduction'))
);
$template->assign('table', $exercisesToString);
$template->assign('radars', $radars);
$template->assign('initial_exercise', $initialExerciseTitle);
$template->assign('content', $template->fetch('positioning/view/start.tpl'));
$template->display_one_col_template();

@ -0,0 +1,108 @@
<?php
/* For license terms, see /license.txt */
require_once __DIR__.'/../../main/inc/global.inc.php';
api_protect_course_script(true);
$plugin = Positioning::create();
if (!$plugin->isEnabled()) {
api_not_allowed(true);
}
$htmlHeadXtra[] = api_get_js('chartjs/Chart.min.js');
$currentUrl = api_get_self().'?'.api_get_cidreq();
$courseId = api_get_course_int_id();
$courseCode = api_get_course_id();
$sessionId = api_get_session_id();
$currentUserId = api_get_user_id();
$initialData = $plugin->getInitialExercise($courseId, $sessionId);
$finalData = $plugin->getFinalExercise($courseId, $sessionId);
$initialExerciseTitle = '';
$radar = '';
$initialResults = null;
$exercisesToRadar = [];
$exercisesToRadarLabel = [];
if ($initialData) {
$exerciseId = $initialData['exercise_id'];
$initialExercise = new Exercise();
$initialExercise->read($exerciseId);
$initialResults = Event::getExerciseResultsByUser(
$currentUserId,
$initialData['exercise_id'],
$courseId,
$sessionId
);
$initialExerciseTitle = $initialExercise->get_formated_title();
if (empty($initialResults)) {
$url = api_get_path(WEB_CODE_PATH).'exercise/overview.php?'.api_get_cidreq().'&exerciseId='.$exerciseId;
$initialExerciseTitle = Display::url($initialExercise->get_formated_title(), $url);
}
}
$studentAverage = Tracking::get_avg_student_progress(
$currentUserId,
$courseCode,
[],
$sessionId
);
$averageToUnlock = (float) $plugin->get('average_percentage_to_unlock_final_exercise');
$finalExerciseTitle = '';
if ($finalData) {
$exerciseId = $finalData['exercise_id'];
$finalExercise = new Exercise();
$finalExercise->read($exerciseId);
$finalResults = Event::getExerciseResultsByUser(
api_get_user_id(),
$finalData['exercise_id'],
$courseId,
$sessionId
);
$finalExerciseTitle = $finalExercise->get_formated_title();
if (!empty($initialResults)) {
if ($studentAverage >= $averageToUnlock) {
$url = api_get_path(WEB_CODE_PATH).'exercise/overview.php?'.api_get_cidreq().'&exerciseId='.$exerciseId;
if (empty($finalResults)) {
$finalExerciseTitle = Display::url($finalExercise->get_formated_title(), $url);
}
}
$exercisesToRadar[] = $finalExercise;
$exercisesToRadarLabel[] = $plugin->get_lang('FinalTest');
}
}
// Set the initial results as second series to make sure it appears on top
$lpUrlAndProgress = $studentAverage.'%';
if (!empty($initialExercise)) {
$exercisesToRadar[] = $initialExercise;
$exercisesToRadarLabel[] = $plugin->get_lang('InitialTest');
if (!empty($initialResults)) {
$lpUrlAndProgress = '<a href="'.api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?'.api_get_cidreq().'">'.$studentAverage.'%</a>';
}
}
$radars = $initialExercise->getRadarsFromUsers(
[$currentUserId],
$exercisesToRadar,
$exercisesToRadarLabel,
$courseId,
$sessionId
);
$nameTools = $plugin->get_lang('Positioning');
$template = new Template($nameTools);
$template->assign('initial_exercise', $initialExerciseTitle);
$template->assign('final_exercise', $finalExerciseTitle);
$template->assign('average_percentage_to_unlock_final_exercise', $averageToUnlock);
$template->assign('lp_url_and_progress', $lpUrlAndProgress);
$template->assign('radars', $radars);
$template->assign('content', $template->fetch('positioning/view/start_student.tpl'));
$template->display_one_col_template();

@ -0,0 +1,7 @@
<?php
/* For license terms, see /license.txt */
require_once __DIR__.'/../../main/inc/global.inc.php';
Positioning::create()->uninstall();

@ -0,0 +1,10 @@
{{ positioning_introduction }}
{{ table }}
{% if radars %}
{{ radars }}
<br>
{{ "ChartShowsAverageForAllStudentsUsingZeroForIncompleteTests"| get_plugin_lang('Positioning') }}
{% endif %}

@ -0,0 +1,25 @@
<div class="container">
<div class="row">
<div class="col-md-5">
<img style="float:left;" src="/plugin/positioning/img/positioning-line.png" />
<table style="height:380px;margin-left: auto;margin-right: auto;" >
<tr>
<td>{{ "InviteToTakePositioningTest"| get_plugin_lang('Positioning') }}<br>{{ "InitialTest"| get_plugin_lang('Positioning') }}: {{ initial_exercise }}</td>
</tr>
<tr>
<td>{{ "YouMustCompleteAThresholdToTakeFinalTest"| get_plugin_lang('Positioning') | format(average_percentage_to_unlock_final_exercise) }}<br>{{ "Average"| get_lang }}: {{ lp_url_and_progress }}</td>
</tr>
<tr>
<td>{{ "FinalTest"| get_plugin_lang('Positioning') }}: {{ final_exercise }}</td>
</tr>
</table>
</div>
<div class="col-md-7">
<br />
<br />
{{ radars }}
</div>
</div>
</div>
Loading…
Cancel
Save